Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The WATFLOOD model files, including the WATFLOOD binaries are saved in the /Config/ModuleDataSet directory. These are copied to the /Modules/WATFLOOD/$BASIN$ directory during the exportDataSet activity in the General Adapter file.

 We assume that the module parameter file will be in XML format.

  • The adapter will be written in Java (no FORTRAN)
  • The (pre)Adapter will only write to the nudge_flags.xyz or *_par.csv file, not read from it (and pass info back to FEWS)
  • The adapter runs with (any or all) of the following updating mechanisms. I.e.: the preAdapter also works when either the nudge_flag or the parameter updating is configured.
  • A very important part of the configuration is defined under the <exportRunFileActivity> element. It contains path to the WATFLOOD project file, but can also contain the path to WATFLOOD parameter and nudge_flag files in specific properties. The WATFLOOD adapter is coded to read/parse runFiles in netCDF format. Exporting to pi-xml format and referencing the xml runfile with the preAdapter is not supported.

...


Anchor
Update Nudge_Flags file
Update Nudge_Flags file
Update Nudge_Flags file

The nudge_flags file is part of the model configuration. It is typically located in the following directory: /strfw/nudge_flags.xyz

nudge_flags.xyzImage Added

  • The file is space delineated. Only the first 4 columns are read by WATFLOOD. The rest of the line is ignored. 
  • The nudge flag is stored in column 3 (see image above - green box)
  • The preAdapter will use the stationId (column 4, see image above - red box) to make the connection to update the correct row in the nudge_flags.xyz file.
  • The nudge flags file has 8 characters for the stationId. 
  • Reading the nudge_flags.xyz file is automatically left justified. Trailing blanks are chopped and not used for matching.
  • The WATFLOOD executable (version October 2019) now pick up the stationId instead of lat/lon to match to the flows for nudging. 


Design Choices for nudge_flag updating

  • The adapter will be written in Java (no FORTRAN)
  • The (pre)Adapter will only write to the nudge_flags.xyz file, not read from it (and pass info back to FEWS)
  • The adapter runs with (any or all) of the following updating mechanisms. I.e.: the preAdapter also works when either the nudge_flag or the parameter updating is configured.
  • The parameter files exported from Delft-FEWS are in pi-xml format.
  • The WATFLOOD adapter is coded to read/parse runFiles in netCDF format. Exporting to pi-xml format and referencing the xml runfile with the preAdapter is not supported.

  • All locations in the nudge flags params xml file are present in the nudge_flags.xyz file, no new locations can be dynamically introduced by the params file. 
  • A specific key in the RunInfo file needs to be defined:
    ExportNetcdfRunFile_NudgeImage Added
    • <string key="WFNudgeFlagsFile" value="strfw/nudge_flags.xyz"/>
      indicates to the preAdapter where the nudge file is located.
    • <string key="NudgeFlagsParamsFile" value="strfw/$BASIN$_NudgeFlags_params.xml"/>
      indicates to the preAdapter where the nudge flags parameter file for nudge flags updating is located.
      This then also indicates that nudge flags updating should take place

      Info
      titleWarning

      the location of the nudge_flag and Params files should be defined relative to the directory where the run_info file is written.


Convention for the IdMapping in the params xml file for Nudge Flags

locationId will match with the station Id as present in column 4 of the .xyz file
The parameterId of the value does not matter, in the current design only a single value can be overwritten per locationId. An example of the parameterId can be 'nudge_flag'
The value in the nudge flags params xml file will be used to overwrite the existing nudge_flag in column 3 of the .xyz file. It will be provided as a intValue, but the preAdapter should parse it as 'text'/string

The file is space delineated. Only the first 4 columns are read. The rest of the line is ignored WF uses the lat-lon values to match the flows to the grid cells and not the station id. But we will use the station id to make the connection to update the correct row in the nudge_flags.xyz file. The nudge flags file has 8 characters for the station id column (column 4). We willuse LNRB as the test case for the preAdapter.

Reading the nudge_flags.xyz file is automatically left justified. Trailing blanks are chopped and not used for matching. His updated executables now pick up the stationId instead of lat/lon to match to the flows for nudging. He adapted his code to align with our preAdapter design. Updated executables and nudge_flags.xyz files for all 3 WF models are now on the SVN.

Convention for the IdMapping in the params xml file for Nudge Flags:

locationId will match with the station Id as present in column 4 of the .xyz file
We propose not to use the lat/lon. This overcomplicates matters (rounding, how to combine lat/lon as a single identifier, differences between applications)
The parameterId of the value does not matter, in the current design only a single value can be overwritten per locationId. An example of the parameterId can be 'nudge_flag'
The value in the nudge flags params xml file will be used to overwrite the existing nudge_flag in column 3 of the .xyz file. It will be provided as a intValue, but the preAdapter should parse it as 'text'/string
Design Choices

We assume that all locations in the nudge flags params xml file are present in the nudge_flags.xyz file, no new locations can be dynamically introduced by the params file
We will provide a specific key in the RunInfo file
<string key="WFNudgeFlagsFile" value="%ROOT_DIR%/strfw/nudge_flags.xyz"/>
indicates to the preAdapter where the nudge file is located.
<string key="NudgeFlagsParamsFile" value="%ROOT_DIR%/strfw/$BASIN$_NudgeFlags_params.xml"/>
indicates to the preAdapter where the nudge flags parameter file for nudge flags updating is located.
This then also indicates that nudge flags updating should take place


Configuration instructions for updating Nudge_Flags

...