CSMLite - The Simple Modular Crop Simulation Model Example #17103/HEAD / v10 |
Tags:
not added yet
CSMLite - The Simple Modular Crop Simulation Model Examplehttp://www.icasa.net/modular/index.html. The modular design of the model makes it a good training example for integration with the OMS framework. The original source code files can be accessed as noted below. The following exercises demonstrate the relevant steps to developing and maintaining the model as shown in the Figure below in OMS.Invalid link [!/OMS FORTRAN Training/Slide3.PNG!] The Figure above shows the conceptual structure of the CSMLite model.
The Listing below (csm.sim) shows the OMS representation of the Data flow Figure as an executable simulation script. /* * $Id: csm.sim 64915db25869 2011-10-23 23:38 -0600 Olaf David <odavid@colostate.edu> $ * * Simulation file. */ sim(name:"CSM") { // for building from within the OMS Console build() // mostly for DLL/SO resources resource "$oms_prj/dist" // define output strategy: output base dir and // the strategy NUMBERED|SIMPLE|TIME // outputstrategy(dir: "$oms_prj/output", scheme:SIMPLE) // run the model while the control component is not done. model (while:"control.notDone") { components { 'control' 'csm.gen.Controller' // model controller 'input' 'csm.gen.Input_Init' // input paramter from file 'we' 'csm.gen.Weather_Rate' // climate input 'sw_rate' 'csm.gen.SW_Rate' // SW rate 'sw_integ' 'csm.gen.SW_Integ' // SW integr 'sw_outpt' 'csm.gen.SW_Outpt' // SW ouput 'pl_rate' 'csm.gen.Plant_Rate' // plant rate 'pl_integ' 'csm.gen.Plant_Integ' // plant integration 'pl_outpt' 'csm.gen.Plant_Outpt' // plant output } connect { // control connect 'control.doy' 'we sw_rate pl_rate \ sw_integ pl_integ \ sw_outpt pl_outpt' // weather input 'we.srad' 'sw_rate sw_integ sw_outpt' 'we.tmax' 'sw_rate sw_integ sw_outpt pl_rate pl_integ pl_outpt' 'we.tmin' 'sw_rate sw_integ sw_outpt pl_rate pl_integ pl_outpt' 'we.rain' 'sw_rate sw_integ sw_outpt' 'we.par' 'pl_rate pl_integ pl_outpt' // input 'input.doyp' 'pl_rate pl_integ pl_outpt' // rate calculations 'sw_rate.swfac1' 'pl_rate' 'sw_rate.swfac2' 'pl_rate' // integration 'pl_rate.lai' 'sw_integ' 'sw_integ.swfac1' 'pl_integ' 'sw_integ.swfac2' 'pl_integ' // output phase 'pl_integ.lai' 'sw_outpt' 'sw_outpt.swfac1' 'pl_outpt' 'sw_outpt.swfac2' 'pl_outpt' } feedback { // carry lai into next day 'pl_integ.lai' 'sw_rate' } parameter { // general 'control.count' 3 'input.simctrl' "$oms_prj/data/SIMCTRL.INP" 'we.simctrl' "$oms_prj/data/WEATHER.INP" // soil water 'sw_rate.soil_inp' "$oms_prj/data/SOIL.INP" 'sw_rate.irrig_inp' "$oms_prj/data/IRRIG.INP" 'sw_rate.sw_out' "$oms_prj/output/sw.out" // plant 'pl_rate.plant_inp' "$oms_prj/data/PLANT.INP" 'pl_rate.plant_out' "$oms_prj/output/plant.out" } // optional logging logging { 'csm.Sw' 'OFF' 'csm.Plant' 'OFF' 'csm.Input' 'OFF' 'csm.Weather' 'OFF' } } }
EXERCISE 1 - Load the OMS CSMLite Modeling ProjectThe purpose of this exercise is to demonstrate how to create a modeling project in OMS. OMS provides the CSM project called oms3.prj.csm containing the directory structure and configuration/properties files for Netbeans and OMS so that modelers do not have to spend a lot of time setting this up. In most cases, modelers will modify existing projects such this ome to create new ones. For this training, the basic template and the CSMLite project will be provided to participants.Exercise Steps
During this exercise we will review the contents of the projects, and review OMS relevant features in Netbeans.
EXERCISE 2 - Features of the OMS ConsoleThe purpose of this exercise is to become familiar with the functionality of the OMS Console.Exercise Steps
Reference Section
EXERCISE 3 - Study the CSMLite Components for OMSThe purpose of this exercise is to gain initial proficiency in studying the annotations of FORTRAN source code files so that they can be later adjusted and compiled into OMS components.Exercise Steps
Reference Sections
EXERCISE 4 - Use OMS DSL to Run a Unit Test of a CSMLite ComponentThe purpose of this exercise is to build proficiency in creating and running unit tests of OMS FORTRAN components.Exercise Steps
Reference Sections
EXERCISE 5 - Use OMS DSL to Build and Run the CSMLite ModelThe purpose of this exercise is to become proficient in creating simulations for building and running OMS models, including setting parameters, provisioning input data, and managing, visulizing, and analyzing output.Exercise Steps
Reference Sections
EXERCISE 6 - Generate Model System Documentation AutomaticallyThe purpose of this exercise is to understand how the OMS auto-documentation process works.Exercise Steps
Reference Section
EXERCISE 7 - Modify the CSMLite Model
Download
CSMLite with Plant2
Exercise Steps
Reference Sections
EXERCISE 8 - Consider Options for Data Input and Output ManagementThe purpose of this exercise is to explore various approaches for managing data input and output with OMS.Exercise Steps
Reference Section
EXERCISE 9 - Use OMS DSL to Calibrate a ModelThe purpose of this exercise is to introduce the shuffled complex evolution method of model calibration using the Luca tool. The direction of this exercise will be determined after discussion with participants during the workshop.Exercise Steps
Reference Sections
CSMLite Model Source Code, Simulation, and Data FilesCSMLite Source CodeOriginal Main Weather Soil-Water Availability Plant Growth Adjusted for OMS Provided to participants via mobile storage device Alternative CSMLite Plant Component Alternative Plant Component Adjusted Simulation Control Data Input File Adjusted FORTRAN Main CSMLite OMS Simulation FilesProvided to participants via mobile storage deviceCSMLite Data Input Files Provided to participants via mobile storage device CSMLite Output Files Provided to participants via mobile storage device |
Navigation Bar for Object Modeling System
Resources:
Downloads You must login to see this link. Register now, if you have no user account yet. OMS API Javadoc Publications & Presentations Annotation Reference DSL Reference Handbook 3.0 (Draft) Frequently Asked Questions (FAQ) OMS License (LGPL 2.1) New Users: 1. Get an ALM account 2. Join the OMS project Contact Us: Jack Carlson Coordinator, OMS Laboratory OMS Laboratory Jack.Carlson@colostate.edu (970) 492-7323 Olaf David Director, OMS Laboratory odavid (at) colostate.edu (970) 491-8026 |
oms3.prj.csm.zip