Versions Compared

Key

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

...

The adapter is a Python package and requires Python 3.6 or higher. Once Python is installed and the package manager pip is available on the Path, the adapter can be installed A number of packages need to be installed prior to installing the adapter. This can be done by using a file called "environment.yml" as follows:

...

Code Block

WesPreAdapter

  • For all files that are written by this adapter, if the file to be written already exists, then it will be overwritten.
  • This program writes log messages to log file called wes.log.
  • This program uses the information in the specified netcdf run file as input and uses this information to do the following:
  • Take the values of the properties RADIUS_OF_CYCLONE and WIND_CONV_FAC to write it to wes_input.inp.
  • Take the values for all parameters and time steps from a netcdf file exported by FEWS and write it them to wes_adapter_track.trk.

WesPostAdapter

  • For all files that are written by this adapter, if the file to be written already exists, then it will be overwritten.
  • This program writes log messages to log file called wes.log.
  • Converts model output (wes_input.spw) in spiderweb grid format to fews netcdf rotated pole grid format.

System requirements

  • The model needs Matlab Compiler runtime 2013b x64 v8.2 to be installed
  • The adapter needs Java version 1.7 or higher.
  • The adapter needs the following Java libraries:
    • castor-0.9.5.jar
    • commons-httpclient-3.0.1.jar
    • Delft_Util.jar
    • fews-WES-adapter.jar
    • log4j-1.2.14.jar
    • netcdf-4.2.jar
    • slf4j-api-1.5.6.jar
    • slf4j-log4j12-1.5.6.jar
    • xercesImpl.jar

Start up activities

titleenvironment.yml
collapsetrue
name: fews

channels:
  - conda-forge
  - defaults

dependencies:
  - python=3.6
  - numpy
  - xarray
  - numba
  - pandas
  - geopandas
  - dask
  - rasterio
  - git
  - git-lfs
  - jupyterlab
  - spyder
  - jinja2
  - cookiecutter
  - matplotlib
  - pytest
  - cftime
  - netcdf4
  - black

This file can be installed as follows:

conda env create -f environment.yml

Once Python and the required packages are installed and the package manager pip is available on the Path, the adapter can be installed as follows:

pip install git+https://gitlab.com/deltares/imod/imod-fews-adapter

To test if the installation was successful, try starting the Python interpreter and type "import imodfews".

Notes to users

  • For all files that are written by this adapter, if the file to be written already exists, it will be overwritten.
  • This adapter only handles osil moisture retention curves (pF curves) as input for hte init_svat.inp file (MetaSWAP), not "MeteoInputP" as input.

Input

Project file

An iMOD project file (*.PRJ) that describes the model and provides links to the input files needs to be available to the adapter. This project file needs to cover at least the time period that you intend to run. If you only have a runfile (*.RUN), a corresponding project file can be created in iMOD (refer to the iMOD user manual).

RUNFILE_TEMPLATE.INI template

The iMOD Adapter creates a runfile using iMOD batch functionality. For this batch function, a RUNFILE_TEMPLATE.INI file is needed with, among other things, the start and end time of the desired runfile. The highlighted fields below can be left blank and are filled in by the adapter before calling the iMOD batch function.

FUNCTION=RUNFILE

ISS=1

ITT=2
IDT=1
SAVESHD=-1
SAVERIV=-1
SAVERCH=1
SAVEDRN=1
SAVEWEL=-1
SAVEFLX=-1
WINDOW=165000.00, 390000.00, 200000.00, 424000.00
CELLSIZE=100.00

run_info.xml

A run_info.xml

s As a first activity it can be useful to delete all files present in the workDir, if for example it would be filled with files from a previous run.

...