data_input_workspace_ensure Subroutine

private subroutine data_input_workspace_ensure(nx, ny, nz)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz

Called by

proc~~data_input_workspace_ensure~~CalledByGraph proc~data_input_workspace_ensure data_input_workspace_ensure proc~data_input_read_slab_impl data_input_read_slab_impl proc~data_input_read_slab_impl->proc~data_input_workspace_ensure proc~data_input_refresh_brackets data_input_refresh_brackets proc~data_input_refresh_brackets->proc~data_input_read_slab_impl proc~register_common register_common proc~register_common->proc~data_input_read_slab_impl proc~ocean_data_input_register_2d ocean_data_input_register_2d proc~ocean_data_input_register_2d->proc~register_common proc~ocean_data_input_register_3d ocean_data_input_register_3d proc~ocean_data_input_register_3d->proc~register_common proc~ocean_data_input_register_segment_2d ocean_data_input_register_segment_2d proc~ocean_data_input_register_segment_2d->proc~register_common proc~ocean_data_input_register_segment_3d ocean_data_input_register_segment_3d proc~ocean_data_input_register_segment_3d->proc~register_common proc~ocean_data_input_update_all ocean_data_input_update_all proc~ocean_data_input_update_all->proc~data_input_refresh_brackets proc~engine_step engine_step proc~engine_step->proc~ocean_data_input_update_all proc~ocean_data_input_load_static_2d ocean_data_input_load_static_2d proc~ocean_data_input_load_static_2d->proc~ocean_data_input_register_2d proc~register_tag register_tag proc~register_tag->proc~ocean_data_input_register_2d proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~ocean_data_forcing_configure ocean_data_forcing_configure proc~ocean_data_forcing_configure->proc~register_tag proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~seed_cavity_draft seed_cavity_draft proc~seed_cavity_draft->proc~ocean_data_input_load_static_2d

Variables

Type Visibility Attributes Name Initial
logical, private :: need_alloc

Source Code

   subroutine data_input_workspace_ensure(nx, ny, nz)
      integer, intent(in) :: nx, ny, nz
      logical :: need_alloc
      need_alloc = .false.
      if (.not. allocated(data_input_ws)) then
         need_alloc = .true.
      else if (size(data_input_ws, 1) /= nx .or. size(data_input_ws, 2) /= ny .or. &
               size(data_input_ws, 3) /= nz) then
         deallocate (data_input_ws)
         need_alloc = .true.
      end if
      if (need_alloc) allocate (data_input_ws(nx, ny, nz))
   end subroutine data_input_workspace_ensure