Skip to content

updatedzd

UpdateHeightOnDGrid

Fortran name is updatedzd.

__call__(surface_height, height, courant_number_x, courant_number_y, x_area_flux, y_area_flux, ws, dt)

Advect height on D-grid.

Height can be in any units, including geopotential units.

Parameters:

Name Type Description Default
surface_height in

height of surface

required
height inout

height defined on layer interfaces

required
courant_number_x in

Courant number in x-direction defined on cell centers

required
courant_number_y in

Courant number in y-direction defined on cell centers

required
x_area_flux in

Area flux in x-direction defined on cell centers

required
y_area_flux in

Area flux in y-direction defined on cell centers

required
ws out

lowest layer vertical velocity implied by horizontal motion over topography, in units of [height units] / second

required
dt in

timestep over which input fluxes have been computed, in seconds

required

apply_height_fluxes(area, height, fx, fy, x_area_flux, y_area_flux, gz_x_diffusive_flux, gz_y_diffusive_flux, surface_height, ws, dt)

Apply all computed fluxes to height profile.

All vertically-resolved arguments are defined on the same grid (normally interface levels).

Parameters:

Name Type Description Default
area in

gridcell area in m^2

required
height inout

height profile on which to apply fluxes

required
fx in

area-weighted flux of height in x-direction, in units of g * m^3

required
fy in

area-weighted flux of height in y-direction, in units of g * m^3

required
x_area_flux in

flux of area in x-direction, in units of m^2

required
y_area_flux in

flux of area in y-direction, in units of m^2

required
gz_x_diffusive_flux in

diffusive flux of area-weighted height in x-direction

required
gz_y_diffusive_flux in

diffusive flux of area-weighted height in y-direction

required
surface_height in

surface height

required
ws out

vertical velocity of the lowest level (to keep it at the surface)

required
dt in

acoustic timestep (seconds)

required

Grid variable inputs: area

cubic_spline_interpolation_constants(dp0, quantity_factory)

Computes constants used in cubic spline interpolation from cell center to interface levels.

Parameters:

Name Type Description Default
dp0 Quantity

reference pressure thickness on mid levels (in)

required

Returns:

Name Type Description
gk Quantity

interpolation constant on mid levels

beta Quantity

interpolation constant on mid levels

gamma Quantity

interpolation constant on mid levels

cubic_spline_interpolation_from_layer_center_to_interfaces(q_center, q_interface, gk, beta, gamma)

Interpolate a field from layer (vertical) centers to interfaces.

Corresponds to edge_profile in nh_utils.F90 in the original Fortran code.

Parameters:

Name Type Description Default
q_center in

value on layer centers

required
q_interface out

value on layer interfaces

required
gk in

cubic spline interpolation constant

required
beta in

cubic spline interpolation constant

required
gamma in

cubic spline interpolation constant

required