gm_refreshes_varmix Function

private pure function gm_refreshes_varmix(gm, slopes, dyn) result(refreshes)

.true. when the GM block below this step already calls varmix_compute (GM present + enabled + slopes present, at a thermo step) — so the standalone Gap-1 resolution-function refresh must NOT run it again (avoids a double compute and preserves the GM+VarMix slope ordering bit-for-bit).

Arguments

Type IntentOptional Attributes Name
type(ocean_gm_t), intent(in), optional :: gm
type(ocean_slopes_t), intent(in), optional :: slopes
type(ocean_dyn_t), intent(in) :: dyn

Return Value logical


Calls

proc~~gm_refreshes_varmix~~CallsGraph proc~gm_refreshes_varmix gm_refreshes_varmix proc~ocean_dyn_is_thermo_step ocean_dyn_t%ocean_dyn_is_thermo_step proc~gm_refreshes_varmix->proc~ocean_dyn_is_thermo_step

Called by

proc~~gm_refreshes_varmix~~CalledByGraph proc~gm_refreshes_varmix gm_refreshes_varmix proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~gm_refreshes_varmix proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Source Code

   pure function gm_refreshes_varmix(gm, slopes, dyn) result(refreshes)
      !! `.true.` when the GM block below this step already calls
      !! `varmix_compute` (GM present + enabled + slopes present, at a
      !! thermo step) — so the standalone Gap-1 resolution-function refresh
      !! must NOT run it again (avoids a double compute and preserves the
      !! GM+VarMix slope ordering bit-for-bit).
      type(ocean_gm_t), intent(in), optional :: gm
      type(ocean_slopes_t), intent(in), optional :: slopes
      type(ocean_dyn_t), intent(in) :: dyn
      logical :: refreshes
      refreshes = .false.
      if (.not. present(gm)) return
      if (.not. present(slopes)) return
      if (.not. gm%enable) return
      refreshes = dyn%enable_thermodynamics .and. dyn%is_thermo_step()
   end function gm_refreshes_varmix