The target layer thickness at eta = 0 of a GEOMETRIC family
that vanishes layers — the ONE definition of “live” that the
partial-step face mask (configure_ocean_closed_faces) and the
on-target initial seed share with the running ALE regrid.
VCOORD_Z_FIXED — ocean_vcoord_z_fixed_target with the
slot’s nominal layering (uniform z_fixed_h_ref/nz or the
stretched z_fixed_zi/z_fixed_dz profile) and its rigid top
z_top: exactly the call configure_ocean_closed_faces has
always made, argument for argument.VCOORD_ZSTAR_FULL — the ZSTAR_FULL branch of
ocean_vcoord_geometric_target, the kernel
compute_target_h dispatches to every regrid, walking the
per-column z_ref table build_zref_full laid from the
bathymetry. The caller must have built that table first.VCOORD_ZSTAR — ocean_vcoord_zstar_target, the kernel the
regrid dispatches to, at eta = 0 (where it is the z_fixed
target with z_top = 0, bit for bit). Its live/filler pattern
is decided at eta = 0 inside the kernel, so it is EXACTLY the
pattern of every later regrid, of either sign of eta.Any other family leaves target_h untouched (the caller refuses
it before getting here). Configure / seed time only: the host
arrays are local, so the do concurrent kernels underneath get
their own implicit data regions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_vcoord_t), | intent(in) | :: | vc |
The vertical-coordinate slot (coord_type + every table). |
||
| real(kind=wp), | intent(inout) | :: | target_h(nx,ny,nz) |
Target thickness at |
||
| real(kind=wp), | intent(in) | :: | total_h(nx,ny) |
Reference column thickness (m) — |
||
| integer, | intent(in) | :: | nx |
i-extent (total, incl. halos). |
||
| integer, | intent(in) | :: | ny |
j-extent (total, incl. halos). |
||
| integer, | intent(in) | :: | nz |
Number of layers; |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | allocatable | :: | eta0(:,:) | |||
| real(kind=wp), | private | :: | h_nominal |
pure subroutine ocean_vcoord_eta0_target(vc, target_h, total_h, nx, ny, nz) !! The target layer thickness at `eta = 0` of a GEOMETRIC family !! that vanishes layers — the ONE definition of "live" that the !! partial-step face mask (`configure_ocean_closed_faces`) and the !! on-target initial seed share with the running ALE regrid. !! !! * `VCOORD_Z_FIXED` — `ocean_vcoord_z_fixed_target` with the !! slot's nominal layering (uniform `z_fixed_h_ref/nz` or the !! stretched `z_fixed_zi`/`z_fixed_dz` profile) and its rigid top !! `z_top`: exactly the call `configure_ocean_closed_faces` has !! always made, argument for argument. !! * `VCOORD_ZSTAR_FULL` — the `ZSTAR_FULL` branch of !! `ocean_vcoord_geometric_target`, the kernel !! `compute_target_h` dispatches to every regrid, walking the !! per-column `z_ref` table `build_zref_full` laid from the !! bathymetry. The caller must have built that table first. !! * `VCOORD_ZSTAR` — `ocean_vcoord_zstar_target`, the kernel the !! regrid dispatches to, at `eta = 0` (where it is the `z_fixed` !! target with `z_top = 0`, bit for bit). Its live/filler pattern !! is decided at `eta = 0` inside the kernel, so it is EXACTLY the !! pattern of every later regrid, of either sign of `eta`. !! !! Any other family leaves `target_h` untouched (the caller refuses !! it before getting here). Configure / seed time only: the host !! arrays are local, so the `do concurrent` kernels underneath get !! their own implicit data regions. integer, intent(in) :: nx !! i-extent (total, incl. halos). integer, intent(in) :: ny !! j-extent (total, incl. halos). integer, intent(in) :: nz !! Number of layers; `k = 1` is the bed. type(ocean_vcoord_t), intent(in) :: vc !! The vertical-coordinate slot (coord_type + every table). real(wp), intent(inout) :: target_h(nx, ny, nz) !! Target thickness at `eta = 0` (m), bottom-up. real(wp), intent(in) :: total_h(nx, ny) !! Reference column thickness (m) — `bt_H_ref` at configure, !! the seed's water column at IC time. real(wp), allocatable :: eta0(:, :) real(wp) :: h_nominal allocate (eta0(nx, ny), source=0.0_wp) select case (vc%coord_type) case (VCOORD_Z_FIXED) h_nominal = vc%z_fixed_h_ref/real(nz, wp) call ocean_vcoord_z_fixed_target(target_h, total_h, eta0, vc%z_top, & nx, ny, nz, h_nominal, & vc%z_fixed_use_profile, vc%z_fixed_zi, & vc%z_fixed_dz, vc%zstar_h_min) case (VCOORD_ZSTAR_FULL) call ocean_vcoord_geometric_target(VCOORD_ZSTAR_FULL, nx, ny, nz, target_h, & total_h, eta0, vc%dsig, vc%z_ref_global, & vc%z_ref, vc%zsigma_depth_transition, & vc%zsigma_blend_width, vc%zstar_h_min) case (VCOORD_ZSTAR) h_nominal = vc%z_fixed_h_ref/real(nz, wp) call ocean_vcoord_zstar_target(target_h, total_h, eta0, nx, ny, nz, h_nominal, & vc%z_fixed_use_profile, vc%z_fixed_zi, & vc%zstar_h_min) case default end select deallocate (eta0) end subroutine ocean_vcoord_eta0_target