Face-velocity pass of the ALE remap. Remaps u_face_x_layer and v_face_y_layer h_old→h_new using arithmetic-mean face thicknesses and the per-column kernel. Public only for the unit-test suite. Velocity treated as the face “concentration” (analogous to T=hTr/h at centres); per-face conservation sum_k(h_face·u_face) preserved (momentum-conserving). Outer-wall faces take the adjacent cell’s thickness verbatim (no across-cell to average).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| real(kind=wp), | intent(in) | :: | h_old(:,:,:) | |||
| real(kind=wp), | intent(in) | :: | h_new(:,:,:) | |||
| real(kind=wp), | intent(inout) | :: | u_face_x(:,:,:) |
Eastward face velocity, shape |
||
| real(kind=wp), | intent(inout) | :: | v_face_y(:,:,:) |
Northward face velocity, shape |
||
| integer, | intent(in), | optional | :: | method | ||
| logical, | intent(in), | optional | :: | conserve_ke |
Enable the KE-conserving baroclinic-anomaly rescale (default
|
|
| logical, | intent(in), | optional | :: | zlevel_faces |
|
|
| logical, | intent(in), | optional | :: | bnd_extrap |
Linear-exact boundary-cell reconstruction (default |
|
| logical, | intent(in), | optional | :: | nonunif |
Non-uniform-grid PLM/PPM weights (default |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | be | ||||
| logical, | private | :: | ke | ||||
| integer, | private | :: | m | ||||
| logical, | private | :: | nu | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny | ||||
| integer, | private | :: | nz | ||||
| logical, | private | :: | zf |
subroutine ocean_apply_ale_remap_faces(grid, h_old, h_new, u_face_x, v_face_y, method, & conserve_ke, zlevel_faces, bnd_extrap, nonunif) !! Face-velocity pass of the ALE remap. Remaps u_face_x_layer and !! v_face_y_layer h_old→h_new using arithmetic-mean face thicknesses and !! the per-column kernel. Public only for the unit-test suite. !! Velocity treated as the face "concentration" (analogous to T=hTr/h at !! centres); per-face conservation sum_k(h_face·u_face) preserved !! (momentum-conserving). Outer-wall faces take the adjacent cell's !! thickness verbatim (no across-cell to average). type(hgrid_t), intent(in) :: grid real(wp), intent(in) :: h_old(:, :, :) real(wp), intent(in) :: h_new(:, :, :) real(wp), intent(inout) :: u_face_x(:, :, :) !! Eastward face velocity, shape `(nx+1, ny, nz)`. real(wp), intent(inout) :: v_face_y(:, :, :) !! Northward face velocity, shape `(nx, ny+1, nz)`. integer, intent(in), optional :: method logical, intent(in), optional :: conserve_ke !! Enable the KE-conserving baroclinic-anomaly rescale (default !! `.false.` ⇒ momentum-only remap, bit-identical). logical, intent(in), optional :: zlevel_faces !! `&vcoord_nml zfixed_closed_faces` — build the face columns as !! `min(h_L, h_R)` and drop the closed layers, so the remap !! neither fills nor drains an inert filler. Default `.false.` !! ⇒ bit-identical. See `remap_x_face_velocity`. logical, intent(in), optional :: bnd_extrap !! Linear-exact boundary-cell reconstruction (default `.false.` !! ⇒ the PCM flatten, bit-identical). logical, intent(in), optional :: nonunif !! Non-uniform-grid PLM/PPM weights (default `.false.` ⇒ the !! equal-thickness specialisations, bit-identical). integer :: m, nx, ny, nz logical :: ke, zf, be, nu m = REMAP_PPM if (present(method)) m = method ke = .false. if (present(conserve_ke)) ke = conserve_ke zf = .false. if (present(zlevel_faces)) zf = zlevel_faces be = .false. if (present(bnd_extrap)) be = bnd_extrap nu = .false. if (present(nonunif)) nu = nonunif nx = grid%nx_total ny = grid%ny_total nz = size(u_face_x, 3) call remap_x_face_velocity(nx, ny, nz, h_old, h_new, u_face_x, m, ke, zf, be, nu) call remap_y_face_velocity(nx, ny, nz, h_old, h_new, v_face_y, m, ke, zf, be, nu) end subroutine ocean_apply_ale_remap_faces