Advection

MPDATA (Smolarkiewicz) advection scheme for the Eulerian fields, and the prescribed non-divergent wind field used in idealized tests.

Droplets.mpdata_settings — Type

mpdatasettings Struct for 2D MPDATA advection scheme Settings - ncorr::Int: Number of corrective steps in MPDATA - grid::Tuple{Int, Int}: Grid dimensions (Nx, Nz) - horizontalboundarycondition::Union{Periodic, NoFlux, Extrapolated}: Horizontal boundary condition type - verticalboundarycondition::Union{Periodic, NoFlux, Extrapolated}: Vertical boundary condition type - nonoscillatory::Bool: Flag for non-oscillatory option - infinite_gauge::Bool: Flag for infinite gauge option

source
Droplets.mpdata_settings_1d — Type

mpdatasettings1d{TVar<:ThermoVariable} Struct for 1D MPDATA advection scheme Settings - ncorr::Int: Number of corrective steps in MPDATA - grid::Int: Grid dimension (Nz) - verticalboundarycondition::Union{Periodic, NoFlux, Extrapolated}: Vertical boundary condition type - nonoscillatory::Bool: Flag for non-oscillatory option - infinitegauge::Bool: Flag for infinite gauge option - thermovariable::TVar: Type of thermodynamic variable (θ, qv) - topcellboundary_condition::Union{Periodic, NoFlux, Reservoir}: Top cell boundary condition type (commented out)

source
Droplets.mpdata_tmp — Type

mpdatatmp mpdata1d Struct for MPData Allocations - ϕ::Matrix{Float64}: Field variable - GCxstep::Matrix{Float64}: Step size in x-direction - GCystep::Matrix{Float64}: Step size in y-direction - GCxtmp::Matrix{Float64}: Temporary storage for x-direction - GCytmp::Matrix{Float64}: Temporary storage for y-direction - minmax::NamedTuple: Named tuple containing local minimum and maximum values

source
Droplets.antiosc! — Method

Rescale the 2D antidiffusive velocities in tmp (FCT limiter) so the corrected donor-cell fluxes stay nonoscillatory.

source
Droplets.antiosc! — Method

Rescale the 1D (z) antidiffusive velocity in tmp (FCT limiter) so the corrected donor-cell flux stays nonoscillatory.

source
Droplets.beta_function — Method

Compute the 2D nonoscillatory flux limiters (β_in, β_out) at cell (i,j) that bound ϕ by its local extrema.

source
Droplets.donor_cell_pass! — Method

Advance 1D ϕ in place by one donor-cell flux pass along z, optionally dividing by g_factor and zeroing the top-cell flux when topcellreservoir is set.

source
Droplets.flux — Method

Upwind donor-cell flux of ψL/ψR across a face with Courant number GC.

source
Droplets.limit — Method

Map index i into the valid range [1,N] per boundary condition bc (wrap, reflect, or clamp).

source
Droplets.mpdata_scm! — Method

MPDATA-advect grid's thermodynamic and dynamic fields (θ/θ_l, qv/qt, e, u, v, ρ) and reconstruct dependent state (advection on, thermo feedback on).

source
Droplets.mpdata_step! — Method

Advance 2D ϕ_stage in place by one full MPDATA step (donor-cell pass plus n_corr-1 antidiffusive corrections) given Courant numbers GCx, GCy.

source
Droplets.mpdata_step! — Method

Advance 1D ϕ_stage in place by one full MPDATA step along z (donor-cell pass plus n_corr-1 antidiffusive corrections) given Courant numbers GCz.

source
Droplets.nondivergent_vector_field_2d — Method

Compute the non-divergent vector field in 2D based on the given stream function and grid parameters. Returns the u and v velocity components, as well as the CFL numbers in x and y directions.

source