Layer→fixed-z vertical remap, CONSERVATIVE (donor-cell overlap via
remap_column, scheme diag_remap_method). is_extensive=.false.
⇒ INTENSIVE (thickness-weighted average of overlapping source layers);
.true. ⇒ EXTENSIVE (thickness-integrated field — column integral
redistributed across targets, Σ preserved when the z-grid spans H).
z_out(:) = target INTERFACE depths (m, positive-down, shallow→deep,
implicit 0 surface); output cell m spans [z_out(m-1), z_out(m)].
Thicknesses clipped to column total H = Σ h_layer over the LIVE
layers (exact conservation; a vanished layer carries zero weight —
see remap_layer_to_vcoord_impl); below-seafloor cells read 0.
k=1 bed, k=nz surface.
Public only for the unit-test suite.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(*), | intent(in) | :: | state_handle | |||
| real(kind=wp), | intent(in) | :: | z_out(:) | |||
| real(kind=wp), | intent(in) | :: | layer_buf(:,:,:) | |||
| real(kind=wp), | intent(inout) | :: | output_buf(:,:,:) | |||
| logical, | intent(in) | :: | is_extensive |
subroutine remap_layer_to_z(state_handle, z_out, layer_buf, output_buf, is_extensive) !! Layer→fixed-z vertical remap, CONSERVATIVE (donor-cell overlap via !! `remap_column`, scheme `diag_remap_method`). `is_extensive=.false.` !! ⇒ INTENSIVE (thickness-weighted average of overlapping source layers); !! `.true.` ⇒ EXTENSIVE (thickness-integrated field — column integral !! redistributed across targets, Σ preserved when the z-grid spans H). !! `z_out(:)` = target INTERFACE depths (m, positive-down, shallow→deep, !! implicit 0 surface); output cell m spans `[z_out(m-1), z_out(m)]`. !! Thicknesses clipped to column total H = Σ h_layer over the LIVE !! layers (exact conservation; a vanished layer carries zero weight — !! see `remap_layer_to_vcoord_impl`); below-seafloor cells read 0. !! k=1 bed, k=nz surface. !! Public only for the unit-test suite. class(*), intent(in) :: state_handle real(wp), intent(in) :: z_out(:) real(wp), intent(in) :: layer_buf(:, :, :) real(wp), intent(inout) :: output_buf(:, :, :) logical, intent(in) :: is_extensive select type (state => state_handle) class is (ocean_state_t) call remap_layer_to_vcoord_impl(DIAG_VGRID_Z_FIXED, state%multilayer%h_layer, & z_out, layer_buf, output_buf, is_extensive, & diag_remap_method, diag_mask_vanished, & DIAG_MISSING_VALUE) end select end subroutine remap_layer_to_z