draft_shape_ok Function

private pure function draft_shape_ok(z_draft, ms) result(ok)

True iff z_draft is the FULL ghosted (nx_total, ny_total) array the seeders index with (ng+i, ng+j) — i.e. it matches h_layer’s horizontal extent. Guards the (1, 1) placeholder ocean_metrics_t allocates when the cavity is off from ever being read as a field.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: z_draft(:,:)
type(multilayer_state_t), intent(in) :: ms

Return Value logical


Called by

proc~~draft_shape_ok~~CalledByGraph proc~draft_shape_ok draft_shape_ok proc~seed_ts_from_zfile seed_ts_from_zfile proc~seed_ts_from_zfile->proc~draft_shape_ok proc~seed_ts_linear_z seed_ts_linear_z proc~seed_ts_linear_z->proc~draft_shape_ok proc~seed_zinit_overlay seed_zinit_overlay proc~seed_zinit_overlay->proc~seed_ts_from_zfile proc~seed_zinit_overlay->proc~seed_ts_linear_z proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~seed_zinit_overlay proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg 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

Source Code

   pure function draft_shape_ok(z_draft, ms) result(ok)
      !! True iff `z_draft` is the FULL ghosted `(nx_total, ny_total)`
      !! array the seeders index with `(ng+i, ng+j)` — i.e. it matches
      !! `h_layer`'s horizontal extent.  Guards the `(1, 1)` placeholder
      !! `ocean_metrics_t` allocates when the cavity is off from ever
      !! being read as a field.
      real(wp), intent(in) :: z_draft(:, :)
      type(multilayer_state_t), intent(in) :: ms
      logical :: ok

      ok = (size(z_draft, 1) == size(ms%h_layer, 1)) .and. &
           (size(z_draft, 2) == size(ms%h_layer, 2))
   end function draft_shape_ok