rdb_ocean_get_grid_info Function

public function rdb_ocean_get_grid_info(c_handle, nx, ny, nz, nghost) result(status) bind(c, name="rdb_ocean_get_grid_info")

Physical (interior, ghost-excluded) grid shape + ghost width.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in), value :: c_handle
integer(kind=c_int), intent(out) :: nx
integer(kind=c_int), intent(out) :: ny
integer(kind=c_int), intent(out) :: nz
integer(kind=c_int), intent(out) :: nghost

Return Value integer(kind=c_int)


Calls

proc~~rdb_ocean_get_grid_info~~CallsGraph proc~rdb_ocean_get_grid_info rdb_ocean_get_grid_info proc~resolve_ocean resolve_ocean proc~rdb_ocean_get_grid_info->proc~resolve_ocean proc~handle_check handle_check proc~resolve_ocean->proc~handle_check

Variables

Type Visibility Attributes Name Initial
type(ocean_handle_t), private, pointer :: h

Source Code

   function rdb_ocean_get_grid_info(c_handle, nx, ny, nz, nghost) result(status) &
      bind(c, name="rdb_ocean_get_grid_info")
      !! Physical (interior, ghost-excluded) grid shape + ghost width.
      type(c_ptr), intent(in), value :: c_handle
      integer(c_int), intent(out) :: nx, ny, nz, nghost
      integer(c_int) :: status

      type(ocean_handle_t), pointer :: h

      nx = 0
      ny = 0
      nz = 0
      nghost = 0
      status = resolve_ocean(c_handle, h)
      if (status /= OCEAN_STATUS_OK) return
      nx = int(h%grid%nx_phys, c_int)
      ny = int(h%grid%ny_phys, c_int)
      nz = int(h%state%multilayer%nz_ml, c_int)
      nghost = int(h%grid%nghost, c_int)
   end function rdb_ocean_get_grid_info