Summary

This page describes the Hydrotel module adapter, its functions, and provides an example for configuring a Hydrotel run in FEWS.

The pre-adapter converts netcdf file exported by FEWS:

  • netcdf run file (given to the preadpter as input)
  • meteo.nc (required)
  • corrections.nc (required)
  • debit.nc (optional)

Furthermore, the pre-adapter writes log messages to a log file called hydrotel_preadapter.log.

The post-adapter converts all *.csv files to one netcdf file "resultats.nc" which names are present in the "sortiesHydrotel" ; separated string property value.The values are weighted by columns specified in "info/uhrh_amont.txt".

It also copies the state files with a timestamp in the filename after start time to the output states directoy

This adapter is specifically created and tested for a time step of 3 hours, some extra changes will be necessary to make it compatible with other time steps.

Pre-adapter

Model pre-adapter for running a Hydrotel model from Delft-FEWS.

Class name: nl.deltares.hydrotel.HydrotelPreAdapter

For the source code see HydrotelPreAdapter 

The pre-adapter converts netcdf file exported by FEWS:

The Hydrotel PreAdapter will look for property "sortiesHydrotel" in netcdf run file and expects a ; separated string with all the the output parameters that are desired for Hydrotel.

It will write the output parameter to output.csv with a ; and a 1 behind them. For an example see:  hydrotel output.csv

It will also write start and end times to simulation.csv:

'DATE DEBUT' - start date
'DATE FIN' - end date + 3 h
'ECRITURE ETAT FONTE NEIGE' - start date + 1 day
'ECRITURE ETAT BILAN VERTICAL' - start date + 1 day
'ECRITURE ETAT RUISSELEMENT SURFACE' - start date + 1 day
'ECRITURE ETAT ACHEMINEMENT RIVIERE' - start date + 1 day

But if property "sauvegardeEtatFinSimulation" is set to true in netcdf run file, it will write the end date instead of start date + 1 day

For an example see: Simulation.csv

Notes for users

  • For all files that are written by this adapter, if the file to be written already exists, then it will be overwritten.
  • The preadapter writes log messages to a log file called hydrotel_preadapter.log.
  • This program uses the information in the specified netcdf run file as input and uses this information to do the following actions:

System requirements

  • This program needs Java version 1.8 or higher.
  • This program needs the following Java libraries:
    • castor-0.9.5.jar
    • commons-httpclient-3.0.1.jar
    • Delft_NetCDF_Util.jar
    • Delft_TestSupport.jar
    • Delft_Util.jar
    • joda-time-2.8.1.jar
    • junit-4.8.2.jar
    • log4j-1.2.14.jar
    • netcdf-4.6.3.jar
    • slf4j-api-1.5.6.jar
    • slf4j-log4j12-1.5.6.jar
    • xercesImpl.jar

Hydrotel post-adapter

Class name: nl.deltares.hydrotel.HydrotelPostAdapter

The post-adapter converts all *.csv files to one netcdf file "resultats.nc" which names are present in the "sortiesHydrotel" ; separated string property value.

By default the values are weighted by columns specified in "info/uhrh_amont.txt" and all combined to 1 value per time step and parameter.

But if the property "importerValeursExutoireSeulement" is present in the run_info file and has values "false" all values from the csv file are written to the "resultats.nc" as unique locations and not being weighted. For example see "resultats_unique_locations.nc".

When the integer property "resultsOffset" is present it add the value in minutes to the output times.

It also copies the state files with a timestamp in the filename after start time to the output states directoy when boolean property "sauvegardeEtats" is set to "true" in the netcdf run info file.

For the source code see HydrotelPostAdapter 

Example configuration generalAdapterRun

A complete example model run configuration file can be found here: Hydrotel general adapter config example 

  • No labels