Allocate the vertex-mode corner fields and set at_vertex.
Called at CONFIGURE time (after init, before enter_data) —
deliberately NOT from init, so the (nx+1,ny+1,nz+1) corner
carrier is only ever allocated when the vertex form is actually
selected (~327 MB at 1000x800x50).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_kappa_shear_t), | intent(inout) | :: | this | |||
| type(hgrid_t), | intent(in) | :: | grid | |||
| integer, | intent(in) | :: | nz_ml |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny |
subroutine ocean_kappa_shear_init_vertex(this, grid, nz_ml) !! Allocate the vertex-mode corner fields and set `at_vertex`. !! Called at CONFIGURE time (after `init`, before `enter_data`) — !! deliberately NOT from `init`, so the (nx+1,ny+1,nz+1) corner !! carrier is only ever allocated when the vertex form is actually !! selected (~327 MB at 1000x800x50). class(ocean_kappa_shear_t), intent(inout) :: this type(hgrid_t), intent(in) :: grid integer, intent(in) :: nz_ml integer :: nx, ny nx = grid%nx_total ny = grid%ny_total this%at_vertex = .true. if (.not. allocated(this%f_corner)) then allocate (this%f_corner(nx + 1, ny + 1), source=0.0_wp) end if if (.not. allocated(this%kd_corner)) then allocate (this%kd_corner(nx + 1, ny + 1, nz_ml + 1), source=0.0_wp) end if end subroutine ocean_kappa_shear_init_vertex