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:
BaseModelContainer 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.
Serialize the model (excluding null sections) to a single string as would be found in a ROMS-compatible .in file.
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.titleDescription of the ROMS run.
ROMSRuntimeSettings.time_steppingntimes, dt, ndtfast, ninfo.
ROMSRuntimeSettings.bottom_dragrdrg, rdrg2, zob.
ROMSRuntimeSettings.initialnrrec and ininame.
ROMSRuntimeSettings.forcingList of forcing NetCDF files.
ROMSRuntimeSettings.output_root_nameBase name for output NetCDF files.
ROMSRuntimeSettings.s_coordS-coordinate transformation parameters: - theta_s (surface stretching parameter) - theta_b (bottom stretching parameter)
ROMSRuntimeSettings.gridGrid file path.
ROMSRuntimeSettings.marbl_biogeochemistryFilenames for MARBL namelist and diagnostics: - marbl_namelist_fname - marbl_tracer_list_fname - marbl_diag_list_fname
ROMSRuntimeSettings.lateral_viscHorizontal Laplacian kinematic viscosity (m2/s).
ROMSRuntimeSettings.rho0Boussinesq reference density (rho0, kg/m3).
ROMSRuntimeSettings.lin_rho_eosLinear equation of state parameters: - Tcoef (thermal expansion coefficient, kg/m3/K) - Scoef (haline contraction coefficient, kg/m3/PSU)
ROMSRuntimeSettings.gamma2Lateral boundary slipperiness coefficient (free-slip=+1,no-slip=-1).
ROMSRuntimeSettings.tracer_diff2Horizontal Laplacian mixing coefficients (one per tracer, m2/s).
ROMSRuntimeSettings.vertical_mixingVertical mixing parameters: - akv_bak (background vertical viscosity, m2/s) - akt_bak (background vertical mixing for tracers, m2/s)
ROMSRuntimeSettings.my_bak_mixingBackground 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_correctionSurface salinity correction factor.
ROMSRuntimeSettings.sst_correctionSurface temperature correction factor.
ROMSRuntimeSettings.ubindOpen boundary binding velocity (m/s)
ROMSRuntimeSettings.v_spongeMaximum sponge layer viscosity (m2/s)
ROMSRuntimeSettings.climatologyClimatology file path