fill_age Subroutine

public subroutine fill_age(state_handle, buf)

Layer ideal age = tracers(idx_age)%hTr / h_layer (s). Read-out only; registered when &ocean_tracers_nml enable_ideal_age (idx_age > 0).

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: state_handle
real(kind=wp), intent(inout) :: buf(:,:,:)

Calls

proc~~fill_age~~CallsGraph proc~fill_age fill_age proc~fill_tracer_impl fill_tracer_impl proc~fill_age->proc~fill_tracer_impl proc~fill_zero_impl fill_zero_impl proc~fill_age->proc~fill_zero_impl tracers tracers proc~fill_age->tracers rdb_vl_conc rdb_vl_conc proc~fill_tracer_impl->rdb_vl_conc rdb_vl_is_live rdb_vl_is_live proc~fill_tracer_impl->rdb_vl_is_live

Variables

Type Visibility Attributes Name Initial
integer, private :: it

Source Code

   subroutine fill_age(state_handle, buf)
      !! Layer ideal age = tracers(idx_age)%hTr / h_layer (s).  Read-out only;
      !! registered when `&ocean_tracers_nml enable_ideal_age` (idx_age > 0).
      class(*), intent(in) :: state_handle
      real(wp), intent(inout) :: buf(:, :, :)
      integer :: it
      select type (state => state_handle)
      class is (ocean_state_t)
         it = state%multilayer%idx_age
         if (it <= 0) then
            call fill_zero_impl(buf)
            return
         end if
         call fill_tracer_impl(state%multilayer%h_layer, &
                               state%multilayer%tracers(it)%hTr, buf)
      end select
   end subroutine fill_age