You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

Tags:  not added yet

Luca on the Tucca Watershed

The basic OMS project structure is composed of a master directory, here PrmsOmsWork and four subdirectories. In this exercise we will review the Luca application provided in the efcarson basin and then copy this .luca file to the tucca project for application to the Tucca basin.

Locate where you installed the OMS Console directory, open the directory, and double click on the console.bat file to start the OMS Console. After the Console window opens, use the Working Directory browse button (blue file folder) in the upper right hand corner to locate and select the PrmsOmsWork project you downloaded and installed at C:\PrmsOmsWork (or where ever you placed PrmsOmsWork).

If this is the first time you’ve run the Console the palette of the Console will come up blank. If you are opening the Console after another use, the last .sim file used in the Console will be displayed. Click on the open simulation icon to start the process of selecting a .sim file to execute.

This will open a browse window in which you can navigate to simulations and then to efcarson

Luca Files

In a previous exercise we saw the the execution of a PrmsOms model in the OMS3 Console requires the use of a .sim file. A .sim file is a script that identifies the specific model to be executed, the data and parameter file locations, user selected output variables, selected statistical measures of model performance to be computed, and selected output analyses to be displayed graphically. Detailed information about creating a .sim file can be found in the OMS3 Handbook in the doc directory of the student area.

Running the Luca calibration tools in OMS also requires a specific script file and this file has the extension of .luca. In this example we have loaded the efc.luca file. The efc.luca file provided in the PrmsOms download will be used to highlight the key elements of the .luca file for PrmsOms model calibration. The intent of the .luca file is to provide all the functionality we had with the MMS version of Luca which was a GUI based application with 13 individual windows that guided you through the set up process. In OMS the Luca application is developed using a set of scripts rather than the GUI based approach. The initial part of the script is given below.

luca(name: "EFC-luca") {

    // workspace directory
    def work = System.getProperty("oms3.work");

    // define output strategy: output base dir and
    // the strategy NUMBERED|SIMPLE|DATE
    outputstrategy(dir: "$work/output", scheme:NUMBERED)

    // for class loading: model location
    resource "$work/dist/*.jar"

    // define model
    model(classname:"model.PrmsDdJh") {
        // parameter
        parameter (file:"$work/data/efcarson/efc_params.csv") {
            inputFile  "$work/data/efcarson/efc_data.csv"
            outFile    "out.csv"
            sumFile    "basinsum.csv"
            out        "summary.txt"

            startTime "1980-10-01"
            endTime   "1985-09-30"
        }
    }

The first several lines of the .luca file are identical to those in the .sim file. The name of the Luca run, the workspace directory, the output strategy, the model location, the model name, the location of the parameter and data files, and selected model parameter values are all provided in this first part of the .luca script.

The next element in the file defines the output variables to be used in the calibration (basin_cfs, runoff[0]), the format in which they are written (7.3f), and the data file in which they will be stored (out1.csv).

     output(time:"date", vars:"basin_cfs,runoff[0]", fformat="7.3f", file:"out1.csv")

The next element defines the calibration start date. In the model parameter information above, the startTime was given as 1980-10-01 and the endTime was 1985-09-30. The startTime, endTime, and calibration_start dates are used to establish the initialization period and the calibration period for the run. With this set of dates, the model will be initialized for the period 1980-10-01 to 1982-09-30 and then the calibration period will from 1982-10-01 through 1985-09-30.

    calibration_start "1982-10-01"         // Calibration start date

The next element states the number of rounds over which each step of the calibration process will be run.

    rounds 1                               // calibration rounds, default 1
The next set of instructions provide the information for the parameters to be calibrated in each step of the Luca process. The step is composed of a parameter element and an objective function element. Note the bracket structure {} used to delineate the step, parameter, and objfunc elements. In the parameter element, the parameter name followed by the lower bound, upper bound, and calibration strategy are provided. The calibration strategies in Luca are MEAN, INDIVIDUAL, and BINARY. Currently only the MEAN strategy is operational but work is ongoing to provide all the functionality of the MMS Luca tool in the OMS implementation.

The next component of the step is the objective function (objfunc) specification. The method denotes the objective function equation to be used and the timestep denotes the time step over which the objective function will be computed. The sim element provides the file name where the simulated variable resides, the name of the table in which it resides, and the name of column in that table. The obs element provides the same information as the sim element but for the observed variable in the objective function.

    // step definitions
    step {
        parameter {
            jh_coef(lower:0.001, upper:0.05, strategy:MEAN)
        }

        objfunc(method:ABSDIF, timestep:DAILY) {
           sim(file:"out1.csv", table:"EFC-luca", column:"basin_cfs")
           obs(file:"$oms_prj/data/efcarson/efc_data.csv", table:"obs", column:"runoff[0]")
       }
    }

In this example there are two steps. The second step has 3 parameters to be calibrated in this step. The parameter element here lists the 3 selected parameters, their upper and lower bounds, and the strategy for calibration. In the objective function element, the objective function form, time step of computation, and the location of the simulated and observed varibles.

    step {
        parameter {
            soil2gw_max(lower:0.05, upper:0.5, strategy:MEAN)
            ssrcoef_sq(lower:0.01, upper:0.5, strategy:MEAN)
            tmax_allsnow(lower:30.0, upper:36.0, strategy:MEAN)
        }

        objfunc(method:ABSDIF, timestep:DAILY) {
           sim(file:"out1.csv", table:"EFC-luca", column:"basin_cfs")
           obs(file:"$oms_prj/data/efcarson/efc_data.csv", table:"obs", column:"runoff[0]")
        }
     }
 

In this problem we will copy the efc.luca file to the tucca directory under the simulation directory and then edit it and apply it to a calibration run using the parameter files created in our MMS application PRMS and Luca. With the efc.luca file displayed in the OMS Console, click on the efc.luca tab with the right mouse button and select Save as…

This will open a browse window in which you can move to the simulation/tucca directory. In the Save Simulation As window rename the file to tucca.luca and click the Save button.

You now have a copy of the efc.luca file in the tucca simulation directory. Click on the Open Simulation icon and select the newly named tucca.luca file to be loaded into the OMS Console. Once loaded, edit the tucca.luca file to make it applicable for a calibration of the tucca watershed using the OMS Luca method. You will need to change the parameter and data file fields and the startTime, endTime, and calibration_start to reflect initialization and calibration periods for the tucca calibration. Open the class problem run on Monday titled “Luca Calibration of Tucca Basin – Daily model” and use the specifications defined in that problem to create the OMS application of Luca. Use the same dates, and the same parameters to create a 2 step application of OMS Luca for the Tucca basin.

Use the initial parameter file that you created in the GIS Weasel. To use this file you will need to convert that file to the OMS parameter file format using the OMS editor and the procedure described in the previous problem. Once the calibration completes, compare the results with the MMS application of Luca.