ocean_pseudo_salt_seed Subroutine

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

Called by

proc~~ocean_pseudo_salt_seed~~CalledByGraph proc~ocean_pseudo_salt_seed ocean_pseudo_salt_seed proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~ocean_pseudo_salt_seed proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Source Code

   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`.
      type(multilayer_state_t), intent(inout) :: ms

      if (ms%idx_pseudo_salt <= 0 .or. ms%idx_salinity <= 0) return
      ms%tracers(ms%idx_pseudo_salt)%hTr = ms%tracers(ms%idx_salinity)%hTr
   end subroutine ocean_pseudo_salt_seed