Configure the terrain-following (SIGMA) output grid — cumulative
sigma fractions (0..1, monotone shallow->deep). Stored copy; must
be called BEFORE any register with output_vgrid ==
DIAG_VGRID_SIGMA so the manager knows the output buffer shape.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_diag_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | sigma(:) | |||
| integer, | intent(out), | optional | :: | ierr |
subroutine ocean_diag_set_output_sigma_levels(this, sigma, ierr) !! Configure the terrain-following (SIGMA) output grid — cumulative !! sigma fractions (0..1, monotone shallow->deep). Stored copy; must !! be called BEFORE any `register` with `output_vgrid == !! DIAG_VGRID_SIGMA` so the manager knows the output buffer shape. class(ocean_diag_t), intent(inout) :: this real(wp), intent(in) :: sigma(:) integer, intent(out), optional :: ierr if (present(ierr)) ierr = OCEAN_STATUS_OK if (.not. this%is_init) return if (size(sigma) > NZ_STACK_MAX) then call fail("set_output_sigma_levels: number of sigma levels "// & "exceeds NZ_STACK_MAX; raise NZ_STACK_MAX or use fewer levels", & ierr, OCEAN_STATUS_ERR_SETUP) return end if if (allocated(this%sigma_out)) deallocate (this%sigma_out) this%n_sigma_out = size(sigma) allocate (this%sigma_out(this%n_sigma_out), source=sigma) end subroutine ocean_diag_set_output_sigma_levels