configure_ocean_hdiff Subroutine

public subroutine configure_ocean_hdiff(cfg, ocean_state, compute_rank)

Along-coordinate tracer Laplacian coefficient (&ocean_hdiff_nml kappa_h). Scalar copy onto ocean_state%hdiff_tracer, mapped with its parent slot at ocean_state_enter_data — no explicit !$acc update needed as long as this runs before that (it does; see rdb_driver.F90). Default kappa_h = 0.0 leaves the kernel’s short-circuit intact ⇒ bit-identical.

Arguments

Type IntentOptional Attributes Name
type(config_t), intent(in) :: cfg
type(ocean_state_t), intent(inout) :: ocean_state
integer, intent(in) :: compute_rank

Calls

proc~~configure_ocean_hdiff~~CallsGraph proc~configure_ocean_hdiff configure_ocean_hdiff info info proc~configure_ocean_hdiff->info to_string to_string proc~configure_ocean_hdiff->to_string

Called by

proc~~configure_ocean_hdiff~~CalledByGraph proc~configure_ocean_hdiff configure_ocean_hdiff proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_hdiff 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

   subroutine configure_ocean_hdiff(cfg, ocean_state, compute_rank)
      !! Along-coordinate tracer Laplacian coefficient (`&ocean_hdiff_nml
      !! kappa_h`).  Scalar copy onto `ocean_state%hdiff_tracer`, mapped
      !! with its parent slot at `ocean_state_enter_data` — no explicit
      !! `!$acc update` needed as long as this runs before that (it does;
      !! see `rdb_driver.F90`).  Default `kappa_h = 0.0` leaves the
      !! kernel's short-circuit intact ⇒ bit-identical.
      type(config_t), intent(in) :: cfg
      type(ocean_state_t), intent(inout) :: ocean_state
      integer, intent(in) :: compute_rank

      ocean_state%hdiff_tracer%kappa_h = cfg%ocean%hdiff%kappa_h
      if (compute_rank == 0 .and. cfg%ocean%hdiff%kappa_h > 0.0_wp) then
         call logger%info("Tracer hdiff:     along-coordinate kappa_h = "// &
                          to_string(cfg%ocean%hdiff%kappa_h)//" m^2/s")
      end if
   end subroutine configure_ocean_hdiff