ocean_diag_enter_data_impl Subroutine

private subroutine ocean_diag_enter_data_impl(this)

Arguments

Type IntentOptional Attributes Name
type(ocean_diag_t), intent(inout) :: this

Called by

proc~~ocean_diag_enter_data_impl~~CalledByGraph proc~ocean_diag_enter_data_impl ocean_diag_enter_data_impl proc~ocean_diag_enter_data ocean_diag_t%ocean_diag_enter_data proc~ocean_diag_enter_data->proc~ocean_diag_enter_data_impl

Variables

Type Visibility Attributes Name Initial
integer, private :: i

Source Code

   subroutine ocean_diag_enter_data_impl(this)
      type(ocean_diag_t), intent(inout) :: this
      integer :: i
      if (.not. this%is_init) return
      if (allocated(this%vars)) then
         do i = 1, this%nvars
            associate (v => this%vars(i))
               if (allocated(v%output_buffer)) then
                  !$acc enter data copyin(v%output_buffer)
               end if
               if (allocated(v%accumulator)) then
                  !$acc enter data copyin(v%accumulator)
               end if
               if (allocated(v%layer_buffer)) then
                  !$acc enter data copyin(v%layer_buffer)
               end if
               if (allocated(v%mask)) then
                  !$acc enter data copyin(v%mask)
                  associate (m => v%mask)
                     if (allocated(m%weight)) then
                        !$acc enter data copyin(m%weight)
                     end if
                  end associate
               end if
            end associate
         end do
      end if
      if (allocated(this%z_out)) then
         !$acc enter data copyin(this%z_out)
      end if
      if (allocated(this%rho_out)) then
         !$acc enter data copyin(this%rho_out)
      end if
      if (allocated(this%sigma_out)) then
         !$acc enter data copyin(this%sigma_out)
      end if
      if (allocated(this%zstar_out)) then
         !$acc enter data copyin(this%zstar_out)
      end if
      if (allocated(this%send_buf)) then
         !$acc enter data copyin(this%send_buf)
      end if
      this%on_device = .true.
   end subroutine ocean_diag_enter_data_impl