polaris.tasks.ocean.realistic_global.forward.initial_condition.DatabaseInitialCondition
- class polaris.tasks.ocean.realistic_global.forward.initial_condition.DatabaseInitialCondition(mesh_name: str, mpaso_id, min_res: float, approx_cell_count: int | None, omega_id=None, eos_type: str | None = None, database: str = 'realistic_global')[source]
An initial condition staged in the Polaris input-file database, under
{database}/{model}/{mesh_name}.A single database file supplies everything the model reads: the mesh, the initial state, the vertical coordinate for Omega, and the wind stress. The two models are given different files, produced by
utils/omega/convert_mpaso_ic_to_omega.pyfrom the same MPAS-Ocean source, and named accordingly:MPAS-Ocean:
ocean.{mesh_name}.{mpaso_id}.zerovel.nc, a zero-initial- velocity file, plus a prebuiltgraph.info.{mpaso_id}.Omega:
ocean.{mesh_name}.{mpaso_id}.{eos_type}.{omega_id}.nc. Omega partitions internally, so it needs no graph file.
The asymmetry in those names –
zerovelon one side, an equation of state and a second id on the other – is not a design, it is what is on the server. Renaming means re-staging every file, so it waits until therealistic_global/initworkflow can produce database initial conditions itself.The run is wind-forced like any other realistic_global forward run, but the wind stress travels inside the initial-condition file rather than in a forcing file of its own, so
get_forcing_filename()points the forcing streams at the initial condition.- Variables:
mesh_name (str) – The mesh name embedded in the database path and filenames.
mpaso_id (int or str) – The id of the MPAS-Ocean initial condition the files derive from.
omega_id (int or str or None) – The id of the Omega conversion; required to run Omega.
eos_type (str or None) – The equation of state embedded in the Omega filename; when
Noneit is read from[ocean] eos_type.database (str) – The top-level database subdirectory.
- __init__(mesh_name: str, mpaso_id, min_res: float, approx_cell_count: int | None, omega_id=None, eos_type: str | None = None, database: str = 'realistic_global') None[source]
Create the source.
- Parameters:
mesh_name (str) – The mesh name embedded in the database path and filenames.
mpaso_id (int or str) – The id of the MPAS-Ocean initial condition.
min_res (float) – The mesh minimum resolution in km.
approx_cell_count (int or None) – The approximate number of cells in the mesh, used to size resources during setup before the mesh file is downloaded.
omega_id (int or str, optional) – The id of the Omega conversion. Required only to run Omega.
eos_type (str, optional) – The equation of state embedded in the Omega filename; read from
[ocean] eos_typewhen not given.database (str, optional) – The top-level database subdirectory.
Methods
__init__(mesh_name, mpaso_id, min_res, ...)Create the source.
add_input_files(step)Add the database files the configured model reads.
get_forcing_filename(step)The initial-condition file, which is where the wind stress lives.
Attributes
graph_targetmin_resapprox_cell_count