registry_register_3d Subroutine

private subroutine registry_register_3d(this, tag, arr, ng, nx_phys, ny_phys, optional, device_mapped)

Register a rank-3 owned field. The vertical extent is taken from size(arr,3) (layers or interfaces — both fully owned).

Type Bound

restart_registry_t

Arguments

Type IntentOptional Attributes Name
class(restart_registry_t), intent(inout) :: this
character(len=*), intent(in) :: tag
real(kind=wp), intent(in), target :: arr(:,:,:)
integer, intent(in) :: ng
integer, intent(in) :: nx_phys
integer, intent(in) :: ny_phys
logical, intent(in), optional :: optional
logical, intent(in), optional :: device_mapped

Calls

proc~~registry_register_3d~~CallsGraph proc~registry_register_3d restart_registry_t%registry_register_3d error error proc~registry_register_3d->error to_string to_string proc~registry_register_3d->to_string

Called by

proc~~registry_register_3d~~CalledByGraph proc~registry_register_3d restart_registry_t%registry_register_3d proc~ocean_state_build_restart_registry ocean_state_build_restart_registry proc~ocean_state_build_restart_registry->proc~registry_register_3d proc~register_full_3d register_full_3d proc~ocean_state_build_restart_registry->proc~register_full_3d proc~register_full_3d_opt register_full_3d_opt proc~ocean_state_build_restart_registry->proc~register_full_3d_opt proc~register_full_3d->proc~registry_register_3d proc~register_full_3d_opt->proc~registry_register_3d proc~ocean_state_restart_read ocean_state_restart_read proc~ocean_state_restart_read->proc~ocean_state_build_restart_registry proc~ocean_state_restart_write ocean_state_restart_write proc~ocean_state_restart_write->proc~ocean_state_build_restart_registry proc~ocean_state_restart_write_drop_field ocean_state_restart_write_drop_field proc~ocean_state_restart_write_drop_field->proc~ocean_state_build_restart_registry proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~ocean_state_restart_write proc~engine_setup engine_setup proc~driver_run_ocean->proc~engine_setup proc~engine_setup->proc~ocean_state_restart_read proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup 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 registry_register_3d(this, tag, arr, ng, nx_phys, ny_phys, optional, device_mapped)
      !! Register a rank-3 owned field.  The vertical extent is taken
      !! from `size(arr,3)` (layers or interfaces — both fully owned).
      class(restart_registry_t), intent(inout) :: this
      character(len=*), intent(in) :: tag
      real(wp), target, intent(in) :: arr(:, :, :)
      integer, intent(in) :: ng, nx_phys, ny_phys
      logical, intent(in), optional :: optional, device_mapped

      if (this%n >= MAX_RESTART_ENTRIES) then
         call logger%error("restart registry full ("//to_string(MAX_RESTART_ENTRIES)// &
                           " entries); bump MAX_RESTART_ENTRIES")
         error stop "restart registry overflow"
      end if
      this%n = this%n + 1
      this%entries(this%n)%tag = tag
      this%entries(this%n)%rank = 3
      this%entries(this%n)%p3 => arr
      this%entries(this%n)%ng = ng
      this%entries(this%n)%nx_phys = nx_phys
      this%entries(this%n)%ny_phys = ny_phys
      this%entries(this%n)%nk = size(arr, 3)
      if (present(optional)) this%entries(this%n)%optional = optional
      if (present(device_mapped)) this%entries(this%n)%device_mapped = device_mapped
   end subroutine registry_register_3d