p_surf_configure Subroutine

public subroutine p_surf_configure(this, nx, ny)

Allocate eta_ib/eta_seam (host, before enter_data). No-op when .not. enable (bit-identical; zero extra device memory). Mirrors tides_configure_astronomy.

Arguments

Type IntentOptional Attributes Name
class(ocean_p_surf_t), intent(inout) :: this
integer, intent(in) :: nx
integer, intent(in) :: ny

Called by

proc~~p_surf_configure~~CalledByGraph proc~p_surf_configure p_surf_configure proc~configure_ocean_p_surf configure_ocean_p_surf proc~configure_ocean_p_surf->proc~p_surf_configure proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_p_surf 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 p_surf_configure(this, nx, ny)
      !! Allocate `eta_ib`/`eta_seam` (host, before enter_data).  No-op when
      !! `.not. enable` (bit-identical; zero extra device memory).  Mirrors
      !! `tides_configure_astronomy`.
      class(ocean_p_surf_t), intent(inout) :: this
      integer, intent(in) :: nx, ny
      if (.not. this%enable) return
      if (allocated(this%eta_ib)) deallocate (this%eta_ib)
      if (allocated(this%eta_seam)) deallocate (this%eta_seam)
      allocate (this%eta_ib(nx, ny), source=0.0_wp)
      allocate (this%eta_seam(nx, ny), source=0.0_wp)
   end subroutine p_surf_configure