tidal_mixing_compute Subroutine

public pure subroutine tidal_mixing_compute(grid, this, ms, dt)

Run tidal mixing over the domain: fill this%kd_int (interface diffusivity). Call at thermo cadence with the thermo dt. Outer shim: dereferences the tracer-registry hTr arrays on the host (the array-of-DT indirection blocks NVHPC device codegen), then forwards to the column kernel. dt is unused (the steady diagnostic Kd does not integrate in time) but carried for signature parity with the other interior closures.

Arguments

Type IntentOptional Attributes Name
type(hgrid_t), intent(in) :: grid
type(ocean_tidal_mixing_t), intent(inout) :: this
type(multilayer_state_t), intent(in) :: ms
real(kind=wp), intent(in) :: dt

Calls

proc~~tidal_mixing_compute~~CallsGraph proc~tidal_mixing_compute tidal_mixing_compute proc~tidal_mixing_column_kernel tidal_mixing_column_kernel proc~tidal_mixing_compute->proc~tidal_mixing_column_kernel local local proc~tidal_mixing_column_kernel->local proc~eos_specvol_derivs eos_specvol_derivs proc~tidal_mixing_column_kernel->proc~eos_specvol_derivs proc~roquet_spv_point roquet_spv_point proc~eos_specvol_derivs->proc~roquet_spv_point

Called by

proc~~tidal_mixing_compute~~CalledByGraph proc~tidal_mixing_compute tidal_mixing_compute proc~vmix_apply_in_stage vmix_apply_in_stage proc~vmix_apply_in_stage->proc~tidal_mixing_compute proc~run_stage run_stage proc~run_stage->proc~vmix_apply_in_stage proc~run_stage_split run_stage_split proc~run_stage_split->proc~vmix_apply_in_stage proc~ocean_dyn_step ocean_dyn_step proc~ocean_dyn_step->proc~run_stage 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 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

Source Code

   pure subroutine tidal_mixing_compute(grid, this, ms, dt)
      !! Run tidal mixing over the domain: fill `this%kd_int` (interface
      !! diffusivity).  Call at thermo cadence with the thermo dt.
      !! Outer shim: dereferences the tracer-registry hTr arrays on the
      !! host (the array-of-DT indirection blocks NVHPC device codegen),
      !! then forwards to the column kernel.  `dt` is unused (the steady
      !! diagnostic Kd does not integrate in time) but carried for
      !! signature parity with the other interior closures.
      type(hgrid_t), intent(in) :: grid
      type(ocean_tidal_mixing_t), intent(inout) :: this
      type(multilayer_state_t), intent(in) :: ms
      real(wp), intent(in) :: dt

      if (dt < 0.0_wp) return
      if (ms%idx_temperature <= 0 .or. ms%idx_salinity <= 0) return

      call tidal_mixing_column_kernel(grid, this, ms, &
                                      ms%tracers(ms%idx_temperature)%hTr, &
                                      ms%tracers(ms%idx_salinity)%hTr)
   end subroutine tidal_mixing_compute