fill_temperature Subroutine

public subroutine fill_temperature(state_handle, buf)

Layer temperature = tracers(idx_temperature)%hTr / h_layer. Tracer-registry indirection dereferenced HOST-side before the flat-impl kernel (array-of-DT deep deref blocks NVHPC device codegen). Public only for the unit-test suite.

Arguments

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

Calls

proc~~fill_temperature~~CallsGraph proc~fill_temperature fill_temperature proc~fill_tracer_impl fill_tracer_impl proc~fill_temperature->proc~fill_tracer_impl proc~fill_zero_impl fill_zero_impl proc~fill_temperature->proc~fill_zero_impl tracers tracers proc~fill_temperature->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_temperature(state_handle, buf)
      !! Layer temperature = tracers(idx_temperature)%hTr / h_layer.
      !! Tracer-registry indirection dereferenced HOST-side before the
      !! flat-impl kernel (array-of-DT deep deref blocks NVHPC device
      !! codegen).  Public only for the unit-test suite.
      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_temperature
         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_temperature