rdb_ocean_get_bt_eta_ptr Function

public function rdb_ocean_get_bt_eta_ptr(c_handle, ptr, nx, ny, gen) result(status) bind(c, name="rdb_ocean_get_bt_eta_ptr")

Sea-surface height (m): dyn%bt_work%bt_eta, shape (nx_total, ny_total). Diagnostic (sum_k(h_layer) - bt_H_ref), not independently settable — write h or b instead.

Arguments

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

Return Value integer(kind=c_int)


Calls

proc~~rdb_ocean_get_bt_eta_ptr~~CallsGraph proc~rdb_ocean_get_bt_eta_ptr rdb_ocean_get_bt_eta_ptr proc~fill_getter_2d fill_getter_2d proc~rdb_ocean_get_bt_eta_ptr->proc~fill_getter_2d proc~resolve_ocean resolve_ocean proc~rdb_ocean_get_bt_eta_ptr->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
real(kind=wp), private, pointer :: tmp(:,:)

Source Code

   function rdb_ocean_get_bt_eta_ptr(c_handle, ptr, nx, ny, gen) result(status) &
      bind(c, name="rdb_ocean_get_bt_eta_ptr")
      !! Sea-surface height (m): `dyn%bt_work%bt_eta`, shape
      !! `(nx_total, ny_total)`. Diagnostic (`sum_k(h_layer) - bt_H_ref`),
      !! not independently settable — write `h` or `b` instead.
      type(c_ptr), intent(in), value :: c_handle
      type(c_ptr), intent(out) :: ptr
      integer(c_int), intent(out) :: nx, ny, gen
      integer(c_int) :: status

      type(ocean_handle_t), pointer :: h
      real(wp), pointer :: tmp(:, :)

      ptr = c_null_ptr
      nx = 0
      ny = 0
      gen = 0
      status = resolve_ocean(c_handle, h)
      if (status /= OCEAN_STATUS_OK) return
      tmp => h%state%dyn%bt_work%bt_eta
      call fill_getter_2d(ptr, nx, ny, gen, tmp, h%state%dyn%outer_step_count)
   end function rdb_ocean_get_bt_eta_ptr