lateral_mix_uses_resoln Function

private pure function lateral_mix_uses_resoln(lateral_mix, varmix) result(uses)

.true. when the lateral-mix compute call should be handed the VarMix resolution-function face fields (Gap 1): the lateral-mix slot is present + initialised with resoln_scaled_visc, AND VarMix is present + enabled (so res_fn_u/v carry a valid, up-to-date resolution function). Either absent / off ⇒ unscaled coefficients (bit-identical).

Arguments

Type IntentOptional Attributes Name
type(ocean_lateral_mix_t), intent(in), optional :: lateral_mix
type(ocean_varmix_t), intent(in), optional :: varmix

Return Value logical


Called by

proc~~lateral_mix_uses_resoln~~CalledByGraph proc~lateral_mix_uses_resoln lateral_mix_uses_resoln proc~run_stage_split run_stage_split proc~run_stage_split->proc~lateral_mix_uses_resoln proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split 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 lateral_mix_uses_resoln(lateral_mix, varmix) result(uses)
      !! `.true.` when the lateral-mix compute call should be handed the
      !! VarMix resolution-function face fields (Gap 1): the lateral-mix
      !! slot is present + initialised with `resoln_scaled_visc`, AND VarMix
      !! is present + enabled (so `res_fn_u/v` carry a valid, up-to-date
      !! resolution function).  Either absent / off ⇒ unscaled coefficients
      !! (bit-identical).
      type(ocean_lateral_mix_t), intent(in), optional :: lateral_mix
      type(ocean_varmix_t), intent(in), optional :: varmix
      logical :: uses
      uses = .false.
      if (.not. present(lateral_mix)) return
      if (.not. present(varmix)) return
      if (.not. lateral_mix%is_init) return
      uses = lateral_mix%resoln_scaled_visc .and. varmix%enable
   end function lateral_mix_uses_resoln