2.3. Readers for input data#
Several types of data are used to prepare files for CROCO realistic simulations:
topographic/bathymetric data to build the model bathymetry
3D ocean data (generally from another (re-)analysis) to build the initial and boundary conditions
tidal harmonics to build the tidal forcing
To read these data, depending on their own formatting, the toolbox uses the
configuration file readers.jsonc.
Several readers are already implemented, but you can add any other reader for managing your input data if needed.
Note
Several readers are designed for “homemade preprocessed data” inherited from croco_tools and available in example datasets provided along with CROCO (e.g. etopo2, cfsr, mercator_croco…)
2.3.1. Topography : section “Topo” of readers.jsonc file#
Input data needed by the tools must be in netcdf format. The extensions of the files could be .nc or .grd.
To build bathymetry from a netcdf file, the dictionnary needs at least four keys:
|
Longitude |
|
Latitude |
|
Name of the 2-D bathymetric field |
|
Direction of z axis (up or down) |
Warning
A supplementary key srtm needs to be added and set to True if the input
dataset is STRM30plus
2.3.2. Initial and boundary conditions: section “IBC” of readers.jsonc file#
Reader for initial and boundary conditions (ibc) handles 2D and 3D fields and their evolution in time. It requires their coordinates:
|
Z-coordinates variables |
|
Longitude name for Rho,U,V grid. If only one grid put the same name everywhere |
|
Latitude name for Rho,U,V grid. If only one grid put the same name everywhere |
|
Time variable and the associated time dimension |
And the following fields:
|
Sea Surface Elevation variable name |
|
Eastward velocity (m/s) variable name |
|
Northward velocity (m/s) variable name |
|
temperature (C) variable name |
|
salinity (PSU) variable name |
You can also add other tracers if needed following the same pattern:
"temp": "thetao",
"salt": "so",
"tracer": "tracer_name_in_dataset",
2.3.3. Tides: section “Tides” of readers.jsonc file#
First the keys for geographical coordinates are specified:
|
Longitude name for Rho, U, V grid. If only one grid put the same name everywhere |
|
Latitude name for Rho, U, V grid. If only one grid put the same name everywhere |
Tide data consist in three fields (elevation, easwtward velocity, northward velocity), and each field has two components. Depending on the input dataset, those two components can be either Amplitude/Phase (like FES) or Real/Imaginary part (like TPXO).
If your dataset follows an Amplitude/Phase, keys to declare are:
|
Elevation amplitude |
|
Elevation phase |
|
Eastward velocity amplitude |
|
Eastward velocity phase |
|
Northward velocity amplitude |
|
Northward velocity phase |
Or if it follows a Real/Imaginary format, keys to declare are:
|
Elevation real part |
|
Elevation imaginary part |
|
Eastward velocity real part |
|
Eastward velocity imaginary part |
|
Northward velocity real part |
|
Northward velocity imaginary part |
Some datasets like TPXO follow a complex a-b*i convention. You therefore need to pay attention to the sign when calculating the phase. A flag for the phase is thus provided:
|
true/false flag. True when need to revert the phase (e.g. TPXO case) |
In addition, for some datasets, like TPXO, U and V are given as transport. To convert them to velocities, the depth is required, thus additional variables are provided in the reader:
|
depth name for Rho, U, V grid. If only one grid put the same name everywhere |