Advection
MPDATA (Smolarkiewicz) advection scheme for the Eulerian fields, and the prescribed non-divergent wind field used in idealized tests.
Droplets.BoundaryCondition — Type
BoundaryCondition
Abstract type for boundary conditions in MPDATA advection scheme.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
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)
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
Droplets.antiosc! — Method
Rescale the 2D antidiffusive velocities in tmp (FCT limiter) so the corrected donor-cell fluxes stay nonoscillatory.
Droplets.antiosc! — Method
Rescale the 1D (z) antidiffusive velocity in tmp (FCT limiter) so the corrected donor-cell flux stays nonoscillatory.
Droplets.beta_function — Method
Compute the 2D nonoscillatory flux limiters (β_in, β_out) at cell (i,j) that bound ϕ by its local extrema.
Droplets.beta_function_1d — Method
Compute the 1D nonoscillatory flux limiters (β_in, β_out) at cell k that bound ϕ by its local extrema.
Droplets.compute_antidiffusive_velocity! — Method
Compute and store the 2D antidiffusive velocities in tmp for the MPDATA corrective pass.
Droplets.compute_antidiffusive_velocity! — Method
Compute and store the 1D (z) antidiffusive velocity in tmp for the MPDATA corrective pass.
Droplets.corrective_vel_1d — Method
Compute the 1D (z) MPDATA antidiffusive velocity correction into tmp.GCz_tmp.
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.
Droplets.donor_cell_pass! — Method
Advance 1D ϕ in place by one donor-cell flux pass along z under extrapolated (zero-gradient) boundaries.
Droplets.donor_cell_pass! — Method
Advance 2D ϕ in place by one donor-cell flux pass in both x and y.
Droplets.find_extrema! — Method
Store the local max/min of 2D ϕ over each cell's neighbors into tmp.minmax.
Droplets.find_extrema! — Method
Store the local max/min of 1D ϕ over each cell's z-neighbors into tmp.minmax.
Droplets.flux — Method
Upwind donor-cell flux of ψL/ψR across a face with Courant number GC.
Droplets.flux_horizontal! — Method
Accumulate one donor-cell flux pass along the x-direction into ϕ_tmp, using Courant numbers GCx.
Droplets.flux_vertical! — Method
Accumulate one donor-cell flux pass along the y-direction into ϕ_tmp, using Courant numbers GCy.
Droplets.limit — Method
Map index i into the valid range [1,N] per boundary condition bc (wrap, reflect, or clamp).
Droplets.mpdata_scm! — Method
Advection is off, so grid is left unchanged.
Droplets.mpdata_scm! — Method
MPDATA-advect only water vapor mixing ratio in grid (advection on, thermo feedback off).
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).
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.
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.
Droplets.reconstruct_after_advection! — Method
Recompute θ/qv (or θ_l/qt, whichever wasn't the advected pair) in grid.states after MPDATA advection.
Droplets.u_corrective! — Method
Compute the x-component MPDATA antidiffusive velocity correction into tmp.GCx_tmp.
Droplets.v_corrective! — Method
Compute the y-component MPDATA antidiffusive velocity correction into tmp.GCy_tmp.
Droplets.make_stream_function — Method
Create a stream function for a non-divergent flow field based on the given parameters.
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.