# NEMO EST05 N421

This directory contains the scripts, configuration, and input data used to prepare and run the NEMO EST05 N421 setup.

## Layout

- `main_scripts_N421/`
  Entry-point scripts for preparing inputs and launching runs. This includes the operational wrapper, model launch script, boundary and runoff preparation, meteorological forcing preparation, and shared environment discovery.

- `setup_N421/`
  Static run assets used to assemble a run directory. This folder holds namelist templates, XIOS and NEMO executables, XML definitions, helper utilities, and fixed grid-related files that are linked or copied into each run.

- `forcing/`
  Input data arranged by forcing type.
  `forcing/meteo/` stores atmospheric forcing products.
  `forcing/runoff/` stores river and runoff inputs.
  `forcing/boundary/` stores open-boundary files and remapping support files.
  `forcing/domain/` stores shared domain-related auxiliary data.

## Run Flow

The run workflow starts from `main_scripts_N421/do_op_update`, which selects a target date and coordinates the preparation stage and the model launch.

Forcing scripts in `main_scripts_N421/` prepare meteorological, runoff, and boundary inputs for the selected date. The model run is then staged by `run_model_op.sh`, which creates a run directory, copies the required files from `setup_N421/`, links the prepared forcing from `forcing/`, connects restart data when needed, and submits the job script from `setup_N421/`.

## Main Script Roles

- `do_op_update`
  Main wrapper for date selection, forcing preparation, and model launch.

- `run_model_op.sh`
  Creates and populates the run directory and starts the NEMO job.

- `do_meteo_ecmwf.sh`
  Retrieves and prepares atmospheric forcing files.

- `do_runoff.sh`
  Builds runoff temperature forcing from the meteorological inputs.

- `do_boundary_cmemsnrt.sh`
  Retrieves and remaps boundary data and splits it into daily products.

- `do_boundary_convert.sh`
  Runs the boundary TEOS conversion step for generated 3D boundary files.

- `n421_env.sh`
  Resolves the main project, setup, forcing, and run paths used by the shell scripts.

## Setup Contents

Files in `setup_N421/` are the reference pieces used repeatedly across runs: namelist templates, XML configuration files, helper scripts, executable binaries, and fixed NetCDF assets such as grid and roughness files.
