Data Format
SHYFEM-MPI expects input data to be formatted in a specific way, which is described in this section. The input files required include:
Ocean Initial Conditions
The structure of ocean initial condition files is described below and can be found under $SURF_SHYFEM_DIR/preprocessing/ocean_ic/interpolate
.
uvin.dat
Contains the initial conditions for the ocean current components \((U,~V)\), and it is formatted as follows:
0 2 957839 3034 39 2 1
20210217 000000
1.5 3.0 5.0 7.5 [...]
u-velocity [m/s]
39 -999.0 0.013069601849053366 0.015423436118248098 [...]
[...]
v-velocity [m/s]
39 -999.0 0.013623838278081602 0.016801033291202246 [...]
[...]
-
Header Line:
0 2 957839 3034 39 2 1
0 2 957839
: Internal SHYFEM-MPI codes (fixed values).3034
: Number of nodes in the unstructured horizontal grid.39
: Number of vertical levels.2
: Number of variables (\(U\) and \(V\) velocities).1
: Fixed internal code.
-
Timestamp:
20210217 000000
- Represents the date and time of the data. In this example, February 17, 2021, at 00:00:00 (UTC).
-
Vertical levels:
1.5 3.0 5.0 7.5 [...]
- A list of the vertical level depths (39 values in this example).
-
Velocity data:
- Each velocity field is introduced by a header line (
u-velocity
andv-velocity
). - In the block following the header, each line corresponds to a grid node, each column represents a vertical level.
- At the beggining of each line:
39
: Number of vertical levels.-999.0
: internal flag used by SHYFEM-MPI.
- Each velocity field is introduced by a header line (
Initialization From Rest
While this file is automatically generated in the SURF-SHYFEM workflow, the SHYFEM-MPI model is initialized from rest (\(U = V = 0\)) by default, with ocean currents evolving dynamically during the spin-up.
tempin.dat
Contains the initial conditions for the temperature field \(T\), and it uses the same format as the ocean current files, except it contains a single variable instead of two:
saltin.dat
Contains the initial conditions for the salinity field \(S\). The file follows the same structure as the temperature initial conditions.
boundin.dat
Contains the initial conditions for the sea surface height \(SSH\). This file also has the same structure as tempin.dat
and saltin.dat
with the exception that the data in this case is 2d (surface).
Ocean Boundary Conditions
Extraction of Open Boundary Conditions
Open boundary conditions are extracted from the input datasets by interpolation at the boundary nodes.
The structure of open boundary condition files is described below and they can be found in the experiment directory under preprocessing/ocean_obc/tidal_forcing/
.
uv3d_1.dat
| tempn_1.dat
| saltn_1.dat
| boundn_1.dat
These files contain the open boundary forcing values for ocean currents, temperature, salinity and sea surface sea height respectively. Their structure mirrors that of their respective initial condition file counterparts described above, with a few key differences. First, in the horizontal grid, only open boundary data is included instead of all grid nodes. Also, data is provided for the entire duration of the experiment (not only the starting time) to ensure proper boundary forcing.
Note
The _1
suffix indicates the index of the open boundary in the nested domain.
Note however that, currently, SURF-SHYFEM supports only a single open boundary, refer to the Specifying the Domain Polygon section for more details.
Atmospheric Forcing
Differently from ocean data, the SHYFEM-MPI model requires atmospheric inputs to be provided on a structured grid of \(n_x \times n_y\) grid points. The related files can be found in $SURF_SHYFEM_DIR/preprocessing/atmosphere_sbc/extrapolate
and are formatted as follows:
wp.dat
Contains the forcing values for the wind velocity in \(x/y\)-directions and atmospheric pressure. It is formatted as follows:
0 2 957839 208 1 3 11
20210217 000000
16 13 33.51811111111111 43.319 0.25005555555555503 0.25 1e+20
wind velocity in x [m/s]
-9.775567054748535 -9.843438148498535 [...]
[...]
wind velocity in y [m/s]
-5.980294227600098 -6.424141883850098 [...]
[...]
pressure (atmospheric) [Pa]
102062.65625 102050.28125 [...]
[...]
-
Header Line:
0 2 957839 208 1 3 11
0 2 957839
: Internal SHYFEM-MPI codes (fixed values).208
: Number of structured nodes \(n_x \times n_y\).1
: Fixed internal code.3
: Number of variables in the file.11
: Fixed internal code.
-
Timestamp:
20210217 000000
- Represents the date and time of the data. In this example, February 17, 2021, at 00:00:00 (UTC).
-
Structured grid information:
16 13 33.51811111111111 43.319 0.25005555555555503 0.25 1e+20
16 13
: number of points in \(x\) and \(y\) directions respectively.33.51811111111111 43.319
: \(x\) and \(y\) coordinates of first grid point respectively.0.25005555555555503 0.25
: structured grid size in \(x\) and \(y\) directions respectively.1e+20
: internal FillValue.
-
Wind data:
- Each variable is introduced by a header line (
wind velocity in x [m/s]
,wind velocity in y [m/s]
,pressure (atmospheric) [Pa]
). - In the block following each header, each line corresponds to a \(y\)-position (13 in this example) and each column represents a \(x\)-position (16 in this example).
- Each variable is introduced by a header line (
tc.dat
Contains the forcing values for solar radiation, air temperature, dew point temperature and cloud cover. It shares the same structural layout as wp.dat
.