Views:

Question
How can I use one or more items in a time series file (dfs0) to create a time varying dfs2-file?

Answer
There are different ways to create a dfs2 file.

Description
#01 - One way to create a dfs2 file with temporal and spatially varying values is to use the MIKE Zero Toolbox Time Series tool ‘Preprocessing Temporal Data’. The time series data are mapped to a specific position in a dfs2 file.  For each time step the value in the individual grid cells in the resulting dfs2 file will be found by spatial interpolation - see example in Fig 1.

Note: this tool can also be used to create temporal and spatially varying files in dfsu format.
 

A picture containing text, map<br><br>Description automatically generated

Fig 1 - Bathymetry overlayed with generated rainfall map (black dots represent the applied dfs0 files) 

#02 - Another way to create a dfs2 file with temporal and spatially varying values is to use the MIKE SHE Toolbox File Converter tool ‘dfs2+dfs0 to dfs2’.
The value in each grid cell in the resulting dfs2 file will be found by using a grid code file to map the specific time series item data directly to the grid cell.  This tool gives more direct control of the value in each grid cell.  You can map any number of items. See example in Fig. 2.

To specify a patch of rain in a domain you can map an area with a time series specifying the precipitation values and leave the remainder of the domain with zeros.  To obtain this you need to create a dfs0-file with two items:
 
  - Item 1: the time series data you want to apply to the map
  - Item 2: a time series consisting of zeros
 
In addition, you need to create a dfs2-map file with a single Item of type: “Grid Codes” to represent the entire domain. In the areas where you intend to have rainfall you set the cells to a value of 1, while you set the cells in areas where no rain is expected to a value of 2. 

The inputs and results are illustrated in Fig. 2.

Fig. 2
- Top panels:  Input  dfs2-map file (left) and input dfs0-time series (right)
- Bottom panel: Snapshots from the output dfs2-file.

FURTHER INFORMATION & USEFUL LINKS
MIKE Zero Toolbox. User Guide.
MIKE SHE Toolbox. User Guide. 

Related Products: MIKE SHE