Case/
├── 01_build_grid/
├── 02_build_rivers/
├── 03_atm_forcing/
├── 04_add_fabm_tracer/
├── 05_qc/
This step builds the model grid from .2DM that we get from SMS and bathymetric data (EMODNET).
2dm_to_grid_fvtools.py: Converts SMS 2DM files into grid.boundary_prepro.py: Processes open boundaries.make_grd_adamselv.py: Main driver script for assembling the grid and domain configuration.
.2dmfiles (e.g.,adamselv_v01.2dm)- Bathymetry data (
bathy_hybrid_adamselv_v01.npy) - Depth file (
adamselv_dep_NEW.dat)
- Grid files and initial configuration
.ncand.npyfiles.
⚠️ Important: After the grid is built, a restart file must be generated on the server. This restart is crucial to initialize the model with the built grid and prepare it for simulation.
Add river inflows and process their grid representation.
build_rivers.py: Builds river inflow boundary files.convert_to_node.py: Converts river input locations to grid nodes.
- River discharge/temperature data (e.g.,
Finnmark_temperatures.npy)
- NetCDF or text-based boundary condition inputs for rivers.
Processes and fixes atmospheric data (e.g., evaporation and precipitation) used to force the model.
fix_evaporation.py: Cleans and adjusts evaporation data.check_MEPS_evap.py: Quality checks MEPS model evaporation outputs.run_effie.py: Wrapper or main driver to process meteorological forcing.
- Processed atmospheric data in
output/ - Logs such as
log_effie.txt
This step integrates the FABM biogeochemical model and tracer data into the hydrodynamic model.
add_fabm_river.ipynb: Jupyter notebook to add FABM-related fields and inputs.make_input.py,make_all_water_col.py: Python scripts to build water column inputs.
- Restart and tracer-ready NetCDF files
- FABM-compatible river files
Run quality checks on grid and atmospheric data to ensure consistency before simulation.
qc_output.py: Validates output files.qc_atm_forcing.py: Checks integrity of atmospheric data.
-
Build the Grid
python make_grd_adamselv.py
-
Build Rivers
python build_rivers.py python convert_to_node.py
-
Process Atmospheric Forcing
python fix_evaporation.py python check_MEPS_evap.py python run_effie.py
-
⚠️ Generate Restart on Server- This step is not fully scripted here and must be done after grid generation.
- Upload or move generated grid to the server.
- Use model engine (e.g., FVCOM or similar) to generate a restart file based on the initial grid.
-
Add FABM Tracers
- Use Jupyter notebook
add_fabm_river.ipynbto configure and add tracers. - Run supporting scripts to finalize input.
- Use Jupyter notebook
-
Run Quality Checks
python qc_output.py python qc_atm_forcing.py
- Make sure dependencies such as NumPy, netCDF4, and any custom grid libraries (like FVTools) are installed.
- Always verify file paths and environment variables, especially when running on a cluster or server.