ROMSRuntimeSettings

Attention

This project is still in an early phase of development.

The python API is not yet stable, and some aspects of the schema for the blueprint and workplan will likely evolve. Therefore whilst you are welcome to try out using the package, we cannot yet guarantee backwards compatibility. We expect to reach a more stable version in 2026.

ROMSRuntimeSettings#

class cstar.roms.runtime_settings.ROMSRuntimeSettings(*, title: Title, time_stepping: TimeStepping, bottom_drag: BottomDrag, initial: InitialConditions, forcing: Forcing, output_root_name: OutputRootName, s_coord: SCoord | None = None, grid: Grid | None = None, MARBL_biogeochemistry: MARBLBiogeochemistry | None = None, lateral_visc: LateralVisc | None = None, rho_0: Rho0 | None = None, lin_rho_eos: LinRhoEos | None = None, gamma_2: Gamma2 | None = None, tracer_diff_2: TracerDiff2 | None = None, vertical_mixing: VerticalMixing | None = None, MY_bak_mixing: MYBakMixing | None = None, sss_correction: SSSCorrection | None = None, sst_correction: SSTCorrection | None = None, ubind: UBind | None = None, v_sponge: VSponge | None = None, climatology: Climatology | None = None)#

Bases: BaseModel

Container for reading, manipulating, and writing ROMS .in runtime configuration files.

This class represents the structured input used by ROMS for a single model run. It supports loading settings from disk via from_file(), editing or inspecting values via named attributes, and writing a valid ROMS .in file via to_file().

Each attribute corresponds to a section in the .in file, and is an instance of a ROMSRuntimeSettingsSection subclass corresponding to that section.

Methods

ROMSRuntimeSettings.from_file(filepath)

Read ROMS runtime settings from a .in file.

ROMSRuntimeSettings.serialize_to_string()

Serialize the model (excluding null sections) to a single string as would be found in a ROMS-compatible .in file.

ROMSRuntimeSettings.set_fixed_output_root_name()

Apply an "after" validator to automatically change the value of the output_root_name attribute to the a fixed name.

ROMSRuntimeSettings.to_file(filepath)

Write the current settings to a ROMS-compatible .in file.

Attributes

ROMSRuntimeSettings.title

Description of the ROMS run.

ROMSRuntimeSettings.time_stepping

ntimes, dt, ndtfast, ninfo.

ROMSRuntimeSettings.bottom_drag

rdrg, rdrg2, zob.

ROMSRuntimeSettings.initial

nrrec and ininame.

ROMSRuntimeSettings.forcing

List of forcing NetCDF files.

ROMSRuntimeSettings.output_root_name

Base name for output NetCDF files.

ROMSRuntimeSettings.s_coord

S-coordinate transformation parameters: - theta_s (surface stretching parameter) - theta_b (bottom stretching parameter)

ROMSRuntimeSettings.grid

Grid file path.

ROMSRuntimeSettings.marbl_biogeochemistry

Filenames for MARBL namelist and diagnostics: - marbl_namelist_fname - marbl_tracer_list_fname - marbl_diag_list_fname

ROMSRuntimeSettings.lateral_visc

Horizontal Laplacian kinematic viscosity (m2/s).

ROMSRuntimeSettings.rho0

Boussinesq reference density (rho0, kg/m3).

ROMSRuntimeSettings.lin_rho_eos

Linear equation of state parameters: - Tcoef (thermal expansion coefficient, kg/m3/K) - Scoef (haline contraction coefficient, kg/m3/PSU)

ROMSRuntimeSettings.gamma2

Lateral boundary slipperiness coefficient (free-slip=+1,no-slip=-1).

ROMSRuntimeSettings.tracer_diff2

Horizontal Laplacian mixing coefficients (one per tracer, m2/s).

ROMSRuntimeSettings.vertical_mixing

Vertical mixing parameters: - akv_bak (background vertical viscosity, m2/s) - akt_bak (background vertical mixing for tracers, m2/s)

ROMSRuntimeSettings.my_bak_mixing

Background vertical mixing for MY2.5 scheme parameters: - akq_bak (background vertical TKE mixing, m2/s) - q2nu2 (horizontal Laplacian TKE mixing, m2/s) - q2nu4 (horizontal biharmonic TKE mixing, m4/s)

ROMSRuntimeSettings.sss_correction

Surface salinity correction factor.

ROMSRuntimeSettings.sst_correction

Surface temperature correction factor.

ROMSRuntimeSettings.ubind

Open boundary binding velocity (m/s)

ROMSRuntimeSettings.v_sponge

Maximum sponge layer viscosity (m2/s)

ROMSRuntimeSettings.climatology

Climatology file path