configure_ocean_tracers Subroutine

public subroutine configure_ocean_tracers(cfg, ocean_state, compute_rank)

&ocean_tracers_nml scalar knobs (PR-7): the ideal-age Dirichlet surface value and its vintage-mode exponential growth rate. enable_ideal_age itself is latched earlier by ocean_state_copy_config (before init(grid), since it gates tracer-slot allocation) — these two scalars gate nothing, so they land here in the post-init configure pass. Both default to 0 ⇒ 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_tracers~~CallsGraph proc~configure_ocean_tracers configure_ocean_tracers info info proc~configure_ocean_tracers->info to_string to_string proc~configure_ocean_tracers->to_string

Called by

proc~~configure_ocean_tracers~~CalledByGraph proc~configure_ocean_tracers configure_ocean_tracers proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_tracers 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_tracers(cfg, ocean_state, compute_rank)
      !! `&ocean_tracers_nml` scalar knobs (PR-7): the ideal-age Dirichlet
      !! surface value and its vintage-mode exponential growth rate.
      !! `enable_ideal_age` itself is latched earlier by
      !! `ocean_state_copy_config` (before `init(grid)`, since it gates
      !! tracer-slot allocation) — these two scalars gate nothing, so
      !! they land here in the post-init configure pass.  Both default
      !! to 0 ⇒ bit-identical.
      type(config_t), intent(in) :: cfg
      type(ocean_state_t), intent(inout) :: ocean_state
      integer, intent(in) :: compute_rank

      ocean_state%dyn%ideal_age_young_val = cfg%ocean%tracers%ideal_age_young_val
      ocean_state%dyn%ideal_age_sfc_growth_rate = cfg%ocean%tracers%ideal_age_sfc_growth_rate
      if (compute_rank == 0 .and. cfg%ocean%tracers%enable_ideal_age) then
         call logger%info("Ideal age:        surface reset after rk2_average + remap")
         if (cfg%ocean%tracers%ideal_age_sfc_growth_rate /= 0.0_wp) then
            call logger%info("Ideal age:        vintage mode, young_val="// &
                             to_string(cfg%ocean%tracers%ideal_age_young_val)// &
                             " growth_rate="// &
                             to_string(cfg%ocean%tracers%ideal_age_sfc_growth_rate)//" 1/s")
         end if
      end if
   end subroutine configure_ocean_tracers