rdb_ocean_pseudo_salt Module

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.

The deviation D = pseudo_salt - S is a direct, measured proxy for how far the passive-tracer transport path has drifted from the active-tracer (salinity) path — an architectural claim turned into a number. Reference: Shao, A. (2016), MOM6 pseudo_salt_tracer.F90; the idea is standard practice in offline/online transport verification and carries no separate citation in MOM6 either.

Excluded by design (fail-loud at configure, rdb_config validate_config) because Roundabout has no mirror for them and an un-mirrored salinity source would make D measure that source instead of the passive-path error: SSS piston restoring (&ocean_restore_nml enable_restore_salt) and sea-ice frazil / basal salt exchange (&ocean_ice_nml enable).


Uses

  • module~~rdb_ocean_pseudo_salt~~UsesGraph module~rdb_ocean_pseudo_salt rdb_ocean_pseudo_salt module~rdb_constants rdb_constants module~rdb_ocean_pseudo_salt->module~rdb_constants module~rdb_error_ring rdb_error_ring module~rdb_ocean_pseudo_salt->module~rdb_error_ring module~rdb_grid rdb_grid module~rdb_ocean_pseudo_salt->module~rdb_grid module~rdb_multilayer_state rdb_multilayer_state module~rdb_ocean_pseudo_salt->module~rdb_multilayer_state pic_logger pic_logger module~rdb_ocean_pseudo_salt->pic_logger pic_types pic_types module~rdb_constants->pic_types module~rdb_error_ring->pic_logger module~rdb_grid->module~rdb_constants module~rdb_multilayer_state->module~rdb_constants module~rdb_multilayer_state->module~rdb_error_ring module~rdb_multilayer_state->module~rdb_grid module~rdb_multilayer_state->pic_logger iso_fortran_env iso_fortran_env module~rdb_multilayer_state->iso_fortran_env module~rdb_efp rdb_efp module~rdb_multilayer_state->module~rdb_efp module~rdb_mem_report rdb_mem_report module~rdb_multilayer_state->module~rdb_mem_report module~rdb_tracer rdb_tracer module~rdb_multilayer_state->module~rdb_tracer module~rdb_efp->iso_fortran_env ieee_arithmetic ieee_arithmetic module~rdb_efp->ieee_arithmetic module~rdb_mem_report->module~rdb_constants module~rdb_mem_report->pic_logger module~rdb_mem_report->iso_fortran_env pic_strings pic_strings module~rdb_mem_report->pic_strings module~rdb_tracer->module~rdb_constants module~rdb_tracer->module~rdb_grid module~rdb_tracer->iso_fortran_env module~rdb_tracer->module~rdb_mem_report

Used by

  • module~~rdb_ocean_pseudo_salt~~UsedByGraph module~rdb_ocean_pseudo_salt rdb_ocean_pseudo_salt module~rdb_ocean_diag_fills rdb_ocean_diag_fills module~rdb_ocean_diag_fills->module~rdb_ocean_pseudo_salt module~rdb_ocean_state rdb_ocean_state module~rdb_ocean_diag_fills->module~rdb_ocean_state module~rdb_ocean_state->module~rdb_ocean_pseudo_salt proc~validate_config validate_config proc~validate_config->module~rdb_ocean_pseudo_salt module~rdb_driver rdb_driver module~rdb_driver->module~rdb_ocean_state module~rdb_ocean_engine rdb_ocean_engine module~rdb_driver->module~rdb_ocean_engine module~rdb_handle rdb_handle module~rdb_handle->module~rdb_ocean_state module~rdb_handle->module~rdb_ocean_engine module~rdb_ocean_api rdb_ocean_api module~rdb_ocean_api->module~rdb_ocean_diag_fills module~rdb_ocean_api->module~rdb_handle module~rdb_ocean_diag_derived rdb_ocean_diag_derived module~rdb_ocean_api->module~rdb_ocean_diag_derived module~rdb_ocean_api->module~rdb_ocean_engine module~rdb_ocean_diag_derived->module~rdb_ocean_diag_fills module~rdb_ocean_diag_derived->module~rdb_ocean_state module~rdb_ocean_engine->module~rdb_ocean_diag_fills module~rdb_ocean_engine->module~rdb_ocean_state module~rdb_ocean_engine->module~rdb_ocean_diag_derived module~rdb_ocean_setup rdb_ocean_setup module~rdb_ocean_engine->module~rdb_ocean_setup module~rdb_ocean_setup->module~rdb_ocean_state

Functions

public pure function pseudo_salt_conflicts_ice(enable_ps, enable_ice) result(conflict)

.true. iff pseudo-salt is enabled alongside the sea-ice model — frazil / basal salt exchange are un-mirrored salinity sources (rdb_ice_frazil.F90, rdb_ice_frazil_uptake.F90, rdb_ice_basal_flux.F90). Drives a configure-time fail-loud abort.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: enable_ps
logical, intent(in) :: enable_ice

Return Value logical

public pure function pseudo_salt_conflicts_restore(enable_ps, enable_restore_salt) result(conflict)

.true. iff pseudo-salt is enabled alongside SSS piston restoring — an un-mirrored salinity source (rdb_ocean_surface_flux.F90 restore branch) that would make the deviation diagnostic measure the restoring term instead of the passive-transport-path error. Drives a configure-time fail-loud abort.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: enable_ps
logical, intent(in) :: enable_restore_salt

Return Value logical

public pure function pseudo_salt_needs_thermo_warning(enable_ps, enable_thermodynamics) result(warn)

.true. iff pseudo-salt is enabled with thermodynamics off. NOT a hard error — pseudo-salt still measures pure transport, a legitimate use — but the caller should warn: without thermodynamics, the tracer never receives the surface salt flux / KPP nonlocal mirrors, so D degenerates to a pure advection/diffusion probe.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: enable_ps
logical, intent(in) :: enable_thermodynamics

Return Value logical


Subroutines

public pure subroutine ocean_pseudo_salt_deviation(h_layer, hTr_ps, hTr_s, buf, nx, ny, nz, missing)

Diagnostic helper: D(i,j,k) = hTr_ps/h - hTr_s/h, i.e. the pseudo-salt concentration minus the salinity concentration.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: h_layer(nx,ny,nz)
real(kind=wp), intent(in) :: hTr_ps(nx,ny,nz)
real(kind=wp), intent(in) :: hTr_s(nx,ny,nz)
real(kind=wp), intent(inout) :: buf(nx,ny,nz)
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz
real(kind=wp), intent(in) :: missing

Value written on a vanished layer (the diagnostics’ NaN).

public subroutine ocean_pseudo_salt_register(ms, grid)

Setup-time entry point: registers the “pseudo_salt” passive tracer (name/units/long_name copied verbatim from Shao 2016) and records its slot on ms%idx_pseudo_salt. MUST be called after ms%init and before enter_data — and, on the ocean path, before ocean_bc_state_init sizes bc%n_tracers (the register_passive_tracer contract). error stops on refusal (mirrors rdb_state.F90’s treatment of a fatal setup misconfiguration — a caller that reaches here has already decided to register, so a silent no-op would be worse than a loud abort).

Arguments

Type IntentOptional Attributes Name
type(multilayer_state_t), intent(inout) :: ms
type(hgrid_t), intent(in) :: grid

public pure subroutine ocean_pseudo_salt_seed(ms)

Seed hTr(idx_pseudo_salt) = hTr(idx_salinity) over the FULL array shape (nx_total, ny_total, nz_ml) — ghosts included, matching MOM6’s isd:ied, jsd:jed seed (§4 of the plan). A halved ghost band would make the deviation diagnostic non-zero at the very first halo exchange, before any real transport has run. Self-gates on either index being unregistered. Must run AFTER every write to salinity’s initial condition (analytical IC, then any z-file overlay) and BEFORE ocean_state_enter_data.

Arguments

Type IntentOptional Attributes Name
type(multilayer_state_t), intent(inout) :: ms