Index
AtmosphericDeposition.DryDepositionAtmosphericDeposition.DryDeposition.KAPPAAtmosphericDeposition.z₀_tableAtmosphericDeposition.DryDeposition.GasPropertiesAtmosphericDeposition.DryDeposition.LandUseParametersAtmosphericDeposition.AirRefreshingLimitationAtmosphericDeposition.AirRefreshingLimitationAtmosphericDeposition.BelowCloudGasScavengingAtmosphericDeposition.BelowCloudGasScavengingAtmosphericDeposition.CloudIceUptakeLimitationAtmosphericDeposition.CloudIceUptakeLimitationAtmosphericDeposition.DryDepGasAtmosphericDeposition.DryDepParticleAtmosphericDeposition.DryDeposition.AerodynamicResistanceAtmosphericDeposition.DryDeposition.DryDepositionGasAtmosphericDeposition.DryDeposition.DryDepositionParticleAtmosphericDeposition.DryDeposition.ParticleSettlingAtmosphericDeposition.DryDeposition.QuasiLaminarResistanceGasAtmosphericDeposition.DryDeposition.QuasiLaminarResistanceParticleAtmosphericDeposition.DryDeposition.SurfaceResistanceAtmosphericDeposition.DryDepositionAerosolAtmosphericDeposition.DryDepositionGasFractionalAtmosphericDeposition.GasScavengingCoeffAtmosphericDeposition.GasScavengingCoeffAtmosphericDeposition.MassTransferCoeffAtmosphericDeposition.MassTransferCoeffAtmosphericDeposition.ParticleCollectionEfficiencyAtmosphericDeposition.ParticleCollectionEfficiencyAtmosphericDeposition.ParticleScavengingCoeffAtmosphericDeposition.ParticleScavengingCoeffAtmosphericDeposition.RbGasAtmosphericDeposition.RbParticleAtmosphericDeposition.ReversibleGasScavengingAtmosphericDeposition.ReversibleGasScavengingAtmosphericDeposition.WetDepositionAtmosphericDeposition.WetDepositionFluxAtmosphericDeposition.WetDepositionFluxAtmosphericDeposition.WetScavengingLimitationsAtmosphericDeposition.WetScavengingLimitationsAtmosphericDeposition._WetDepositionAtmosphericDeposition.air_refreshing_limited_ice_uptake_rateAtmosphericDeposition.air_refreshing_limited_rateAtmosphericDeposition.ccAtmosphericDeposition.cloud_ice_uptake_rateAtmosphericDeposition.cloudy_air_refreshing_rateAtmosphericDeposition.cold_cloud_rainout_efficiencyAtmosphericDeposition.dH2OAtmosphericDeposition.dParticleAtmosphericDeposition.gas_scavenging_coeffAtmosphericDeposition.grid_refreshing_timeAtmosphericDeposition.hno3_uptake_efficiencyAtmosphericDeposition.mass_transfer_coeffAtmosphericDeposition.mfpAtmosphericDeposition.muAtmosphericDeposition.particle_diffusivityAtmosphericDeposition.particle_relaxation_timeAtmosphericDeposition.particle_scavenging_coeffAtmosphericDeposition.particle_terminal_velocityAtmosphericDeposition.raAtmosphericDeposition.record_landuse_grid!AtmosphericDeposition.reload_landuse_fractions!AtmosphericDeposition.reversible_drop_concAtmosphericDeposition.reversible_scavenging_fluxAtmosphericDeposition.scAtmosphericDeposition.set_landuse_data_path!AtmosphericDeposition.set_landuse_target_grid!AtmosphericDeposition.slinn_collection_efficiencyAtmosphericDeposition.stSmoothAtmosphericDeposition.stVegAtmosphericDeposition.turbulence_velocityAtmosphericDeposition.vsAtmosphericDeposition.wesely_table
API Documentation
AtmosphericDeposition.z₀_table — Constant
Values for the characteristic radii of collectors [m] where the columns are land use categories and the rows are seasonal categories. Given in Seinfeld and Pandis Table 19.2
Land use options are given in SeinfeldLandUse and season options are given in SeinfeldSeason.
AtmosphericDeposition.AirRefreshingLimitation — Method
AirRefreshingLimitation(; name = :AirRefreshingLimitation)ModelingToolkit component implementing the air refreshing limitation on wet scavenging from Luo & Yu (2023), Eqs. 2, 5, 10, 11.
This parameterization accounts for the fact that species in subgrid cloud-free (rain-free) air need time to be mixed with those in cloudy (rainy) air before being influenced by wet scavenging. The standard well-mixed assumption can overestimate wet scavenging when the subgrid air mixing time scale is comparable to the model time step.
The air refreshing limited removal rate R_A replaces the standard f·Rᵢ in wet scavenging calculations. When turbulent mixing is strong (large TKE), R_A ≈ f·Rᵢ; when mixing is weak, R_A < f·Rᵢ.
AtmosphericDeposition.BelowCloudGasScavenging — Method
BelowCloudGasScavenging(; name = :BelowCloudGasScavenging)ModelingToolkit component for irreversible below-cloud gas scavenging. Computes the scavenging coefficient (Eq. 20.25), the below-cloud flux (Eq. 20.22), and the exponential gas concentration decay (Eq. 20.24).
AtmosphericDeposition.CloudIceUptakeLimitation — Method
CloudIceUptakeLimitation(; name = :CloudIceUptakeLimitation)ModelingToolkit component implementing the cloud ice uptake limitation on cold cloud wet scavenging from Luo & Yu (2023), Eqs. 12–15.
In cold clouds, water-soluble aerosols are captured by ice crystals via coagulation and then removed by precipitation. The cold cloud rainout efficiency F_I is limited by the cloud ice uptake rate, which is approximated using the HNO₃ uptake rate from Jacob (2000).
The uptake efficiency γ depends on temperature following Hudson et al. (2002): γ = 0.003 at T ≥ 220 K, increasing linearly to 0.007 at T ≤ 209 K.
AtmosphericDeposition.DryDepGas — Method
Function DryDepGas calculates dry deposition velocity [m/s] for a gas species, where z is the height of the surface layer [m], zo is roughness length [m], u_star is friction velocity [m/s], L is Monin-Obukhov length [m], T is surface air temperature [K], ρA is air density [kg/m3] gasData is data about the gas species for surface resistance calculations, G is solar irradiation [W m-2], Θ is the slope of the local terrain [radians], iSeason and iLandUse are indexes for the season and land use, dew and rain indicate whether there is dew or rain on the ground, and isSO2 and isO3 indicate whether the gas species of interest is either SO2 or O3, respectively. Based on Seinfeld and Pandis (2006) equation 19.2.
AtmosphericDeposition.DryDepParticle — Method
Function DryDepParticle calculates particle dry deposition velocity [m/s] where z is the height of the surface layer [m], zo is roughness length [m], u_star is friction velocity [m/s], L is Monin-Obukhov length [m], Dp is particle diameter [m], Ts is surface air temperature [K], P is pressure [Pa], ρParticle is particle density [kg/m3], ρAir is air density [kg/m3], and iSeason and iLandUse are indexes for the season and land use. Based on Seinfeld and Pandis (2006) equation 19.7.
AtmosphericDeposition.DryDepositionAerosol — Method
Aerosol dry deposition based on Seinfeld and Pandis (2006) equation 19.7.
AtmosphericDeposition.DryDepositionGasFractional — Method
Dry deposition (gas) using fractional / mosaic land-use weighting. Exposes the 11 Wesely (1989) land-use area fractions (f_urban, f_agricultural, ..., f_rockyshrubs) as scalar parameters; Vd is the area-weighted sum of the per-class deposition velocities, Σᵢ fᵢ / (Ra + Rb + Rcᵢ) (GEOS-Chem drydep_mod / CMAQ STAGE convention).
When coupled via couple2(::DryDepositionGasCoupler, ::GEOSFPCoupler), the 11 fraction parameters are bound to landuse_frac_at(gp.lon, gp.lat, i) (MODIS-derived CONUS NetCDF) and season is bound to a date-driven expression assuming Northern-Hemisphere mid-latitudes. Chemistry-side wiring (SuperFast, Pollu, GEOSChemGasPhase) is inherited from the existing couple2 methods on DryDepositionGasCoupler in ext/GasChemExt.jl.
Default fraction values (uncoupled): f_mixedforest = 1.0, others = 0.0.
Pass the DomainInfo being coupled to — DryDepositionGasFractional(domain) — to have the land-use source conservatively area-averaged onto the simulation grid. Coverage is checked immediately, so a domain outside the available data fails here rather than mid-solve. Without a domain the system still builds, but reading a land-use fraction raises until a grid is declared, either this way or with set_landuse_target_grid!.
AtmosphericDeposition.GasScavengingCoeff — Method
GasScavengingCoeff(; name = :GasScavengingCoeff)ModelingToolkit component for the irreversible gas scavenging coefficient (Eq. 20.25, Seinfeld & Pandis, 2006).
AtmosphericDeposition.MassTransferCoeff — Method
MassTransferCoeff(; name = :MassTransferCoeff)ModelingToolkit component for the gas-phase mass transfer coefficient to a raindrop (Eq. 20.12, Seinfeld & Pandis, 2006).
AtmosphericDeposition.ParticleCollectionEfficiency — Method
ParticleCollectionEfficiency(; name = :ParticleCollectionEfficiency)ModelingToolkit component for the Slinn (1983) semi-empirical particle-drop collision (collection) efficiency (Eq. 20.53–20.54, Seinfeld & Pandis, 2006).
AtmosphericDeposition.ParticleScavengingCoeff — Method
ParticleScavengingCoeff(; name = :ParticleScavengingCoeff)ModelingToolkit component for the particle scavenging coefficient with monodisperse raindrops (Eq. 20.57, Seinfeld & Pandis, 2006).
AtmosphericDeposition.RbGas — Method
Function RbGas calculates the quasi-laminar sublayer resistance to dry deposition for a gas species [s/m], where Sc is the dimensionless Schmidt number and u_star is the friction velocity [m/s]. From Seinfeld and Pandis (2006) equation 19.17.
AtmosphericDeposition.RbParticle — Method
Function RbParticle calculates the quasi-laminar sublayer resistance to dry deposition for a particles [s/m], where Sc is the dimensionless Schmidt number, u_star is the friction velocity [m/s], St is the dimensionless Stokes number, Dp is particle diameter [m], and iSeason and iLandUse are season and land use indexes, respectively. From Seinfeld and Pandis (2006) equation 19.27.
AtmosphericDeposition.ReversibleGasScavenging — Method
ReversibleGasScavenging(; name = :ReversibleGasScavenging)ModelingToolkit component for reversible below-cloud gas scavenging (Eqs. 20.28, 20.33, 20.35, Seinfeld & Pandis, 2006).
The parameter HRT is the dimensionless product H* × R × T × 1000 (effective Henry's law coefficient × gas constant × temperature × unit conversion). For HNO₃ at 298 K: HRT = 2.1e5 × 8.206e-5 × 298 × 1000 ≈ 5.14e6.
AtmosphericDeposition.WetDeposition — Method
Description: This is a box model used to calculate wet deposition based on formulas at EMEP model. Build WetDeposition model
Example
@parameters t
wd = WetDeposition(t)AtmosphericDeposition.WetDepositionFlux — Method
WetDepositionFlux(; name = :WetDepositionFlux)ModelingToolkit component for the net wet deposition flux and velocity (Eqs. 20.7–20.9, Seinfeld & Pandis, 2006).
AtmosphericDeposition.WetScavengingLimitations — Method
WetScavengingLimitations(; name = :WetScavengingLimitations)ModelingToolkit component combining both the air refreshing limitation and cloud ice uptake limitation on wet scavenging from Luo & Yu (2023).
This provides a complete parameterization of the two novel approaches:
- Air refreshing limitation (Section 2.1): Reduces wet scavenging rate when subgrid air mixing is slow relative to the removal rate.
- Cloud ice uptake limitation (Section 2.2): Limits cold cloud rainout efficiency by the rate at which aerosols are captured by ice crystals.
AtmosphericDeposition._WetDeposition — Method
Calculate wet deposition based on formulas at https://www.emep.int/publ/reports/2003/emepreport1part12003.pdf. Inputs are fraction of grid cell covered by clouds (cloudFrac), rain mixing ratio (qrain), air density (ρ_air [kg/m3]), and fall distance (Δz [m]). Outputs are wet deposition rates for PM2.5, SO2, and other gases (wdParticle, wdSO2, and wdOtherGas [1/s]).
AtmosphericDeposition.air_refreshing_limited_ice_uptake_rate — Method
air_refreshing_limited_ice_uptake_rate(f, R_U, Kᵢ)Compute the air refreshing limited cloud ice uptake rate R_{A,U} (Eq. 13, Luo & Yu, 2023).
AtmosphericDeposition.air_refreshing_limited_rate — Method
air_refreshing_limited_rate(f, Rᵢ, τ_A)Compute the air refreshing limited grid mean mass loss rate R_A (Eq. 2, Luo & Yu, 2023).
AtmosphericDeposition.cc — Method
Function cc calculates the Cunnningham slip correction factor where Dp is particle diameter [m], T is temperature [K], and P is pressure [Pa]. From Seinfeld and Pandis (2006) equation 9.34.
AtmosphericDeposition.cloud_ice_uptake_rate — Method
cloud_ice_uptake_rate(N_I, S_I, r, D_g, M, T, γ)Compute the cloud ice uptake rate R_U for HNO₃ (Eq. 14, Luo & Yu, 2023; based on Jacob, 2000). All inputs in SI units (M in kg/mol).
AtmosphericDeposition.cloudy_air_refreshing_rate — Method
cloudy_air_refreshing_rate(f, TKE, Δx, Δy, Δz)Compute the cloudy (rainy) air refreshing rate Kᵢ (Eq. 11, Luo & Yu, 2023). Cloud fractions in x and y are f^(1/2); z-direction fraction is 1.
AtmosphericDeposition.cold_cloud_rainout_efficiency — Method
cold_cloud_rainout_efficiency(R_AU, Δt)Compute the cold cloud rainout efficiency FI (Eq. 12, Luo & Yu, 2023). FI equals the fraction of water-soluble aerosols in cloud ice due to uptake.
AtmosphericDeposition.dH2O — Method
Function dH2O calculates molecular diffusivity of water vapor in air [m2/s] where T is temperature [K] using a regression fit to data in Bolz and Tuve (1976) found here: http://www.cambridge.org/us/engineering/author/nellisandklein/downloads/examples/EXAMPLE_9.2-1.pdf
AtmosphericDeposition.dParticle — Method
Function dParticle calculates the brownian diffusivity of a particle [m2/s] using the Stokes-Einstein-Sutherland relation (Seinfeld and Pandis eq. 9.73) where T is air temperature [K], P is pressure [Pa], Dp is particle diameter [m], and μ is air dynamic viscosity [kg/(s m)]
AtmosphericDeposition.gas_scavenging_coeff — Method
gas_scavenging_coeff(K_c, U_t, D_p, p₀_SI)Compute the below-cloud gas scavenging coefficient for irreversible uptake by monodisperse raindrops (Eq. 20.25 in Seinfeld & Pandis, 2006).
All arguments in SI units. p₀_SI is precipitation rate in m/s.
AtmosphericDeposition.grid_refreshing_time — Method
grid_refreshing_time(f, Kᵢ)Compute the grid refreshing time τ_A (Eq. 5, Luo & Yu, 2023).
AtmosphericDeposition.hno3_uptake_efficiency — Method
hno3_uptake_efficiency(T)Compute the uptake efficiency γ of nitric acid on ice crystals (Eq. 15, Luo & Yu, 2023; based on Hudson et al., 2002). Returns γ = 0.003 for T ≥ 220 K and γ = 0.007 for T ≤ 209 K.
AtmosphericDeposition.mass_transfer_coeff — Method
mass_transfer_coeff(D_g, D_p, U_t)Compute the gas-phase mass transfer coefficient to a spherical drop using the Sherwood number correlation (Eq. 20.12 in Seinfeld & Pandis, 2006).
Arguments
D_g: gas-phase diffusivity [m²/s]D_p: raindrop diameter [m]U_t: terminal velocity of the raindrop [m/s]
AtmosphericDeposition.mfp — Method
Function mfp calculates the mean free path of air [m] where T is temperature [K] P is pressure [Pa], and Mu is dynamic viscosity [kg/(m s)]. From Seinfeld and Pandis (2006) equation 9.6
AtmosphericDeposition.mu — Method
Function mu calculates the dynamic viscosity of air [kg m-1 s-1] where T is temperature [K].
AtmosphericDeposition.particle_diffusivity — Method
particle_diffusivity(d_p, T)Compute Brownian diffusivity of an aerosol particle via Stokes-Einstein: Ddiff = kB * T / (3π * μair * dp).
AtmosphericDeposition.particle_relaxation_time — Method
particle_relaxation_time(d_p, ρ_p)Compute the particle relaxation time τ = ρp * dp² / (18 * μ_air) for Stokes drag regime.
AtmosphericDeposition.particle_scavenging_coeff — Method
particle_scavenging_coeff(E, p₀_SI, D_p)Compute the particle scavenging coefficient for monodisperse raindrops (Eq. 20.57, Seinfeld & Pandis, 2006).
Arguments
E: collection efficiency (dimensionless)p₀_SI: precipitation rate [m/s]D_p: raindrop diameter [m]
AtmosphericDeposition.particle_terminal_velocity — Method
particle_terminal_velocity(d_p, ρ_p)Compute the Stokes settling velocity u_t = τ * g for small particles.
AtmosphericDeposition.ra — Method
Function Ra calculates aerodynamic resistance to dry deposition where z is the top of the surface layer [m], z₀ is the roughness length [m], u_star is friction velocity [m/s], and L is Monin-Obukhov length [m] Based on Seinfeld and Pandis (2006) [Seinfeld, J.H. and Pandis, S.N. (2006) Atmospheric Chemistry and Physics: From Air Pollution to Climate Change. 2nd Edition, John Wiley & Sons, New York.] equation 19.13 & 19.14.
AtmosphericDeposition.record_landuse_grid! — Method
record_landuse_grid!(domain)Validate domain against the source coverage and record its lon/lat grid as the remap target. Called by DryDepositionGasFractional(domain).
AtmosphericDeposition.reload_landuse_fractions! — Method
reload_landuse_fractions!()Re-read the NetCDF at the current path into the cache. Useful after regenerating the source NetCDF.
AtmosphericDeposition.reversible_drop_conc — Method
reversible_drop_conc(C_g, HRT, K_c, D_p, U_t, z, C_aq0)Compute the aqueous-phase concentration in a falling raindrop at fall distance z from cloud base for a reversibly-absorbed gas species (Eq. 20.28, Seinfeld & Pandis, 2006).
HRT = H* × R × T × 1000 (dimensionless), representing the ratio Caqeq / C_g when both are in mol/m³.
AtmosphericDeposition.reversible_scavenging_flux — Method
reversible_scavenging_flux(C_g, HRT, K_c, D_p, U_t, h, C_aq0, p₀_SI)Compute the total below-cloud scavenging rate for a reversibly-absorbed gas (Eq. 20.35, Seinfeld & Pandis, 2006). All SI units.
HRT = H* × R × T × 1000 (dimensionless). p₀_SI = precipitation rate [m/s].
AtmosphericDeposition.sc — Method
Function sc computes the dimensionless Schmidt number, where μ is dynamic viscosity of air [kg/(s m)], ρ is air density [kg/m3], and D is the molecular diffusivity of the gas speciesof interest [m2/s]
AtmosphericDeposition.set_landuse_data_path! — Method
set_landuse_data_path!(path)Override the NetCDF path used by landuse_frac_at and reload immediately. Primarily used by tests to point at a synthetic fixture.
AtmosphericDeposition.set_landuse_target_grid! — Method
set_landuse_target_grid!(lon_deg, lat_deg; dlon, dlat)Record the simulation grid (cell centres, DEGREES) that the source data should be remapped onto, and invalidate any cached fractions. Called by DryDepositionGasFractional(domain). set_landuse_target_grid!(nothing) clears the recorded grid; land-use lookups then raise until a grid is set again.
dlon/dlat give the cell size. They default to the centre spacing, which is undefined for a single-cell axis — pass them explicitly in that case, as the domain-aware constructor does.
AtmosphericDeposition.slinn_collection_efficiency — Method
slinn_collection_efficiency(D_p, U_t, d_p, ρ_p, T)Compute the semi-empirical collision (collection) efficiency E between a raindrop of diameter D_p and an aerosol particle of diameter d_p (Eq. 20.53–20.54, Seinfeld & Pandis, 2006).
The three terms represent:
- Brownian diffusion
- Interception
- Inertial impaction (Stokes number term)
AtmosphericDeposition.stSmooth — Method
Function stSmooth computes the dimensionless Stokes number for dry deposition of particles on smooth surfaces or surfaces with bluff roughness elements, where vs is settling velocity [m/s], u_star is friction velocity [m/s], μ is dynamic viscosity of air [kg/(s m)], and ρ is air density [kg/m3], based on Seinfeld and Pandis (2006) equation 19.23.
AtmosphericDeposition.stVeg — Method
Function stVeg computes the dimensionless Stokes number for dry deposition of particles on vegetated surfaces, where vs is settling velocity [m/s], u_star is friction velocity [m/s], and A is the characteristic collector radius [m], based on Seinfeld and Pandis (2006) equation 19.24.
AtmosphericDeposition.turbulence_velocity — Method
turbulence_velocity(TKE)Compute isotropic turbulence velocity from turbulence kinetic energy (Eq. 10, Luo & Yu, 2023). Assumes u' = v' = w' per Pinto (1998).
AtmosphericDeposition.vs — Method
Function vs calculates the terminal setting velocity of a particle where Dp is particle diameter [m], ρₚ is particle density [kg/m3], Cc is the Cunningham slip correction factor, and μ is air dynamic viscosity [kg/(s m)]. From equation 9.42 in Seinfeld and Pandis (2006).
AtmosphericDeposition.wesely_table — Method
Direct lookup of a Wesely (1989) table entry by (season, land-use) index.
Registered as symbolic because iSeason generally arrives as a Num (the GEOS-FP coupler binds season to season_at(t)) and iLandUse may too (it is a plain parameter in the single-class path). Registration is what makes direct indexing possible at all: with a symbolic argument the generated method builds an opaque Term and never enters this body, so round(Int, …) only ever runs at runtime on concrete values. A plain unregistered matrix[Int(iSeason), …] fails with MethodError: Int64(::Num) at trace time — that is why the earlier direct-index version (c9e95605) had to be reverted.
Only TWO untyped arguments: @register_symbolic's expansion grows sharply with the number of symbolic args (a 15-arg registration was measured at >8 GiB), so tbl is typed ::Int to keep it out of the expansion.