| rdb_array_utils |
rdb_array_utils.F90 |
fill_gpu(arr, val) replaces allocate(arr, source=val) (serial host
zero-fill) with a do concurrent kernel. Generic over rank 1D/2D/3D;
uses lbound/ubound so any lower bound works (e.g. z_ref(0:nz,...)).
|
| rdb_banner |
rdb_banner.F90 |
|
| rdb_barotropic_coupling |
rdb_barotropic_coupling.F90 |
|
| rdb_barotropic_state |
rdb_barotropic_state.F90 |
Depth-integrated state on an Arakawa C-grid for the ocean dynamical core.
C-grid layout:
* Scalars (h, b, flux divergence) at cell centres, (nx_total, ny_total).
* x-velocity/momentum at east faces, (nx_total+1, ny_total).
* y-velocity/momentum at north faces, (nx_total, ny_total+1).
Lives at ocean_state%barotropic for sim_type='ocean'. |
| rdb_barotropic_substep |
rdb_barotropic_substep.F90 |
Two kernels: Read more… |
| rdb_barotropic_workstate |
rdb_barotropic_workstate.F90 |
Transient barotropic state the split driver reads/writes between
the slow baroclinic step and the fast barotropic substep loop.
Transient (not restartable), unlike the prognostic
barotropic_state_t. C-grid stagger: scalars at centres,
u at east faces, v at north faces, ζ at corners. F_slow_*,
F_bt_*, ubt_at_n, vbt_at_n, etc. are allocated only when
init is passed nz_ml (barotropic-only unit tests skip them). |
| rdb_bathymetry |
rdb_bathymetry.F90 |
Reads bathymetry (bottom elevation) from a NetCDF file and populates
the state%barotropic%b array. Expects a 2D variable on a structured grid.
If no file is configured, falls back to flat bottom. |
| rdb_bt_cont_type |
rdb_bt_cont_type.F90 |
find_uhbt/find_duhbt_du are pure + !$acc routine seq (callable from
the BT substep do concurrent); uhbt_to_ubt keeps a Newton iteration and
is host/single-thread only (OBC setup).
|
| rdb_comm_env |
rdb_comm_env.F90 |
Wraps pic_mpi_lib for MPI init/finalize, rank/size queries,
broadcast, abort, and per-node GPU binding. Read more… |
| rdb_config |
rdb_config.F90 |
Reads simulation parameters from a namelist input file |
| rdb_config_schema |
rdb_config_schema.F90 |
Re-export shim for Roundabout’s strict namelist schema. Re-exports
build_rdb_schema (defined in rdb_config, kept here to avoid a
circular dependency) and owns the nml_dirname helper. |
| rdb_console_stats |
rdb_console_stats.F90 |
The shared print layout for the periodic conservation + stability
console line, used by BOTH the ocean and coastal drivers so the two
regimes report identically. Each regime computes its own totals
(area-weighted device reductions over its own state), then hands the
scalars here; this module owns the reference-snapshot latching, the
relative-drift arithmetic, the exact line format, and the NaN / CFL
panic guards. Read more… |
| rdb_constants |
rdb_constants.F90 |
Working precision kind parameter and physical constants. |
| rdb_continuity |
rdb_continuity.F90 |
Holds scheme-variant flags and reusable workspace for the
C-grid continuity-PPM (Lin & Rood) thickness-flux kernel, plus
the public step routines that the split-explicit driver calls
per barotropic substep. The kernel is the primary mass-flux
producer for the ocean path: it consumes face velocities +
cell-centred thickness and emits per-face mass fluxes that the
tracer-advection kernels then reuse under CWC for free. Read more… |
| rdb_coriolis_adv |
rdb_coriolis_adv.F90 |
Holds variant flags + PV-at-corner workspace for the combined
Coriolis + horizontal-momentum-advection kernel. We follow the
Sadourny (1975) energy/enstrophy-conserving form, optionally
upgraded with the Hollingsworth-Källén-Arakawa correction that
removes the spurious “Hollingsworth instability” on C-grids at
eddy-resolving resolutions. Read more… |
| rdb_decomp |
rdb_decomp.F90 |
Pure Fortran, no MPI dependency. Each rank calls decomp_init with its
process-grid coordinates to learn its local subdomain size and offsets. |
| rdb_driver |
rdb_driver.F90 |
Owns the end-to-end compute-rank path that used to live inline in
app/main.F90: setup (decomp / state allocation / scatter / BC /
forcing / nesting / output / GPU enter_data), the time-stepping
loop (forcing update, solver_step, status print, snapshot output,
restart, gauges), and finalize (exit_data, final snapshot,
diagnostics, profiler report, resource cleanup). Read more… |
| rdb_efp |
rdb_efp.F90 |
Order-invariant real-to-integer summation (Hallberg & Adcroft, 2014,
An Order-invariant Real-to-Integer Conversion Sum, Parallel Computing
40(5-6), doi:10.1016/j.parco.2014.04.007). Read more… |
| rdb_eos |
rdb_eos.F90 |
Holds the EOS variant tag + scalar EOS coefficients (linear
Boussinesq) and the kernels that convert (T, S) -> ρ on the
multilayer C-grid. Coastal uses a sibling linear EOS in
rdb_ml_eos; the ocean path needs a real nonlinear EOS along
the FV pressure-gradient integration path. Default is Wright
(1997) — the same EOS MOM6 uses by default — chosen for cost
(one rational expression, no LUT) and accuracy in the open
ocean. TEOS-10 is a future option. Read more… |
| rdb_error_ring |
rdb_error_ring.F90 |
P0/P0.1 gave every setup procedure an optional, intent(out) :: ierr
returning a coarse STAGE code (rdb_ocean_status) while the specific
reason went only to global_logger%error — reachable from a Fortran
log, not from a C-ABI caller. RuntimeError: error 3 is exactly the
failure this module exists to prevent. Read more… |
| rdb_grid |
rdb_grid.F90 |
Pure metadata describing a structured Cartesian grid: physical and
ghosted dimensions, ghost width, and cell sizes. No allocatables,
no GPU mapping needed. |
| rdb_halo |
rdb_halo.F90 |
Exchanges ghost-cell strips between neighbouring MPI ranks Read more… |
| rdb_handle |
rdb_handle.F90 |
Magic-number sentinel. Arbitrary but unlikely-in-uninitialised-memory,
and distinct from MAGIC_DESTROYED so a stale/garbage pointer and an
already-destroyed handle are both rejected by handle_check. |
| rdb_ice_atm_forcing |
rdb_ice_atm_forcing.F90 |
Fills ocean_sea_ice_t’s coupleable seam
(atm_sf0/atm_dsfdt/atm_sw_dn/atm_fprec) from the &ocean_ice_nml scalar
restoring knobs. SF(T) = lambda(T - T_air) => sf_0 = -lambdaT_air
(upward-positive SEB intercept), dsf_dt = lambda (thermostat slope),
sw_dn = sw_down (uniform), atm_fprec = snowfall (uniform, PR 26). The
seam is identical whether this filler, a bulk formula, or a live
coupler fills it – that is what makes the model coupleable
(PLAN_ICE_PR3c S”coupleable seam”; PLAN_PR26_snowfall.md S13 fixes
atm_fprec’s shape/units/lifecycle for PR-55 to fill from data). Read more… |
| rdb_ice_basal_flux |
rdb_ice_basal_flux.F90 |
fb = RHO_WATERSEAWATER_CPmax(0, SST - T_f)h_top/dt_therm [W/m^2],
the complement of the frazil bank: a warm (above-freezing) ocean surface
under ice melts the base (fb > 0 -> bmelt in ice_temp_sis2 TRAP #3);
a supercooled surface grows it (that path is the frazil bank, PR 1/3b).
Same RHO_WATERSEAWATER_CP convention as ice_frazil_accumulate so growth
and melt share one energy scale. Read more… |
| rdb_ice_column |
rdb_ice_column.F90 |
Port of ice_temp_SIS2 + laytemp_SIS2 + update_lay_enth
(SIS2_ice_thm.F90:169-945, Apache-2.0) under the ICE_CP_BRINE ==
ICE_CP_ICE simplification (rdb_ice_enthalpy module docstring):
every per-layer implicit solve and T<->E inversion is a
closed-form quadratic — no Newton / false-position iteration
anywhere. Ported line-by-line from the validated stdlib-only
Python prototype tmp_local_artifacts/ice_pr3a_prototype/
sis2_column.py; when any formula here and SIS2 itself seem to
disagree, the prototype (which reproduces SIS2’s own commented-out
col_check energy-closure diagnostic to ~1e-14 fractional) is
the tiebreaker. Read more… |
| rdb_ice_enthalpy |
rdb_ice_enthalpy.F90 |
Specific-enthalpy <-> temperature inversions for the sea-ice
thermodynamic column model. Read more… |
| rdb_ice_evp |
rdb_ice_evp.F90 |
Mechanical transliteration of the validated Python prototype
tmp_local_artifacts/proto_evp_core.py (Channel1D) +
tmp_local_artifacts/proto_evp_validate.py (Box2D), grounded
against SIS_dyn_cgrid.F90 (SIS_C_dynamics :603-1614,
limit_stresses :1619-1741, SIS_C_dyn_init :209-270) per
SPEC_ice-pr5-evp.md. Field names mirror SIS2 1:1 (str_d,
str_t, str_s, sh_Dd, sh_Dt, sh_Ds, zeta, del_sh,
mi_ratio_A_q, Tdamp, EC, …). Read more… |
| rdb_ice_frazil |
rdb_ice_frazil.F90 |
Clamp the ocean SURFACE layer at the seawater freezing point and
BANK the removed supercooling deficit for the sea-ice model
(PLAN_SEA_ICE.md “Prerequisites” #2 — the MOM6/SIS2 frazil
limiter on the ocean side of the coupling seam). Read more… |
| rdb_ice_frazil_uptake |
rdb_ice_frazil_uptake.F90 |
Port of add_frazil_SIS2 (SIS2_ice_thm.F90:1342-1444, Apache-2.0),
bulk-salinity mode only. Spends the WHOLE per-cell frazil bank
(ocean_sea_ice_t%frazil_heat, banked by rdb_ice_frazil’s
surface-freezing clamp) once per thermo step by depositing new ice
mass, evenly split across the nk_ice layers of category 1
(cat = 1 — the only category this v1 model fills; part_size is
untouched, same convention as PR 3a). Read more… |
| rdb_ice_init |
rdb_ice_init.F90 |
Seeds ocean_sea_ice_t’s six category prognostics
(part_size/m_ice/m_snow/enth_ice/enth_snow/sal_ice) from
&ocean_ice_ic_nml, so a run can start with a live ice pack
instead of growing one from frazil (PLAN_PR24_ice_ic_path.md). Read more… |
| rdb_ice_itd |
rdb_ice_itd.F90 |
Port of SIS2 adjust_ice_categories (SIS_transport.F90:611-891,
Apache-2.0). SIS2’s shipped algorithm is NOT the Lipscomb (2001)
linear-profile remap — that is a SIS_transport.F90:737 TODO
comment, never code. What SIS2 actually runs (and what this module
ports) is the “for now move all of it” WHOLE-CATEGORY shift: when
a category’s mean ice mass crosses a bin boundary, its ENTIRE
area+mass moves to the adjacent category, merged into that
category’s existing area+mass via an area-weighted destination-
thickness average (mass AND area conserving, SIS2:730-741) with
upwind mass-weighted tracer mixing (equivalent in effect to SIS2’s
deferred advect_tracers_thicker, SIS_tracer_advect.F90:1791-1850
— each category boundary is visited once per pass in a fixed order
with running masses, so a single closed-form mass-weighted mix at
the transfer site reproduces the same result; verified by the
validated Python prototype, tmp_local_artifacts/proto_itd_adjust.py). Read more… |
| rdb_ice_mass |
rdb_ice_mass.F90 |
Ports of the subset of ice_resize_SIS2 (SIS2_ice_thm.F90:1010-1338)
needed by the Winton column step: bottom freezing, top/bottom melt
peel, and equal-mass layer rebalancing
(rebalance_ice_layers, SIS2_ice_thm.F90:1448-1512). Ported from
the validated prototype sis2_resize.py (Apache-2.0 source
attribution as above). Read more… |
| rdb_ice_ocean_coupler |
rdb_ice_ocean_coupler.F90 |
Bridges ocean_sea_ice_t%salt_flux_diag (filled by
rdb_ice_frazil_uptake%ice_frazil_uptake) into
ocean_surface_flux_t%Q_salt — the field the REAL production
kernel ocean_surface_flux_apply_tracers
(rdb_ocean_surface_flux.F90) reads every thermo step. Read more… |
| rdb_ice_optics |
rdb_ice_optics.F90 |
CSIM4 (non-delta-Eddington) branch of ice_optics_SIS2
(SIS_optics.F90:371-409, Apache-2.0) — snow/ice albedo + the
Beer’s-law vertical partition of absorbed shortwave into the
surface, snow, per-layer ice, and transmitted-to-ocean terms. Read more… |
| rdb_ice_snow |
rdb_ice_snow.F90 |
Complements rdb_ice_mass%ice_snow_accumulate (the on-ice snow add):
the share of &ocean_ice_nml snowfall that lands where there is no
ice (open water at ncat>1, ice-free cells at ncat==1, and any
category that fails the column’s own entry gate,
m_ice(i,j,c) > ICE_RHO_ICE*H_VANISHED) does not accumulate — it
melts on contact with seawater. This module delivers that mass’s
latent heat + virtual freshening to the ocean through the EXISTING
heat_flux_diag/salt_flux_diag contributor seam
(rdb_ice_thermo_driver.F90’s ordering contract), the same one
ice_frazil_uptake and the melt-side reduce kernels already use.
Without this, snowfall > 0 over open water would silently
annihilate mass and energy (the sw_thru failure mode,
PLAN_PR26_snowfall.md §2 / roadmap §5 trap 15). Read more… |
| rdb_ice_state |
rdb_ice_state.F90 |
Gated ocean_sea_ice_t slot for the SIS2-derived sea-ice model
(PLAN_SEA_ICE.md). PR 0 was plumbing only; PR 1 added the first
prognostic array — the ocean-side frazil supercooling accumulator
frazil_heat (filled by rdb_ice_frazil) plus its heat-budget
contributor array. PR 2 added the enthalpy library
(rdb_ice_enthalpy). PR 3a lands the Winton column prognostics:
part_size, m_ice, m_snow, enth_ice, enth_snow, sal_ice
— driven only by the new rdb_ice_column test suite (nothing in
the driver calls the column kernels yet). A run with
&ocean_ice_nml enable = .false. (the default) never calls into
this module beyond the parent gates, so existing configurations
stay byte-identical. Read more… |
| rdb_ice_thermo_driver |
rdb_ice_thermo_driver.F90 |
Bridges ice_thermo_columns (PR 3a) into the ocean-coupling seam:
runs the column, then reduces h2o_ocn_to_ice/h2o_ice_to_ocn/heat_to_ocn
over categories into the per-cell heat_flux_diag/m_melt_diag and the
net-melt salt contribution added into salt_flux_diag.
Q_heat = sum_cat(heat_to_ocn)/dt_therm - fb [W/m^2, +down]
m_net = sum_cat(h2o_ocn_to_ice - h2o_ice_to_ocn) [kg/m^2, +freeze]
salt += m_net*(s_surf - ICE_BULK_SALINITY)/dt_therm (ADD, not set)
sw_thru_diag = sum_cat(sw_thru) [W/m^2, +down]
PR 31: sw_thru (the shortwave penetrating the ice to the water) is
now reduced to the per-cell sw_thru_diag and coupled to the ocean
by ice_ocean_sw_flux (rdb_ice_ocean_coupler). It is DELIBERATELY
kept OUT of the heat_flux_diag sum above — heat_flux_diag carries
only the NON-shortwave heat; the coupler delivers the shortwave via a
separate path (the q_sw component, or a direct Q_heat add) so the
energy reaches Q_heat exactly once in either component mode. Read more… |
| rdb_ice_transport |
rdb_ice_transport.F90 |
Port of SIS2’s DEFAULT (velocity, non-merged) ice_cat_transport
(SIS_transport.F90:127) + finish_ice_transport (:255) +
compress_ice (:898), grounded per SPEC_ice-pr4b-transport.md.
Source citations below are SIS_transport.F90 / SIS_continuity.F90
/ SIS_tracer_advect.F90 unless noted; when this module and the
SIS2 source disagree, the source (re-verified against the running
SIS2 tree for this port) wins. Read more… |
| rdb_io_netcdf |
rdb_io_netcdf.F90 |
Provides NetCDF read/write primitives and an error-checking helper.
Used by bathymetry loader and output writer. |
| rdb_massless |
rdb_massless.F90 |
Pure column helpers that merge vanished (sub-H_VANISHED) layers into a
“massive” grid (nzc <= nz) so the column solver never divides by a
vanished thickness: thickness-weighted means onto the merged grid, plus
the inverse interpolation of an interface quantity back to the original
interfaces. Reference: Jackson, Hallberg & Legg (2008), JPO 38, 1033. Read more… |
| rdb_mem_report |
rdb_mem_report.F90 |
Free procedures that estimate, log, and verify the device memory
footprint of the simulation state before the OpenACC
enter_data mapping is attempted — so an over-budget run reports
a readable diagnostic instead of dying opaquely inside the CUDA
runtime (the motivating failure: a 10M-cell ocean config that
exhausted device memory at enter_data with no setup-time hint). Read more… |
| rdb_multilayer_state |
rdb_multilayer_state.F90 |
Per-layer prognostic state for the ocean dynamical core.
Layout mirrors the 2D barotropic_state_t, lifted to (i, j, k): Read more… |
| rdb_nml_schema |
rdb_nml_schema.F90 |
A host-only, schema-driven namelist parser and validator. Validates a
namelist file against a registered schema of groups and keys,
collecting ALL errors (with path:line: prefixes, did-you-mean
suggestions, range/enum/length checks) and rejecting unsupported
syntax (repeat-counts, indexed assignment, derived-type refs). Read more… |
| rdb_ocean_api |
rdb_ocean_api.F90 |
|
| rdb_ocean_bathymetry_inject |
rdb_ocean_bathymetry_inject.F90 |
Oceananigans-style geometry construction (docs/ocean_python_api_plan.md
S5b, 06_python_surface_design.md D6.2) hands bathymetry to the
library as an interior-sized array instead of a topo_config formula
or a NetCDF file. Two pieces live here, deliberately in a NetCDF-FREE
module (unlike rdb_bathymetry, which requires
RDB_ENABLE_NETCDF=ON purely because it also happens to contain the
NetCDF reader): sign normalisation/validation, and ghost fill. Array
injection is explicitly meant to need no filesystem/NetCDF at all — a
caller building a grid in memory and handing it straight to create()
must not be forced onto a NetCDF build just to get its ghosts filled. Read more… |
| rdb_ocean_bipolar |
rdb_ocean_bipolar.F90 |
Pure corner-coordinate generator for the bipolar Arctic cap of a
TRIPOLAR ocean grid (Murray 1996, J. Comput. Phys. 126, 251-273). Read more… |
| rdb_ocean_bottom_drag |
rdb_ocean_bottom_drag.F90 |
|
| rdb_ocean_boundary_data |
rdb_ocean_boundary_data.F90 |
Polymorphic interface for populating ocean_bc_state_t’s per-edge
data_* buffers each outer step via a single update(t, bc) entry
point. Concrete backends (file, callback, tidal table, constant)
handle the data plumbing; the driver invokes update once per step. |
| rdb_ocean_boundary_types |
rdb_ocean_boundary_types.F90 |
Type taxonomy + per-edge BC config + the composed slot on ocean_state_t.
Six BC types implemented end-to-end (WALL, OPEN, TIDAL, CLAMPED, SPONGE,
CHAPMAN); INFLOW/DISCHARGE/NESTED tags are declared for cross-backend
alignment but error stop if encountered. Per-edge granularity: each of
the four outer edges carries one ocean_bc_face_tag_t, read independently
by the dispatch helpers in rdb_ocean_boundary. |
| rdb_ocean_bt_budget_probe |
rdb_ocean_bt_budget_probe.F90 |
print_bt_budget walks the per-kernel slow-tendency arrays before
they sum into F_slow_u/v, decomposes the BT-mode work rate by
source term (PGF, Coriolis-adv, hvisc, bottom drag, surface
stress), splits the basin into a N/S region triple (subpolar / jet
/ subtropical for double_gyre), and prints a tabular per-region
snapshot. Diagnoses which slow-term over/under-energizes a gyre. Read more… |
| rdb_ocean_bt_wide |
rdb_ocean_bt_wide.F90 |
Shadow state for the wide-halo barotropic march-in.
When bt_halo > 0, the BT fast loop runs on WIDE arrays with ghost
width ng_wide = nghost + bt_halo. Ghost cells outside the valid
band evolve stale data that creeps INWARD at 2 cells/substep; one
grouped exchange every bt_halo/2 substeps keeps the physical interior
clean. The mid-substep u exchange is absorbed (within the 2-cell/substep
stencil budget). Read more… |
| rdb_ocean_budgets |
rdb_ocean_budgets.F90 |
Globally-integrated conservation scalars (total mass, KE, salt,
heat) plus a per-kernel contributor registry, used to check a
kernel’s per-cell budget accumulator against the actual state
change (LHS = current_total − values_init vs RHS =
Σ contributors%total_integrated). No production caller by
design (PR-8): this module has no ocean_state_t slot — a
consumer constructs a local type(ocean_budgets_t) (seven of
Roundabout’s ocean conservation tests already do this; see
tests/test_ocean_surface_flux.F90 for the idiom). It is
single-rank with no MPI reduction; a production run’s global
conservation report is rdb_ocean_console_stats.F90:
ocean_console_stats_report, which does allreduce correctly.
init_snapshot(state) captures values_init;
evaluate(state) recomputes values. |
| rdb_ocean_cavity |
rdb_ocean_cavity.F90 |
Static ice-shelf cavity GEOMETRY: the prescribed ice draft
z_draft(i,j) and the arithmetic that turns it into a water column,
a grounding decision and an isostatic load. Read more… |
| rdb_ocean_cavity_flux |
rdb_ocean_cavity_flux.F90 |
|
| rdb_ocean_cavity_melt |
rdb_ocean_cavity_melt.F90 |
|
| rdb_ocean_chksum |
rdb_ocean_chksum.F90 |
Windowed, greppable per-field statistics printed at the split-RK2
phase seams, so (a) two runs can be diffed log-to-log to find the
FIRST diverging operator, and (b) a non-finite value is attributed
to the phase that MINTED it, not the phase that noticed it (the
nan-catch in the truncation / BT fold names the messenger only). Read more… |
| rdb_ocean_console_stats |
rdb_ocean_console_stats.F90 |
Periodic conservation + stability scalars printed to stdout at the
driver’s status_interval cadence (separate from the diag manager’s
NetCDF). Mirrors MOM6’s “MOM Day N:” status line: Read more… |
| rdb_ocean_data_forcing |
rdb_ocean_data_forcing.F90 |
Binds time-varying NetCDF surface fields onto the ocean C-grid
forcing slots: wind stress (ocean_surface_stress_t%tau_x/tau_y)
and the surface heat / freshwater / salt fluxes
(ocean_surface_flux_t). Owns the (file, variable) -> slot
mapping that rdb_ocean_data_input deliberately does not; owns no
file handles, no time axis and no buffers of its own — those all
live in the reader. Read more… |
| rdb_ocean_data_input |
rdb_ocean_data_input.F90 |
Generic, decomposition-aware, device-resident reader for
time-varying NetCDF fields field(x, y[, z], t). Owns the file
handles, the time axis, the bracket bookkeeping, the H->D motion
(only when the bracket advances), and the per-step linear-in-time
blend kernel. Owns NO field names and NO state-slot mapping: a
consumer registers its own (file, variable, destination) triple
via ocean_data_input_register_2d/_3d (or the edge-segment
variants for OBC files) and gets back an opaque id. Read more… |
| rdb_ocean_diag |
rdb_ocean_diag.F90 |
Owns the diagnostics pipeline for the ocean dynamical core.
Built around the following design points (Phase 6 work): Read more… |
| rdb_ocean_diag_derived |
rdb_ocean_diag_derived.F90 |
|
| rdb_ocean_diag_fills |
rdb_ocean_diag_fills.F90 |
Per-variable fill procedures the diag manager invokes on cadence-fire;
the bridge between the diag manager and ocean_state_t. Each fill
select type-casts the class(*) state handle back to
ocean_state_t and populates a pre-allocated buffer. Face-staggered
fields (u_face_x, v_face_y) are averaged to cell centres so every
default variable is (nx, ny, nz).
Defaults: SSH (m), temperature (°C), salinity (PSU), u/v_centre (m/s),
ke (m²/s²); conditionally ice_conc (1) / ice_thick (m) when
&ocean_ice_nml enable. |
| rdb_ocean_diag_mask |
rdb_ocean_diag_mask.F90 |
|
| rdb_ocean_diag_netcdf |
rdb_ocean_diag_netcdf.F90 |
Writes the diag manager’s per-fire output to a per-rank NetCDF
file. Serial only (one file per process). Each diag var carries its
own time_<name> unlimited dim + coord var, so vars firing at
different cadences stay independent. CF-1.8 attributes. Read more… |
| rdb_ocean_dyn |
rdb_ocean_dyn.F90 |
Driver-level state + step routines for the outer (baroclinic) +
inner (barotropic) split-explicit RK2 integrator of the ocean
dynamical core. Carries the substep ratio n_inner, the fast-mode
time-averaging accumulators, and energy/CFL diagnostic slots. |
| rdb_ocean_engine |
rdb_ocean_engine.F90 |
Before this module, there were THREE copies of the ocean setup
sequence: driver_run_ocean ran 21 configure_ocean_*-family
stages, rdb_ocean_create_from_string ran 9, and bench_ocean
ran 9 (mirroring the API). Twelve stages — configure_ocean_bc,
configure_ocean_diag, configure_ocean_hdiff,
configure_ocean_porous, configure_ocean_p_surf,
configure_ocean_sponge, configure_ocean_tides,
configure_ocean_tracers, configure_ocean_wave_drag,
configure_ocean_wetdry, ocean_data_forcing_configure,
ocean_halo_init — were parsed, validated and silently INERT on
the API path: a Python caller could set a boundary condition, a
tide, a sponge, wet/dry, porous barriers, tracer hdiff, surface
pressure, wave drag or file-backed forcing and none of it would
take effect. engine_setup below is driver_run_ocean’s exact
21-stage sequence, in its exact order — order is load-bearing
and heavily commented at each site; see the per-stage comments
carried over from the driver. Read more… |
| rdb_ocean_eos_compute |
rdb_ocean_eos_compute.F90 |
Hosts ocean_eos_compute, the outer shim that pulls the
registered S, T tracer arrays off multilayer_state_t and
forwards them as bare 3D arrays to the regime-agnostic
eos_compute_arrays dispatch in rdb_eos. Read more… |
| rdb_ocean_epbl |
rdb_ocean_epbl.F90 |
Prognostic-energy surface boundary layer: each thermo step the
wind supplies mechanical TKE (mstar·rho0·u*^3·dt) and surface
buoyancy loss supplies convective PE (nstar-weighted); the
scheme spends that energy interface by interface — the
diffusivity at each interface is the largest value whose
implicit-diffusion PE cost the remaining TKE can pay. Mixing
stops where the energy runs out, which IS the mixed-layer
depth. Energetically closed by construction; unconditionally
stable (the sweep performs the forward elimination of the
backward-Euler vertical-diffusion solve it feeds). Read more… |
| rdb_ocean_fold |
rdb_ocean_fold.F90 |
Discrete tripolar north-fold exchange (Murray 1996), LOCAL to the tile
that holds the whole fold row. Pure seam operators only (state
orchestration lives in rdb_ocean_fold_apply). Free procedures,
explicit-shape dummies, j-outer / i-inner do concurrent. Read more… |
| rdb_ocean_fold_apply |
rdb_ocean_fold_apply.F90 |
Orchestration over the pure seam operators in rdb_ocean_fold:
dereferences the state slots (outer-shim per-tracer loop) and calls
the explicit-shape fold kernels. Read more… |
| rdb_ocean_fold_exchange |
rdb_ocean_fold_exchange.F90 |
Owner-routed north-fold exchange for an east-west split north rank
row, plus the px-dispatching single-field fold entry points
(ocean_fold_north_*): px = 1 keeps the local kernels of
rdb_ocean_fold verbatim, px > 1 always uses the exchange (the
self-mirror tile through a local copy). |
| rdb_ocean_fold_plan |
rdb_ocean_fold_plan.F90 |
Pure index math for the owner-routed north-fold exchange — no MPI,
no field data. Given the global fold-row width ni, the x process
count px, the ghost width ng and a north-row tile rx, it lists,
per peer tile and per column FAMILY, which local storage columns this
tile sends and which it receives. The exchange engine
(rdb_ocean_fold_exchange) moves the values; this module only says
where they come from and where they go, so the routing is testable
serially (tests/test_ocean_fold_plan.F90). Read more… |
| rdb_ocean_geothermal |
rdb_ocean_geothermal.F90 |
|
| rdb_ocean_ghost_poison |
rdb_ocean_ghost_poison.F90 |
|
| rdb_ocean_gm |
rdb_ocean_gm.F90 |
Gent & McWilliams (1990) / Griffies (1998) skew-flux thickness
diffusion. The eddy-induced (“bolus”) overturning is realized as a
layer THICKNESS flux (never an explicit velocity), applied as its OWN
sequential operator on the CURRENT thickness, after the dynamics of
every outer step (rdb_continuity :: continuity_gm_apply, driven by
rdb_ocean_dyn :: run_gm_step) — mirroring how MOM6 applies its
thickness_diffuse step after the split-RK2 dynamics step, updating
h in place. Read more… |
| rdb_ocean_halo |
rdb_ocean_halo.F90 |
Ocean staggered halo exchange — the ONLY backend. Read more… |
| rdb_ocean_halo_counters |
rdb_ocean_halo_counters.F90 |
|
| rdb_ocean_halo_state |
rdb_ocean_halo_state.F90 |
|
| rdb_ocean_halo_width |
rdb_ocean_halo_width.F90 |
Roundabout has (at the time of writing) six independent minimum-nghost
rules spread across five files, each enforced at its own call site in
rdb_config.F90/rdb_ocean_boundary_types.F90/rdb_ocean_halo.F90/
rdb_ocean_setup.F90. A Python caller building a grid in memory
(docs/ocean_python_api_plan.md S5b) needs to be able to ask “how
wide must my halo be” WITHOUT reproducing that scatter — the model
Oceananigans uses is a per-scheme trait folded by max() over every
tendency term (inflate_halo_size, automatic_halo_sizing.jl:73-81;
06_python_surface_design.md B2.4). required_halo below is that
fold, reusing the EXISTING per-rule functions (pv_adv_required_nghost,
tracer_recon_required_nghost) rather than re-deriving their numbers,
so this module and the enforcement sites it does not replace can never
silently disagree. Read more… |
| rdb_ocean_hdiff_tracer |
rdb_ocean_hdiff_tracer.F90 |
Kernel state for the per-tracer horizontal-diffusion sweep.
Sits alongside rdb_ocean_horizontal_viscosity (which does
the momentum half of horizontal mixing); this module is the
tracer-side counterpart. Same compute-then-apply pattern,
same scratch-buffer two-pass design for race-free
do concurrent parallelism. |
| rdb_ocean_horizontal_viscosity |
rdb_ocean_horizontal_viscosity.F90 |
Carries the closure parameters and per-step tendency workspace
for the Laplacian horizontal-momentum-viscosity kernel. Sits
alongside rdb_ocean_lateral_mix (which holds the
variable-coefficient state for Leith/Smag closures): this module
is the kernel, that one is the closure. Phase Tier-1 ships
the constant-nu_h variant; later phases will read coefficients
out of ocean_lateral_mix_t%ah_face_* and replace the scalar. Read more… |
| rdb_ocean_ideal_age |
rdb_ocean_ideal_age.F90 |
Passive ideal-age tracer: interior tendency dA/dt = 1 (s/s) at
thermo cadence, surface-layer value held at a Dirichlet condition
A = A_young(t) (0 by default). With the standard advection +
diffusion this gives “time since this parcel last touched the
surface” — a diagnostic of circulation pathways and spurious
diapycnal mixing. Read more… |
| rdb_ocean_isopycnal_slopes |
rdb_ocean_isopycnal_slopes.F90 |
Neutral-density slope S = -∇ρ/∂_zρ and interface stratification
N² at C-grid layer interfaces (u-faces → slope_x/n2_u, v-faces
→ slope_y/n2_v). Purely diagnostic — consumed by GM/Redi/VarMix/
MLE; no flux consumer here. Harmonic-thickness-weighted FD form
(Griffies 1998). Read more… |
| rdb_ocean_kappa_shear |
rdb_ocean_kappa_shear.F90 |
Prognostic interior shear-mixing closure: shear-driven turbulence
is modelled as a diffusivity field kappa(z) and a TKE field Q(z)
at layer interfaces, coupled through two steady-state vertical
diffusion-reaction equations solved per column, iteratively to
convergence, with internal adaptive time-substepping as the
column re-stratifies within one model step. Unlike algebraic
Richardson-number schemes (PP81, LMD94) the diffusivity diffuses
in z with a stratification/rotation/boundary-limited decay length,
so resolved shear layers entrain at the right rate even when the
Richardson number is marginal; the closure is self-limiting and
relaxes the column toward Ri >~ Ri_c. Read more… |
| rdb_ocean_ke_probe |
rdb_ocean_ke_probe.F90 |
Rebuild of the transient per-term KE attribution meter used to
localise the split-corrector anti-damping term
(LAGRANGIAN_PGF_BUG.md §R). Samples the h-weighted layer
kinetic energy between the split stage’s tendency applies and
prints KE_ATTR rows: the dKE between consecutive samples IS the
energy injected/removed by the segment just executed, so one
instrumented run names the anti-damping term directly. Read more… |
| rdb_ocean_lateral_mix |
rdb_ocean_lateral_mix.F90 |
Flow-aware harmonic / biharmonic viscosity for the ocean dyn-core:
per-face ah_face_* (m^2/s) and nu4_face_* (m^4/s), recomputed
each step from the local flow and read by the horizontal-viscosity
kernel in place of the scalar nu_h/nu_4 (closure LMIX_NONE
⇒ scalar fallback ⇒ bit-identical). The coastal path uses
Smagorinsky in rdb_ml_horizontal_viscosity; the ocean path
defaults to Leith, which scales with vorticity gradient and avoids
over-damping coherent eddies. Leith (1968); Smagorinsky (1963);
Fox-Kemper & Menemenlis (2008); Griffies & Hallberg (2000). |
| rdb_ocean_meke |
rdb_ocean_meke.F90 |
Mesoscale eddy kinetic energy parameterization. Carries a single 2D
vertically-averaged eddy-energy field meke(nx,ny) [m^2/s^2], sourced
by the GM potential-energy release, damped by an implicit
(backward-Euler) bottom drag, transported laterally (harmonic-mass
Laplacian + optional biharmonic + advection), and fed back as a
thickness/tracer diffusivity kh = khcoeff·sqrt(2·gamma_t²·E)·Lmix
added (geom mean) into VarMix’s per-face KhTh before GM’s CFL clamp —
closing the GM↔eddy-energy loop. Updated via a Strang split each
thermo step. Read more… |
| rdb_ocean_metrics |
rdb_ocean_metrics.F90 |
ocean_metrics_t — the full 2D metric arrays the curvilinear ocean
dyn-core reads.
Coordinates are GENERATORS that fill these arrays; kernels consume
the metrics only and never recompute 1/dx or dx*dy themselves. Read more… |
| rdb_ocean_min_thickness |
rdb_ocean_min_thickness.F90 |
Conservative minimum-layer-thickness adjustment for the isopycnal
(VCOORD_LAGRANGIAN) ocean path. Read more… |
| rdb_ocean_mle |
rdb_ocean_mle.F90 |
Fox-Kemper, Ferrari & Hallberg (2008) submesoscale mixed-layer-eddy
(MLE) restratification. Submesoscale eddies slump lateral buoyancy
fronts in the surface mixed layer via an overturning streamfunction
Psi(z) = Ce * (H_ml^2 / |f|) * (grad b_bar x z_hat) * mu(z)
injected as extra ML-confined per-layer mass transports uhml/vhml
added to ms%mass_flux_{x,y}_layer BEFORE the continuity divergence +
PPM tracer advection — never touching the velocity fields. The
per-layer weights a(k) satisfy sum_k a(k) = mu(0) - mu(-1) = 0
exactly (a closed overturning cell ⇒ mass/tracer conservative). Read more… |
| rdb_ocean_obc |
rdb_ocean_obc.F90 |
Parent-state ingestion + interpolation state for nesting a regional
ocean run inside a global/basin parent. Distinct from coastal
BC_NESTED: parent state on a coarser mesh (ingest + remap onto our
vertical grid), tides composed in via rdb_ocean_tides, mandatory
T/S clamp, and a Flow-Relaxation-Scheme (FRS) zone of nrelax cells
rather than a hard clamp. Scaffold (kernels not yet implemented). |
| rdb_ocean_obc_baroclinic |
rdb_ocean_obc_baroclinic.F90 |
Open-boundary baroclinic schemes for the ocean dyn-core. Read more… |
| rdb_ocean_p_surf |
rdb_ocean_p_surf.F90 |
Surface-pressure loading for the ocean C-grid dyn-core (PR-17). An
atmospheric surface pressure p_surf(x,y) (Pa) adds a depth-uniform
acceleration -(1/rho0) grad(p_surf) to the horizontal momentum
(Wunsch & Stammer 1997). Because the term is depth-independent it is
a purely BAROTROPIC forcing: it drives the free surface and, at rest,
integrates to the equilibrium inverse-barometer response
eta_ib = -p_surf/(rho0 g) + const (~1 cm depression per hPa of
atmospheric high; Ponte 2006 for the closed-domain mean removal). Read more… |
| rdb_ocean_periodic |
rdb_ocean_periodic.F90 |
GPU-resident periodic ghost-wrap helpers. Seam invariant after every
wrap call: (a) every ghost cell equals its interior partner, and
(b) u(i_w, ·) == u(i_e, ·) bit-for-bit (i_w = nghost+1,
i_e = nghost+nx_phys+1). Read more… |
| rdb_ocean_pgf_reconstruct |
rdb_ocean_pgf_reconstruct.F90 |
The 5-point Boole-quadrature density integrals, through the generic
eos_t handle, that feed the finite-volume pressure-gradient force
(FV_MOM6 variant of rdb_ocean_pressure_force): the in-layer
vertical rule over a PCM / PLM / PPM sub-layer T/S profile
(boole_dpa_intz_layer) and the cross-face rules (boole_dpa_face,
boole_dpa_face_pcm). They are the REFERENCE the per-EOS fast paths
are tested against, and the rule the kernel runs for an EOS without a
twin (the linear EOS). Read more… |
| rdb_ocean_porous |
rdb_ocean_porous.F90 |
Adcroft (2013) three-parameter porous-barrier fit for the ocean
C-grid dyn-core. Read more… |
| rdb_ocean_pressure_force |
rdb_ocean_pressure_force.F90 |
Carries scheme-variant flags + reusable workspace for the
layered hydrostatic pressure-force kernels on C-grid face arrays:
Montgomery potential, finite-volume (lite / Wright / MOM6) and the
NK=2 reduced-gravity form. Read more… |
| rdb_ocean_pseudo_salt |
rdb_ocean_pseudo_salt.F90 |
Pseudo-salt (Shao 2016): a passive tracer seeded to salinity’s
initial condition and given exactly the operators salinity
receives that the registry does NOT deliver automatically — the
surface salt flux and the KPP/EPBL non-local counter-gradient
gamma_s (both mirrored in-place in the kernels that own them,
rdb_ocean_surface_flux / rdb_ocean_vmix — this module adds no
new dyn-step call site). Every other operator (advection, ALE
remap, vertical/horizontal diffusion, vertical exchange, halo,
sponge, OBC) already rides the generic tracer registry, so
pseudo-salt receives it “for free” the moment it is registered. Read more… |
| rdb_ocean_redi |
rdb_ocean_redi.F90 |
Redi neutral (along-isopycnal) tracer diffusion. Continuous
(non-iterative) neutral-surface geometry of the Griffies rotated-diffusion
tensor + the two-phase GPU flux kernel. Clean-room from Redi (1982),
Griffies et al. (1998), Griffies (2004). Read more… |
| rdb_ocean_remap |
rdb_ocean_remap.F90 |
Drives the conservative vertical remap of multilayer.h_layer + every
registered multilayer.tracers(t)%hTr from the current (Lagrangian) grid
to vcoord%target_h. The kernel is the per-column remap_column from
rdb_remap_column (shared with coastal); this module wires it across the
registered tracer slot list plus the face-velocity pass. Read more… |
| rdb_ocean_restart |
rdb_ocean_restart.F90 |
Restart cadence + per-slot checkpoint registry for the ocean
dyn-core. Each prognostic-owning slot registers its arrays at
birth; the manager walks the registry to do the I/O, so new
state-carrying slots join by registering rather than editing here. Read more… |
| rdb_ocean_restart_io |
rdb_ocean_restart_io.F90 |
Walks a restart_registry_t and writes/reads each registered field
as a FULL local array (interior + ghosts) to/from a per-rank NetCDF
file, alongside the scalar checkpoint metadata (time, step
counters), the decomposition attributes that gate a same-decomp
resume, and the grid/vcoord/tracer metadata that gates a same-schema
resume. Read more… |
| rdb_ocean_setup |
rdb_ocean_setup.F90 |
Applies the per-concern &ocean_* namelist knobs onto an
ocean_state_t’s kernel slots (bottom drag, vmix, lateral
viscosity, vertical coord, PGF, barotropic split). Pure
cfg → slot wiring + rank-0 logging — no I/O, no NetCDF — so it
is shared by the production driver and the NetCDF-free benchmark. Read more… |
| rdb_ocean_sponge |
rdb_ocean_sponge.F90 |
Two sponge implementations share this module. Read more… |
| rdb_ocean_stability_audit |
rdb_ocean_stability_audit.F90 |
Motivating failure (tmp_local_artifacts/global_run/FINDINGS.md,
2026-09-11): a global tripolar aquaplanet NaN’d at outer step 7. The
ONLY diagnostic on offer was a bare non-finite-face count — “producer
0/0 upstream, investigate”. A human needed several runs + a
bisection to find the actual cause: nu_h = 2.0e4 with dt = 900 s
at the ~3 km polar cells gives a viscous-diffusion number of 1.65
against an explicit-Laplacian bound of 0.125 — 13x over — and
bound_kh (the per-cell runtime clamp that would have protected
against exactly this) was never enabled. Read more… |
| rdb_ocean_state |
rdb_ocean_state.F90 |
Composes every type the ocean dynamical core needs into a single
object the driver builds and passes around for sim_type='ocean'
runs. Each component owns its allocations + bound init/destroy.
GPU mapping is dispatched via the free ocean_state_enter_data /
ocean_state_exit_data orchestrator below — adding a slot
requires wiring it into both. |
| rdb_ocean_status |
rdb_ocean_status.F90 |
A library cannot abort its host process. Every procedure on the
solver-creation path (config parse/validate, the configure_ocean_*
setup chain, IC seeding) that used to error stop now takes an
optional, intent(out) :: ierr — present ⇒ return one of these codes
instead of aborting; absent ⇒ unchanged legacy error stop behaviour
(every existing caller keeps aborting exactly as it does today). Read more… |
| rdb_ocean_surface_flux |
rdb_ocean_surface_flux.F90 |
|
| rdb_ocean_surface_stress |
rdb_ocean_surface_stress.F90 |
|
| rdb_ocean_tidal_mixing |
rdb_ocean_tidal_mixing.F90 |
Bottom-intensified internal-tide diapycnal diffusivity. A fixed
fraction of the barotropic-to-baroclinic tidal energy conversion
E(x,y) [W m-2] dissipates locally above rough topography; the
resulting turbulent diffusivity decays exponentially upward from
the bed with scale zeta, converted to a per-layer Kd through
the stratification (1/(dz*(N^2+Omega^2))). An INTERIOR closure:
it is ADDED to the other interior diffusivities (KPP/EPBL/PP81/
kappa-shear) and goes through the single vmix_assemble gate. Read more… |
| rdb_ocean_tide_astro |
rdb_ocean_tide_astro.F90 |
Clean-room astronomy for the equilibrium (astronomical) body-force
tide. Computes the four mean longitudes (moon s, sun h, lunar
perigee p, ascending node N) from Schureman’s polynomials, the
per-constituent equilibrium argument V_c (with the load-bearing
±pi/2 diurnal signs), and the slowly-varying nodal amplitude/phase
corrections f_c(N), u_c(N). Host-side scalar generator — called
once at init (to bake the ref-date offset into phase0) and once per
outer step (to advance the running argument); NOT a device kernel. Read more… |
| rdb_ocean_tides |
rdb_ocean_tides.F90 |
Equilibrium (astronomical) body-force tidal forcing state for the
ocean dyn-core (capability C1). Fills a GPU-resident equilibrium
tide elevation eta_eq(x,y) from a small set of harmonic
constituents; the barotropic momentum solve then drives
-g grad(eta - eta_forcing) (pure surface body force), where
eta_forcing = eta_eq + eta_sal folds in the scalar self-attraction
& loading (C2) surface elevation eta_sal = beta_sal*eta (Ray 1998;
Accad & Pekeris 1978). With eta_sal = beta*eta the surface term
becomes the effective-gravity -g(1-beta) grad(eta); beta is lagged
one outer step (uses the stage-start barotropic eta). SAL is
opt-in (use_sal, default off) — off ⇒ eta_forcing == eta_eq,
bit-identical to C1.
MOM6 divergence (intentional): MOM6 scalar SAL scales the whole
(eta - eta_eq) by (1-beta) (its dgeo_de), damping the body tide by
beta too; we apply the Accad-Pekeris load eta_sal = beta*eta to the
ocean surface only (body tide at full strength). Both are valid scalar
approximations; they differ by g*beta*grad(eta_eq) (~9% of the tidal
forcing at beta=0.09). Internal-tide drag (C4) and OBC-tide
reconciliation (C3) remain out of scope; the dead use_itd/
itd_coeff/itd_global_scale scaffolding for C4 was removed (PR-8)
— PR-29 (barotropic linear wave drag) lands its own
lwd_drag_u/v map on a different type instead. Read more… |
| rdb_ocean_top_drag |
rdb_ocean_top_drag.F90 |
|
| rdb_ocean_varmix |
rdb_ocean_varmix.F90 |
VarMix capability [4]: produces the spatially-varying thickness- and
tracer-diffusion coefficient face fields (khth_u/khth_v,
khtr_u/khtr_v, m^2/s) that GM (rdb_ocean_gm) and the future Redi
path consume — replacing the constant khth they fill from for v1. Read more… |
| rdb_ocean_vcoord |
rdb_ocean_vcoord.F90 |
Holds the vertical-coordinate configuration and the per-step
target grid that the ALE remap step relamps multilayer.h_layer
+ every multilayer.tracers(t)%hTr onto. The coastal path has
VCOORD_SIGMA, VCOORD_ZSIGMA, VCOORD_ZSTAR, VCOORD_ZSTAR_SIGMA,
VCOORD_ZSTAR_FULL plus rdb_remap_column; this module is the
C-grid counterpart for the ocean dynamical core. Read more… |
| rdb_ocean_vdiff |
rdb_ocean_vdiff.F90 |
|
| rdb_ocean_vertical_advection |
rdb_ocean_vertical_advection.F90 |
|
| rdb_ocean_vmix |
rdb_ocean_vmix.F90 |
Holds the closure state for the ocean dynamical core’s vertical
mixing kernel. Produces 3D kv, kt (and ks once the
double-diffusion path lands) diffusivity fields at layer
interfaces; the existing rdb_ocean_vdiff Thomas solver
consumes them directly via the kv_source argument. Read more… |
| rdb_ocean_wave_speed |
rdb_ocean_wave_speed.F90 |
Per-column first-baroclinic internal gravity-wave speed cg1
(m/s) and first-mode Rossby radius Rd (m), plus Rd/dx (the
GM/Redi/MEKE resolution ratio). Solves the rigid-lid
Sturm-Liouville eigenproblem discretised from layer thicknesses
and per-interface reduced gravities gprime = (g/rho0)*max(0,drho)
(rho_layer authoritative); largest c^2 via a fixed-budget
Sturm-count bisection (no early exit -> warp-divergence-free).
Reference: Chelton et al. (1998). Read more… |
| rdb_ocean_z_init |
rdb_ocean_z_init.F90 |
Puts a GEOPOTENTIAL T(z)/S(z) profile onto the seeded layer
centres (&ocean_zinit_nml) and writes the multilayer tracer slots
as hTr = value * h_layer. Two sources, &ocean_zinit_nml source: Read more… |
| rdb_profiler |
rdb_profiler.F90 |
|
| rdb_recon_weno |
rdb_recon_weno.F90 |
|
| rdb_remap_column |
rdb_remap_column.F90 |
Pure per-column conservative vertical remap, shared by both backends.
Reconstruction methods:
PCM — piecewise constant (donor cell)
PLM — piecewise linear, minmod limiter
PPM — piecewise parabolic (Colella & Woodward 1984)
PPM_H4 — PPM with non-uniform 4th-order edge values (White & Adcroft 2008)
PQM — piecewise quartic (White & Adcroft 2008) Read more… |
| rdb_safe_math |
rdb_safe_math.F90 |
Single point of control the math functions that break bitwise
reproducibility across compilers, GPU vendors, and optimization
levels would route through IF adopted: exp, log, sin,
cos, sqrt, pow. Read more… |
| rdb_scratch_3d |
rdb_scratch_3d.F90 |
Single owner for (n1, n2, n3) scratch arrays. Every column-
local kernel slot (continuity, coriolis_adv, pressure_force,
lateral-mix vorticity scratch, KPP solve scratch) declares its
per-step workspace as a scratch_3d_buffer_t rather than as a
bare real(wp), allocatable :: foo(:, :, :). Read more… |
| rdb_state |
rdb_state.F90 |
Overlay of the scalar &tracer_nml configuration onto the salinity /
temperature slots of a tracer_t registry. Read more… |
| rdb_tracer |
rdb_tracer.F90 |
Per-tracer state and config for the layered ocean solver. Read more… |
| rdb_vcoord |
rdb_vcoord.F90 |
Defines vcoord_t, a lightweight config type for the vertical coordinate.
Type-bound procedures dispatch via select case on an integer enum (no
runtime polymorphism) so the type is GPU-safe. Read more… |