Presentation is loading. Please wait.

Presentation is loading. Please wait.

OMS Workshop September 2007, Fort Collins1 Object Modeling System Olaf David.

Similar presentations


Presentation on theme: "OMS Workshop September 2007, Fort Collins1 Object Modeling System Olaf David."— Presentation transcript:

1 OMS Workshop September 2007, Fort Collins1 Object Modeling System Olaf David

2 OMS Workshop September 2007, Fort Collins2 Agenda Historical Review Overview OMS 2.1 –System Features and Architecture (Olaf D.) –OMS Colab integration. –Component Repository (Wes L.) –A new Approach in model Development (Steve M. USGS) –Model Calibration - Lauren H (USGS)

3 OMS Workshop September 2007, Fort Collins3 History Project Started 2000 Mission: Develop a Next Generation Modeling Platform for ARS based on MMS experience 2001/02 2003/04 2005/06 2007 Netbeans 3.6 PF Major Refactoring CVS Netbeans 4.0 PF Modeling Projects CoLab Use Project Plan/Process CEAP Initial Prototype Swing based PRMS/RZWQM Netbeans 5.5.1 PF Modeling Projects Ressource Analysis (Worldwind) CoLab integraion SOA/Calib PRMS/J2000/RLS/… Major Milestones:

4 OMS Workshop September 2007, Fort Collins4 Required Features Modules / Component are the building blocks for models Allow for reuse of those! Visual assembly of models The legacy issue (be modern but not too modern!) Scientific Programming Languages Object oriented is “state of the art” in Software Engineering Fits ARS/USDA needs

5 OMS Workshop September 2007, Fort Collins5 Principle Modeling System Structure Data IO GUI Time step component Spatial unit component Data Parameter Handling time step iteration spatial unit iteration ETP Inter- ception Snow Soil- water Ground- water Inter- flow Base- flow Surface RO Irrigation Erosion Surface water use Ground water use Plant growth Stream RO Generic System Components Model Setup Sensitivity Analysis Optimization Process module library ETP Hydr. GW … … … WQ Irrig. … … [Krause 2004]

6 OMS Workshop September 2007, Fort Collins6 2001 Prototype Java 1.3 Swing application XML Dictionary Monolithic

7 OMS Workshop September 2007, Fort Collins7 OMS in 2002 Netbeans 3.5 PF Update center Modularization RWQM Prototype PRMS prototype

8 OMS Workshop September 2007, Fort Collins8 Netbeans Application Platform Open Source, Java, Developer community User interface management Data and presentation management Setting management Graphical Editing The Editor The Wizard framework Storage management Big Selection of additional components Internet-based update delivery Modular architecture

9 OMS Workshop September 2007, Fort Collins9 2004 OMS (1.1) Netbeans 3.6 PF Few Modules –ComponentBuilder –ModuleBuilder –Analysis –OMS Core Compiler Modeling Projects Component Library Model Editor Parameter Editor Component Editor Output Analysis Statistics

10 OMS Workshop September 2007, Fort Collins10 2005 OMS (1.2) Modeling Projects First Component Library (Local) Internal Code disaggregation GCC bundle

11 OMS Workshop September 2007, Fort Collins11 2006 – OMS 2.0 NB 5.0 Improved spatial Modeling Data Analysis Execution API

12 OMS Workshop September 2007, Fort Collins12 2007 OMS 2.1 Netbeans 5.5.1 PF JDK 1.6 Modeling Projects Simulation management –ESP CoLab access Model Calibration –Luca Visualization –Worldwind (Prototype)

13 OMS Workshop September 2007, Fort Collins13 Current and Upcoming System Main Development Collaborations USGS –Luca - Model Calibration –Analysis, –Ensemble Streamflow Prediction NRCS –System Testing –NWCC – Testing (ESP, Luca) –GEOLEM SUN Microsystems / Intland –Codebeamer Integration (NASA) –Worldwind, Geolem (MSU) –GIS, GEOLEM Related activities –FRAMES (EPA) –Catchment Modeling Toolkit, Apsim (CSIRO) –OpenMI (EU) –Daisy (Copenhagen) –Federal MOU on Multimedia Modeling Systems, …

14 OMS Workshop September 2007, Fort Collins14 Developer Group Ian Schneider (2002 – 2006) (a lot!) Wes Lloyd (since Aug. 2007) (first CoLab Integration) System Code Contributors –Steve Markstrom (Analysis, ESP, …) –Makiko Umemoto (Luca) –Hussein Chinoy (Worldwind) –Few Students Tester –Frank Geter, Dennis Flanagan, George Leaveslay, Pat Bartling, Candace Batts –Alan Andales, Jim Ascough, Mark Strudley, Dave Garen, –…

15 OMS Workshop September 2007, Fort Collins15 Applications, current efforts Precipitation Runoff Modeling System Common Wind and Water Erosion Model J2000 (fully distributed watershed model) OMNI Range / Livestock

16 OMS Workshop September 2007, Fort Collins16 OMS Publications … David O. et al.(2002): The Object Modeling System In: Agricultural System Models in Field Research and Technology Transfer, L. Ahuja, L. Ma, T.A. Howell, Eds., Lewis Publishers, CRC Press LLC, 2002: Chapter 15, 317- 331. Ahuja, L.R., David, O., and Ascough II, J.C. (2004). Developing natural resource models using the Object Modeling System: Feasibility and challenges. Advances in Geosciences, Vol. 4, pp 29-36, 9-8-2005 Flanagan D.C., Ascough, J.C., Geter, W. F, David O. (2005): Developing of a Hillslope Erosion Module for the Object Modeling System. Proceedings of the 2005 ASAE Annual International Meeting, Tampa, Florida, July 17-20, 2005. Rizzoli, et al.(2006): Integrated modeling frameworks for environmental assessment and decision support. Book chapter in: Modelling and Software for Integrated Assessment and Management (Elsevier IDEA Book Series). 2006. …

17 OMS Workshop September 2007, Fort Collins17 OMS 2.1 User Interface

18 OMS Workshop September 2007, Fort Collins18 OMS 2.1 User Interface

19 OMS Workshop September 2007, Fort Collins19 OMS Modular Tool Concept

20 OMS Workshop September 2007, Fort Collins20 Modeling Projects Workspace that contains all resource for developing and running a model –Documentation –Input Data –Output data –Model Components Component = behavior –Model Assemblies Model = components + attributes –Simulations Simulation =model + input data + execution scheme + additional info Project level Actions

21 OMS Workshop September 2007, Fort Collins21 Project Resource Creation

22 OMS Workshop September 2007, Fort Collins22 General Properties Window Allows for general Configuration changes of almost everything –Components –Model –Attributes –Files –…

23 OMS Workshop September 2007, Fort Collins23 Recent Features Model Simulation Management Meta Data Annotations for Components Execution API & SOA USDA CoLab Integration Luca Model Calibration

24 OMS Workshop September 2007, Fort Collins24 Component Development “Creating the model building blocks”

25 OMS Workshop September 2007, Fort Collins25 What is a Component ? Encapsulates Data and Operations to realize one specific purpose Communicates to its environment using a defined interface Black box behavior Testability by its own ! Model Component Attribute

26 OMS Workshop September 2007, Fort Collins26 (IV) Component Implementation Java Class that implements –Executable, –Stateful … Defines Attributes references –Attribute.Double –Attribute.Integer –.. Defined Method structure –initialization –component logic –cleaning up resources –additional methods init() run() cleanup() Component Implementation Attribute ojects

27 OMS Workshop September 2007, Fort Collins27 Component API

28 OMS Workshop September 2007, Fort Collins28 Component Sources Java Language –(maybe native bindings) Project Components folder Packages Wizard Generation

29 OMS Workshop September 2007, Fort Collins29 Component Editor

30 OMS Workshop September 2007, Fort Collins30 Component Attributes Attribute Objects –Type –Name Attribute Annotations –Description –Access –Role –Unit –Constraint Packages –org.oms.model.data –org.oms.model.data.annotations area snow_trs snow_trans

31 OMS Workshop September 2007, Fort Collins31 Component Behavior Initialization Execution Cleanup Native Code handling Visual elements package –org.oms.model.components

32 OMS Workshop September 2007, Fort Collins32 Component Meta Data Component Name Annotations –Description –Keywords –Version Info –Source –Author –(Status)

33 OMS Workshop September 2007, Fort Collins33 Native Components Can be implemented in FORTRAN,C, C++ FORTRAN: automatic encapsulation of subroutines/functions into a component. Embedded JNative library is able to call dynamic link libraries.

34 OMS Workshop September 2007, Fort Collins34 Model Integration Integrate Components into a model Connect Component Attributes

35 OMS Workshop September 2007, Fort Collins35 Component Library A B C A B C D A B A B C D A B C Snowmelt Infiltration Evaporation Interception Regionalization CBABB Model Component Library

36 OMS Workshop September 2007, Fort Collins36 Create a Model using the Wizard Model Wizard A model is a hierarchical assembly of components Sequential Execution order

37 OMS Workshop September 2007, Fort Collins37 Component Palette Controls execution of components Control Components –Sequential execution –Parallel Execution –Conditional Exec –Iteration –Temporal Execution –Spatial Execution

38 OMS Workshop September 2007, Fort Collins38 Adding a Component Drag and Drop a component into a model Where to instantiate the Attributes? Scoping

39 OMS Workshop September 2007, Fort Collins39 Model Attributes Attributes that gets shared between components Global data element in a model Primitive and aggregated data structures Introduced by components when they are added to the model or explicitly declared

40 OMS Workshop September 2007, Fort Collins40 Component Connectivity Shows and Controls how a component is connected to the models data Connections changeable Component Attribute references point to Model Attribute Objects Path like syntax

41 OMS Workshop September 2007, Fort Collins41 Component Connectivity

42 OMS Workshop September 2007, Fort Collins42 Data Assimilation Tables Parameter

43 OMS Workshop September 2007, Fort Collins43 Data Input Tabular data Property parameter sets Any other “unknown” data files Wizard

44 OMS Workshop September 2007, Fort Collins44 Tabular Data support Table API / SPI –CSV –MMS statvar/data –NetCDF –JDBC COSU oriented Multi view Editor Copy & paste from/to Excel

45 OMS Workshop September 2007, Fort Collins45 Property Parameter Sets Model parameter Structure –key = value

46 OMS Workshop September 2007, Fort Collins46 Model Execution Various ways to execute a model Visual Batch …

47 OMS Workshop September 2007, Fort Collins47 Visual Execution Editing Filtering –Type –Name –Role –Dimension –Access Selection

48 OMS Workshop September 2007, Fort Collins48 Spreadsheet view Transpose view Apply formulas –Math –Statistics

49 OMS Workshop September 2007, Fort Collins49 Control Model Execution Set breakpoints Execution will stop after component execution Check attributes in Explorer Debugging at the component level

50 OMS Workshop September 2007, Fort Collins50 Batch Execution No GUI, just standard output Not exciting, but very useful

51 OMS Workshop September 2007, Fort Collins51 Output Analysis “Ad-hoc post run analysis”

52 OMS Workshop September 2007, Fort Collins52 Analysis Analysis types Configure them once and execute often. Plays well with simulation management

53 OMS Workshop September 2007, Fort Collins53 Analysis Canned analysis configuration Analysis of output data –Graphs TS Plot XY Error Flow duration Residuals –Statistics Table IO/API

54 OMS Workshop September 2007, Fort Collins54 Analysis 2D Plot types 2D Plot types –Combined scale –Multiple scale –Vert/Horiz. Arranged –Scattered Plots –Statistical Moments

55 OMS Workshop September 2007, Fort Collins55 ESP Trace Analysis USGS OUI ESP Tool Statistical analysis Report generation

56 OMS Workshop September 2007, Fort Collins56 NASA Worldwind OMS Prototype (not in 2.1)

57 OMS Workshop September 2007, Fort Collins57 Extension to map OMS model output data into Worldwind

58 OMS Workshop September 2007, Fort Collins58 Simulations Configure a model application

59 OMS Workshop September 2007, Fort Collins59 Simulation ? = Model + Input Data + Execution type + (Analysis) + Additional Settings Type –Basic Simulation –Ensemble Streamflow Prediction –Model calibration using LUCA (Prototype) Combine models with different data file, and ways to execute them together.

60 OMS Workshop September 2007, Fort Collins60 Simulations Wizard generated Icons represent types

61 OMS Workshop September 2007, Fort Collins61 Basic Simulation Sections Drag and Drop from project –Model –Parameter file Check execution type –GUI –Batch (Analysis)

62 OMS Workshop September 2007, Fort Collins62 Ensemble Streamflow Prediction Similar to Basic Simulation –Model –Parameter Files ESP parameter –Init period –Forecasting period –Historical years

63 OMS Workshop September 2007, Fort Collins63 Model Calibration using Luca Luca wizard start Calibration settings overview

64 OMS Workshop September 2007, Fort Collins64 Calibration wizard as developed at USGS (prototype) Stepwise Calibration Methodology –Lauren … OMS Adaptation –Execution API –Table API –-> COSU

65 OMS Workshop September 2007, Fort Collins65 Documentation CoLab OMS Project

66 OMS Workshop September 2007, Fort Collins66 Documentation OMS Project WIKI –Olaf, Frank, George

67 OMS Workshop September 2007, Fort Collins67 OMS Architecture Points of Extension

68 OMS Workshop September 2007, Fort Collins68 Operating Systems Windows Linux Solaris Others Virtual Machine Object Modeling System Version 2.+ Platform Application Platform Modeling Tools JAVA 2 Platform NetBeans Platform Version Control System (Subversion) USDA CoLab Modeling Projects Component Library Component Library... Component Library... Modeling Core Data Management GNU Compilers (C, C++, Fortran) Build System Modeling API Modeling Project Management Model Builder Component Builder Statistical Analysis Spatial Visualization Uncertainty Analysis JAVA 2 Platform Modeling Runtime Process Component Operating System Process Component Process Component Process Component Regionalized CEAP Model Process Component CEAP Model Graphical User Interface USDA Modeling Collaboration Infrastructure Model Applications

69 OMS Workshop September 2007, Fort Collins69 Build OMS from Source Get Netbeans 5.5.1 + JDK 1.6 Checkout OMS SVN 2.1 branch –https://colab.sc.egov.usda.gov/svn/ oms/branches/2.1https://colab.sc.egov.usda.gov/svn/ oms/branches/2.1 Open the project –“omsbuild/omsplatform” –25 sub-projects Build / run

70 OMS Workshop September 2007, Fort Collins70 OMS – System Development in CoLab OMS Subversion Repository –~240 MB source for 3980 Revisions OMS CoLab Project –33 members –Documentation in WIKI –Tracker for Milestones, Enhancements Requests, and Bugs –Stores Releases

71 OMS Workshop September 2007, Fort Collins71 OMS Extensibility Netbeans API’s –~40 separate API to write an OMS compatible tool OMS API’s –Component API (model dev) –Model Execution API (system integration) –Table API/SPI (data formats) –Analysis API –Spreadsheets –SOA

72 OMS Workshop September 2007, Fort Collins72 OMS and SOA : Model Execution Service 1) Model Execution Service –Headless execution of a model based on the OMS execution API. –No UI / Netbeans Dependencies –Callable from Java/.NET –Prototype for AnnAGNPS –NRCS Plugin Architecture OS JAVA 2 Platform Modeling Core Data Management Modeling API Web service

73 OMS Workshop September 2007, Fort Collins73 OMS and SOA : Model Development Service 2) Model Resource Management Service –Components are stored in CoLab and can be accessed from OMS –CoLab (OMS Component Library) web service Pushing and pulling of components as a prototype

74 OMS Workshop September 2007, Fort Collins74 CoLab Access from within OMS Connects direct to USDA Collaboration platform Work with projects –Tracker item submission –Discussion forums –Shared documents –Builds

75 OMS Workshop September 2007, Fort Collins75 Access CoLab Components directly (Prototype) Connect Explore Palette Integrate

76 OMS Workshop September 2007, Fort Collins76 Additional Features CoLab Integration Component Library “Advanced Simulation Management” Luca & beyond

77 OMS Workshop September 2007, Fort Collins77 Summary OMS is a integrated model development environment IDE. It embraces component oriented software development CBSD for modeling Open Modeling Platform has an extensible architecture in many ways, it is adoptable for future integrations. It is certified within the common computing environment CCE. OMS integrates directly into USDA CoLab for sharing of its component resources. It is Open Source, development help is always welcome.

78 OMS Workshop September 2007, Fort Collins78 Modularization

79 OMS Workshop September 2007, Fort Collins79 Modularization Essential for design of complex system Since (Parnas 1976): –„On the Criteria to be used in Decomposing complex systems into Modules“ [CACM] Common guide lines for „concern separation“ in systems

80 OMS Workshop September 2007, Fort Collins80 What is a Module ? Encapsulates Data and Operations to realize one specific purpose Communicates to its environment through definite interface Black box behavior Testability by its own !

81 OMS Workshop September 2007, Fort Collins81 Module Design Criteria Cohesion (  ) Coupling (  ) Interface (slim) Size (?) testability ! Interference / Side effects (!) Number of Imports / Uses

82 OMS Workshop September 2007, Fort Collins82 Think about Bindings A B C D !

83 OMS Workshop September 2007, Fort Collins83 Again... A B ! C

84 OMS Workshop September 2007, Fort Collins84 Complexity =... + f( # Modules) #Modules Inner Module Complexity Overall System Complexity Opt

85 OMS Workshop September 2007, Fort Collins85 Complexity and Reusability MMS module structure Fortran 77 Where is „Jensen- Haise“ ? c*********************************************************************** c potet_jh.f: Determine whether transpiration is occurring and c compute the potential evapotranspiration for each HRU c version: 1.3 (markstro) c*********************************************************************** c c petdecl - set up parameters for potential et computations c integer function petdecl_jh(transp_on, potet, + basin_potet, lday, daily_potet) include 'fmodules.inc' integer transp_on(MAXHRU) integer lday real potet(MAXHRU), basin_potet real daily_potet(MAXHRU) petdecl_jh = 1 if(declpri('potet_lday', 1, 'integer', lday).ne.0) return if(declpri('potet_daily_potet', MAXHRU, 'real', + daily_potet).ne.0) return if(declvar('potet', 'transp_on', 'nhru', MAXHRU, 'integer', + 'Switch indicating whether transpiration is occurring,'// + ' 0=no 1=yes', + 'none', + transp_on).ne.0) return if(declvar('potet', 'potet', 'nhru', MAXHRU, 'real', + 'Potential evapotranspiration on an HRU', + 'inches', + potet).ne.0) return if(declvar('potet', 'basin_potet', 'one', 1, 'real', + 'Basin area-weighted average of potential et', + 'inches', + basin_potet).ne.0) return if(declparam('potet', 'transp_beg', 'nhru', 'integer', + '4', '1', '12', + 'Month to begin testing for transpiration', + 'Month to begin summing tmaxf for each HRU; when sum is '// + '>= to transp_tmax, transpiration begins', + 'month').ne.0) return if(declparam('potet', 'transp_end', 'nhru', 'integer', + '10', '1', '12', + 'End month of transpiration period', + 'Last month for transpiration computations; '// + 'Transpiration is computed thru end of month', + 'month').ne.0) return if(declparam('potet', 'transp_tmax', 'nhru', 'real', + '500.', '0.', '1000.', + 'Tmax index to determine start of transpiration', + 'Temperature index to determine the specific date of the '// + 'start of the transpiration period. Subroutine sums tmax '// + 'for each HRU starting with the first day of month '// + 'transp_beg. When the sum exceeds this index, '// + 'transpiration begins', + 'degrees').ne.0) return if(declparam('potet', 'jh_coef', 'nmonths', 'real', + '.014', '.005', '.060', + 'Monthly air temp coefficient - Jensen-Haise', + 'Monthly air temperature coefficient used in Jensen'// + '-Haise potential evapotranspiration computations, see '// + 'PRMS manual for calculation method', + '????').ne.0) return if(declparam('potet', 'jh_coef_hru', 'nhru', 'real', + '13.0', '5.0', '20.0', + 'HRU air temp coefficient - Jensen-Haise', + 'Air temperature coefficient used in Jensen-Haise potential '// + 'evapotranspiration computations for aech HRU. See PRMS '// + 'manual for calculation method', + '????').ne.0) return if(declparam('potet', 'epan_coef', 'nmonths', 'real', + '1.0', '0.2', '3.0', + 'Evaporation pan coefficient', + 'none').ne.0) return if(declparam('potet_jh', 'hru_area', 'nhru', 'real', + '1.0', '0.01', '1e+09', + 'HRU area', + 'acres').ne.0) return if(declparam('potet_jh', 'basin_area', 'one', 'real', + '1.0', '0.01', '1e+09', + 'Total basin area', + 'acres').ne.0) return if(declparam('potet_jh', 'hru_radpl', 'nhru', 'integer', + '1', 'bounded', 'nradpl', + 'Index of radiation plane for HRU', + 'Index of radiation plane used to compute solar '// + 'radiation for an HRU', + 'none').ne.0) return if(declparam('temp_1sta', 'temp_units', 'one', 'integer', + '0', '0', '1', + 'Units for observed temperature', + 'Units for observed temperature, 0=F, 1=C', + 'none').ne.0) return petdecl_jh = 0 return end c*********************************************************************** c c petinit - Initialize potet module - get parameter values, c set initial transp_on switch c integer function petinit_jh(nhru, transp_beg, transp_end, + transp_tmax, jh_coef, jh_coef_hru, + transp_on, tmax_sum, transp_check, + basin_area, hru_area, hru_radpl, + temp_units, lday) include 'fmodules.inc' integer nhru, transp_beg(MAXHRU), transp_end(MAXHRU) integer transp_on(MAXHRU), starttime(6), mo, day, i integer hru_radpl(MAXHRU), temp_units integer lday real transp_tmax(MAXHRU), jh_coef(MAXMO), jh_coef_hru(MAXHRU) integer transp_check(MAXHRU) real basin_area, hru_area(MAXHRU) real tmax_sum(MAXHRU) petinit_jh = 1 nhru = getdim('nhru') if(nhru.eq.-1) return if(getparam('potet', 'transp_beg', MAXHRU, 'integer', transp_beg) +.ne.0) return if(getparam('potet', 'transp_end', MAXHRU, 'integer', transp_end) +.ne.0) return if(getparam('potet', 'transp_tmax', MAXHRU, 'real', transp_tmax) +.ne.0) return if(getparam('potet', 'jh_coef', MAXMO, 'real', jh_coef) +.ne.0) return if(getparam('potet', 'jh_coef_hru', MAXHRU, 'real', jh_coef_hru) +.ne.0) return if(getparam('basin', 'basin_area', 1, 'real', basin_area) +.ne.0) return if(getparam('basin', 'hru_area', MAXHRU, 'real', hru_area) +.ne.0) return if(getparam('soltab', 'hru_radpl', MAXHRU,'integer', hru_radpl) +.ne.0) return if(getparam('temp_1sta', 'temp_units', 1, 'integer', temp_units) +.ne.0) return call dattim('start',starttime) mo = starttime(2) day = starttime(3) do 10 i = 1,nhru transp_on(i) = 0 tmax_sum(i) = 0. transp_check(i) = 0 if(mo.eq.transp_beg(i)) then if(day.gt.10) then transp_on(i) = 1 else transp_check(i) = 1 end if else if((transp_end(i)-transp_beg(i)).gt.0) then if(mo.gt.transp_beg(i).and.mo.lt.transp_end(i)) + transp_on(i) = 1 else if((mo.gt.transp_beg(i).and.mo.le.12).or. + (mo.ge.1.and.mo.lt.transp_end(i))) transp_on(i) = 1 end if 10 continue lday = 0 petinit_jh = 0 return end c*********************************************************************** c c petrun - Keeps track of transpiration on or off and computes c potential et for each HRU each day c integer function petrun_jh(transp_beg, transp_end, transp_on, + transp_check, transp_tmax,tmax_sum, + jh_coef, jh_coef_hru, potet, nhru, + basin_potet, basin_area, hru_area, + hru_radpl, temp_units, lday, + daily_potet) include 'fmodules.inc' integer transp_beg(MAXHRU), transp_end(MAXHRU), nhru integer transp_on(MAXHRU), transp_check(MAXHRU) integer nowtime(6), mo, i, day, lday integer hru_radpl(MAXHRU), temp_units real transp_tmax(MAXHRU), tmax_sum(MAXHRU), jh_coef(MAXMO) real jh_coef_hru(MAXHRU), tavgc(MAXHRU), tavgf(MAXHRU) real swrad(MAXHRU), potet(MAXHRU),tmaxf(MAXHRU), elh, rin real basin_potet, basin_area, hru_area(MAXHRU) real daily_potet(MAXHRU), tmaxc(MAXHRU) real factor double precision dt petrun_jh = 1 dt = deltim() call dattim('now', nowtime) mo = nowtime(2) day = nowtime(3) basin_potet = 0. C******Set switch for active transpiration period if(lday.ne.day) then lday = day if(getvar('temp', 'tmaxf', MAXHRU, 'real', tmaxf) +.ne.0) return if(getvar('temp', 'tmaxc', MAXHRU, 'real', tmaxc) +.ne.0) return do 10 i= 1,nhru C******If in checking period, then for each day C******sum max temp until greater than temperature index parameter, C******at which time, turn transpiration switch on, check switch off if(transp_check(i).eq.1) then if(temp_units.eq.0) then if(tmaxf(i).gt.32.) tmax_sum(i) = tmax_sum(i) + tmaxf(i) else if(tmaxc(i).gt.0.) tmax_sum(i) = tmax_sum(i) + tmaxc(i) endif if(tmax_sum(i).gt.transp_tmax(i)) then transp_on(i) = 1 transp_check(i) = 0 tmax_sum(i) = 0. end if C******Otherwise, check for month to turn check switch on or C***** transpiration switch off else if(day.eq.1) then if(mo.eq.transp_beg(i)) then transp_check(i) = 1 if(temp_units.eq.0) then if(tmaxf(i).gt.32.) tmax_sum(i) = tmax_sum(i) + + tmaxf(i) else if(tmaxc(i).gt.0.) tmax_sum(i) = tmax_sum(i) + + tmaxc(i) endif C******If transpiration switch on, check for end of period else if(transp_on(i).eq.1) then if(mo.eq.transp_end(i)) transp_on(i) = 0 end if 10 continue C******Compute potential et for each hru using Jensen-Haise formulation if(getvar('temp', 'tavgf', MAXHRU, 'real', tavgf) +.ne.0) return if(getvar('temp', 'tavgc', MAXHRU, 'real', tavgc) +.ne.0) return if(getvar('solrad', 'swrad', MAXHRU, 'real', swrad) +.ne.0) return if(dt.lt.24.) then if(getvar('solrad', 'daily_swrad', MAXHRU, 'real', + swrad).ne.0) return end if do 20 i=1,nhru elh = (597.3-(.57*tavgc(i)))*2.54 rin = swrad(i)/elh daily_potet(i) = jh_coef(mo)*(tavgf(i)-jh_coef_hru(i))*rin if(daily_potet(i).lt.0.) daily_potet(i) = 0. 20 continue end if do 30 i=1,nhru if(dt.lt.24.) then factor = (dt * 60.) / 1440. else factor = 1. end if potet(i) = factor * daily_potet(i) basin_potet = basin_potet + potet(i) * hru_area(i) 30 continue basin_potet = basin_potet / basin_area C write (*,*) 'basin_potet ', basin_potet C write (*,101) potet C 101 format(' potet ',177f10.4) petrun_jh = 0 return end c*********************************************************************** c c Main potet_jh routine c integer function potet_jh_prms(arg) include 'fmodules.inc' character*(*) arg integer petdecl_jh, petinit_jh, petrun_jh, retval integer transp_on(MAXHRU), transp_check(MAXHRU), nhru integer transp_beg(MAXHRU), transp_end(MAXHRU) integer hru_radpl(MAXHRU), temp_units real potet(MAXHRU), transp_tmax(MAXHRU), tmax_sum(MAXHRU) real jh_coef(MAXMO), jh_coef_hru(MAXHRU) real basin_potet, basin_area, hru_area(MAXHRU) real daily_potet(MAXHRU) integer lday save transp_on, transp_check, nhru, transp_beg, transp_end save potet, transp_tmax, tmax_sum, jh_coef, jh_coef_hru save basin_potet, basin_area, hru_area, hru_radpl, temp_units save lday, daily_potet retval = 0 if(arg.eq.'declare') then retval = petdecl_jh(transp_on, potet, + basin_potet, lday, daily_potet) else if(arg.eq.'initialize') then retval = petinit_jh(nhru, transp_beg, transp_end, transp_tmax, + jh_coef, jh_coef_hru, transp_on, tmax_sum, + transp_check, basin_area, hru_area, + hru_radpl, temp_units, lday) else if(arg.eq.'run') then retval = petrun_jh(transp_beg, transp_end, transp_on, + transp_check, + transp_tmax, tmax_sum, jh_coef, jh_coef_hru, + potet, nhru, basin_potet, basin_area, hru_area, + hru_radpl, temp_units, lday, daily_potet) end if C******Debug level print call dpint4('End of potet_jh, retval = ', retval, 1, 2) potet_jh_prms = retval return end

86 OMS Workshop September 2007, Fort Collins86 CoLab & Subversion Support for Modeling

87 OMS Workshop September 2007, Fort Collins87

88 OMS Workshop September 2007, Fort Collins88 USDA Colab Overview Colab is an acronym for: –Collaborative Software Development Laboratory –Similar to concepts as SourceForge, CollabNet, Codehaus,... Colab’s purpose is to facilitate collaborative model development in a location independent environment. History –Identified the need in 2004 –Prototype phase in 2004/2005 –Production in April 2005 –Founding members USDA (NRCS/ASRU), EPA, CSU, USGS http://colab.usda.govhttp://colab.usda.gov

89 OMS Workshop September 2007, Fort Collins89 There is room for process enhancements in IT Problem 2/3 of projects fails on time, budget or miss the scope Trends Globalization, IT manager are managing global teams Co-location research groups Shortened release circles Growing code size and complexity

90 OMS Workshop September 2007, Fort Collins90 Tools needed by Open Source Communities Requirements Must be efficient over WAN, (home) Transparency, achievability On the fly setup infrastructure Easy to maintain Communication Mailing lists, Forums Wikis, Blogs, RSS the mailing lists, forums replacements Commonly used Version Control Systems CVS, Subversion, the CVS replacement Build ANT, CruiseControl, part of Maven Issue tracking Bugzilla, simple part of Jira IDE IDE with integrated CVS, Subversion support

91 OMS Workshop September 2007, Fort Collins91 Colab Overview Colab is made up of two major components 1.CodeBeamer Commercial web application to help manage software project development, communication, and documents. 2.Subversion Open source Version Control System

92 OMS Workshop September 2007, Fort Collins92 CodeBeamer Architecture

93 OMS Workshop September 2007, Fort Collins93 CoLab objectives with respect to modeling 1) Facilitate the development of OMS itself. Make the development process available to the community. 2) Migrate existing modeling efforts in USDA into a structured development environment. Tracking / version control.

94 OMS Workshop September 2007, Fort Collins94 Collaborative Software Development from the User Perspective CoLab as an enterprise platform of integrated applications includes Issue tracking for Bugs, Task, CRQ Document Management Wiki Spaces SCM integration (Subversion) QA metrics Build support Discussion Forum, Email integration Dashboard Search and Indexing USDA eAuth integration (Siteminder)

95 OMS Workshop September 2007, Fort Collins95 1) OMS development supported by Colab

96 OMS Workshop September 2007, Fort Collins96 OMS Development Process

97 OMS Workshop September 2007, Fort Collins97 Development Process

98 OMS Workshop September 2007, Fort Collins98 2) General Modeling Projects in CoLab

99 OMS Workshop September 2007, Fort Collins99 2) Structured Model Development Process Progress Levels for different models –SWAT: 1..2 –WWEM: 4 –AGNPS: 2 –REMM CONCEPTS: 2 –PRMS : 4 –J2000: 5 1.Integrate Source into Colab 2.Adopt the use of a (i) version control system and (ii) software project management as provided in Colab 3.Modeling Source; Refactoring using peer review 4.Modularize and use a modeling framework (OMS), eliminate redundancies 5.Implement automated model tests against selected data sets within Colab 6.Use Colab progress tracking methods on model development (software project management) 7.Involve external collaborator and scientific community for contribution and enhancements.

100 OMS Workshop September 2007, Fort Collins100 CoLab Metrics User Accounts (969) Projects (315) Repositories (269) repositories) Documents (21,652) ~100 active User/Day Code repository ~20 GB, Documents ~4GB Users from ~15 different institutions. Example Modeling Projects –AGNPS (NRCS), FRAMES/3MRA (EPA), OMS Unified Wind and Water Erosion (ARS), PRMS (USGS), SWAT (ARS; 2005), RZWQM (ARS), DSSAT Components (OMS), Range/Lifestock (ASRU), J2000 (FSU Jena), COSU (MOU on MIMS), and many others … Training classes on (i) Version Control Workflow using Subversion (ii) Codebeamer Project Management and (iii) OMS

101 OMS Workshop September 2007, Fort Collins101 Results of the use of a CoLab Reduction of administration efforts Cost reduction at Professional Service costs, Implementation, Training efforts and cost of travel Set up of a centralized Project repository Reduction of „Ramp Up Time“ Enhanced Communication Build of Knowledge, -distribution and –usage Productivity enhancement for technical and economic user Simplifies communication

102 OMS Workshop September 2007, Fort Collins102 USDA Modeling and Collaboration Infrastructure Model Development - Construct - Run - Analyze - Test - Verify Model ProjectManagement Model Project Management - Tracker - Forums - Documents - CMM Reports - Access Control ModelResourcesChange Management Model Resources Change Management - Version Control - Change Management - Repository - Concurrent Access OMSOMS SubversionSubversion CodebeamerCodebeamer


Download ppt "OMS Workshop September 2007, Fort Collins1 Object Modeling System Olaf David."

Similar presentations


Ads by Google