...
- The correct HEC-HMS binAdapter needs to be placed in \Config\ModuleDataSetFiles\HEC-HMS_bin.zip (binAdapter directory) and the binaries need to be exported to the Modules.
- The subbasins/reaches (from the model *.basin file) and the snowmelt method (in the model *.met file) from the (multiple) HEC-HMS models need to be defined as locations with their own unique (FEWS) locationId. The locationId's under which they are known in the HEC-HMS model need to extracted from the *.basin file and stored as an attribute, so they can be exported correctly. Note that the pre adapter is case insensitive: when a subbasin in the *.basin file has the id 'location a', the pre adapter will match it with a paramter defined as 'LOCATION A'.
- For each of the locations where parameter updating is required, the parameter values need to configured as attributes (define a .csv file and create a suitable locationSet)
- To be able to see the parameters for the various HEC-HMS models in the Delft-FEWS interface, the ModifierTypes.xml can be extended with a locationAttributeModifier section as can be seen below. The modifier can be linked with the relevant HEC-HMS model run Topology Nodes
A (template) ModuleParFile configuration is required, to allow for Parameter updating by the pre adapter. In the GA, under <exportParameterActivity> the modulePar template file is referenced, providing the 'model' and a 'locationSet'. For each of the locations in the locationSet, the '@attributes'@ need to be defined. An example f the configuration can be seen below
Code Block xml xml <?xml version="1.0" encoding="UTF-8"?> <parameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_modelparameters.xsd" version="1.5"> <modifierType>HECHMS_Parameters</modifierType> <group id="HECHMS_Basin_Subbasin_Parameters" name="HEC-HMS Basin Subbasin Parameters"> <locationId>@hec_ext_subbasin_id@</locationId> <model>HECHMS_B_SB</model> <parameter id="Time of Concentration"> <intValue>@time_of_concentration@</intValue> </parameter> <parameter id="Storage Coefficient"> <intValue>@storage_coefficient@</intValue> </parameter> </group> <group id="HECHMS_Basin_Reach_Parameters" name="HEC-HMS Basin Reach Parameters"> <locationId>@hec_ext_reach_id@</locationId> <model>HECHMS_B_R</model> <parameter id="Muskingum K"> <intValue>@muskingum_k@</intValue> </parameter> </group> <group id="HECHMS_Met_Parameters" name="HEC-HMS Met Parameters"> <locationId>@hec_ext_snowmelt_method_id@</locationId> <model>HECHMS_M</model> <parameter id="Base Temperature"> <dblValue>@base_temperature@</dblValue> </parameter> <parameter id="Snow vs Rain Temperature"> <dblValue>@snow_vs_rain_temperature@</dblValue> </parameter> <parameter id="Dry Melt Rain Rate Limit"> <dblValue>@dry_melt_rain_limit@</dblValue> </parameter> <parameter id="Rain Melt Rate"> <dblValue>@rain_melt_rate@</dblValue> </parameter> </group> </parameters>
An example of the resulting parameter file for the Basin - Subbasin parameters that will be exported to the HEC-HMS modules directory:
To instruct the preAdapter to update parameters, some specific keys need to be provided to the runInfo file. In the exportRunFileActivity in the GA we require the following keys for parameter updating:
hmsProjectFile
reference the model *.hms file. This file contains the references to the filenames of the ‘Precipitation’ file (*.met) and the Basin file (*.basin)hmsScriptFile
not required for the parameter updating, but it is required for the adapter in generalBasin_Subbasin_Params_File
When we want to update subbasin parameters in the *.basin file, we need to define this Key and provide the reference to the params file that contains the location/parameter combinations to be updatedBasin_Reach_Params_File
When we want to update reach parameters in the *.basin file, we need to define this Key and provide the reference to the params file that contains the location/parameter combinations to be updatedPrecipitation_SnowMelt_Params_File
When we want to update Snowmelt Method parameters in the *.met file, we need to define this Key and provide the reference to the params file that contains the location/parameter combinations to be updated
Note that is is required that the locationId of the Snowmelt Method is equal to the method as defined in the HEC-HMS *.met file
The pre adapter is instructed by the defined properties to update the parameters, using the exported params files.
- The check for locationId's is case insensitive. Info messegaes will be written by the pre adapter specifying which locations/parameters were updated.
- When a location is defined in the params file, but does not exist in the HEC-HMS file, a warning is produced.
- When a parameter is defined in the params file, but does not exist in the HEC-HMS file, a warning is produced.