Skip to content

xppm

XPiecewiseParabolic

Fortran name is xppm

__call__(q_in, c, q_mean_advected_through_x_interface)

Determine the mean value per area of q_in to be advected along x-interfaces.

This is done by integrating a piecewise-parabolic subgrid reconstruction of q_in along the x-direction over the segment of gridcell which will be advected.

Multiplying this mean value by the area to be advected through the interface would give the flux of q through that interface.

Parameters:

Name Type Description Default
q_in in

scalar to be integrated

required
c in

Courant number (u*dt/dx) in x-direction defined on x-interfaces, indicates the fraction of the adjacent grid cell which will be advected through the interface in one timestep

required
q_mean_advected_through_x_interface out

defined on x-interfaces. mean value of scalar within the segment of gridcell to be advected through that interface in one timestep, in units of q_in

required

apply_flux(courant, q, fx1, mask)

Parameters:

Name Type Description Default
courant

any value whose sign is the same as the sign of the x-wind on cell corners

required
q

scalar being transported, on x-centers

required
fx1

flux of q in units of q, on x-interfaces

required
mask

fx1 is multiplied by this before being applied

required

compute_al(q, dxa)

Interpolate q at interface.

Inputs

q: transported scalar centered along the x-direction dxa: dx on A-grid (?)

Returns:

Type Description

q interpolated to x-interfaces

compute_x_flux(q, courant, dxa, xflux)

Parameters:

Name Type Description Default
q in
required
courant in
required
dxa in
required
xflux out
required

fx1_fn(courant, br, b0, bl)

Parameters:

Name Type Description Default
courant

courant number, u * dt / dx (unitless)

required
br

???

required
b0

br + bl

required
bl

???

required