Skip to content

create_2basins_restarts

Carolina Amadio edited this page May 6, 2025 · 2 revisions

create_2basins_restarts.py

This script generates initial condition (IC) input files by initializing carbon tracer fields (e.g., R*l) with spatially varying vertical profiles over defined sub-basins of the Mediterranean Sea.

In the branch 5-new-bc-nudging-on-r3l-cdom, the script was used to create nudging input files for CDOM, later assimilated into the model.
In this case, two different vertical profiles were defined for the western and eastern basins. The vertical structure follows a sigmoid-shaped function.

Features:

  • Uses a mask file to define the model grid and basin geometry.
  • Defines WES and EAS basins with custom boundaries using bitsea utilities.
  • Applies a vertical profile (CDOM_profile) to assign distinct values in each basin.
  • Produces output like R3l_yyyy0630-00:00:00.nc.

Usage:

Activate the required environment:

source /g100_work/OGS23_PRACE_P/COPERNICUS/sequence3.sh

Run the script:

python create_2basins_restarts.py -m path/to/maskfile.nc -o path/to/output/RST.20020101-00:00:00.VAR.nc

This will produce a NetCDF file ready to be used as an initial condition or as a nudging input for the R3l variable.

Note: The code includes commented lines for generating R1l and R2l, which can be activated if needed.

← Back to IC overview

Example of output:

CDOM profile example

Clone this wiki locally