diag_remap_proc Interface

interface
public subroutine diag_remap_proc(state_handle, z_out, layer_buf, output_buf, is_extensive)

Arguments

Type IntentOptional 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

Description

Vertical-remap routine signature. Called by the manager after fill when a var’s output_vgrid is not LAYER. layer_buf is the manager-owned native-grid scratch the fill wrote into; output_buf is the remap target on the configured output vgrid (z-levels / isopycnals / 2D). State-side data needed for the remap (e.g. h_layer, bathy) is fetched via select type on state_handle.

Conservation contract: is_extensive (forwarded by the manager from diag_var_t%is_extensive) selects the operator. .false. — INTENSIVE: the target value is the thickness-weighted average of the overlapping source layers. .true. — EXTENSIVE: the column integral is conservatively REDISTRIBUTED (Σ output == Σ layer_buf), for thickness- integrated quantities (hTr, h·KE, transports).