Surface fluxes & energy balance
Turbulent transfer of momentum, heat, moisture, and particles, the stability that governs it, and the surface energy budget that integrates every flux.
turbulent — Turbulent fluxes
Bulk-aerodynamic turbulent fluxes and the surface-layer quantities they need: air density, sensible and latent heat flux, transfer coefficients, shear stress, and resistance.
air_density
air_density(temp: 'float', pressure: 'float', unit: 'str' = 'C') -> 'float'
Density of dry air from temperature and pressure (ideal gas law).
>>> from atmoflux.turbulent import air_density
>>> round(air_density(15, 101.325), 4)
1.225sensible_heat_flux
sensible_heat_flux(density: 'float', wind_speed: 'float', temp_air: 'float', temp_surface: 'float', transfer_coeff: 'float', unit: 'str' = 'C') -> 'float'
Bulk-aerodynamic sensible heat flux.
>>> from atmoflux.turbulent import sensible_heat_flux
>>> round(sensible_heat_flux(1.2, 3.0, 20.0, 25.0, 0.0013), 4)
23.517latent_heat_flux
latent_heat_flux(density: 'float', wind_speed: 'float', q_air: 'float', q_surface: 'float', transfer_coeff: 'float') -> 'float'
Bulk-aerodynamic latent heat flux.
>>> from atmoflux.turbulent import latent_heat_flux
>>> round(latent_heat_flux(1.2, 3.0, 0.008, 0.012, 0.0013), 4)
45.864bulk_transfer_coefficient
bulk_transfer_coefficient(height: 'float', roughness: 'float', displacement: 'float' = 0.0, karman: 'float' = 0.4) -> 'float'
Neutral bulk transfer coefficient from surface-layer geometry.
>>> from atmoflux.turbulent import bulk_transfer_coefficient
>>> round(bulk_transfer_coefficient(10.0, 0.03), 6)
0.004741surface_shear_stress
surface_shear_stress(density: 'float', friction_velocity: 'float') -> 'float'
Surface shear stress (momentum flux) from friction velocity.
>>> from atmoflux.turbulent import surface_shear_stress
>>> round(surface_shear_stress(1.225, 0.3), 5)
0.11025aerodynamic_resistance
aerodynamic_resistance(wind_speed: 'float', height: 'float', roughness: 'float', displacement: 'float' = 0.0, karman: 'float' = 0.4) -> 'float'
Neutral aerodynamic resistance to turbulent transfer.
>>> from atmoflux.turbulent import aerodynamic_resistance
>>> round(aerodynamic_resistance(3.0, 10.0, 0.03), 2)
70.3stability — Surface-layer stability
Closed-form surface-layer stability diagnostics: bulk Richardson number, Monin–Obukhov length and stability parameter, the correction functions, and a stability class.
bulk_richardson_number
bulk_richardson_number(temp_lower: 'float', temp_upper: 'float', wind_upper: 'float', height_lower: 'float', height_upper: 'float', unit: 'str' = 'C') -> 'float'
Bulk Richardson number between two heights.
>>> from atmoflux.stability import bulk_richardson_number
>>> round(bulk_richardson_number(15, 14, 5.0, 2.0, 10.0), 5)
-0.01091obukhov_length
obukhov_length(friction_velocity: 'float', temp: 'float', sensible_heat_flux: 'float', density: 'float', unit: 'str' = 'C') -> 'float'
Monin-Obukhov length from friction velocity and sensible heat flux.
>>> from atmoflux.stability import obukhov_length
>>> round(obukhov_length(0.3, 20, 100.0, 1.2), 3)
-24.334stability_parameter
stability_parameter(height: 'float', obukhov_length: 'float') -> 'float'
Monin-Obukhov stability parameter zeta = z / L.
>>> from atmoflux.stability import stability_parameter
>>> round(stability_parameter(10.0, -50.0), 2)
-0.2psi_momentum
psi_momentum(zeta: 'float') -> 'float'
Integrated stability correction function for momentum.
>>> from atmoflux.stability import psi_momentum
>>> psi_momentum(0.1)
-0.5
>>> round(psi_momentum(-0.1), 4)
0.2836psi_heat
psi_heat(zeta: 'float') -> 'float'
Integrated stability correction function for heat.
>>> from atmoflux.stability import psi_heat
>>> psi_heat(0.1)
-0.5
>>> round(psi_heat(-0.1), 4)
0.5343stability_class
stability_class(richardson: 'float') -> 'str'
Qualitative stability class from a bulk Richardson number.
>>> from atmoflux.stability import stability_class
>>> stability_class(-0.5)
'unstable'
>>> stability_class(0.0)
'neutral'
>>> stability_class(0.5)
'stable'hydro — Evaporation & hydrology
Water fluxes: latent-heat-to-evaporation conversion and the Penman, Penman–Monteith, FAO-56, equilibrium, Priestley–Taylor, and Hargreaves methods.
latent_heat_to_evaporation
latent_heat_to_evaporation(latent_heat: 'float', density_water: 'float' = 1000.0) -> 'float'
Convert latent heat flux to an equivalent evaporation depth.
>>> from atmoflux.hydro import latent_heat_to_evaporation
>>> round(latent_heat_to_evaporation(100.0), 3)
3.527penman_evaporation
penman_evaporation(net_radiation: 'float', ground_heat: 'float', temp: 'float', wind_2m: 'float', es: 'float', ea: 'float', pressure: 'float' = 101.325, unit: 'str' = 'C') -> 'float'
Open-water evaporation using the Penman combination equation.
>>> from atmoflux.hydro import penman_evaporation
>>> round(penman_evaporation(15.0, 0.0, 25.0, 2.0, 3.169, 1.9, 101.3), 3)
6.326penman_monteith
penman_monteith(net_radiation: 'float', ground_heat: 'float', temp: 'float', vpd: 'float', density: 'float', resistance_aero: 'float', resistance_surface: 'float', pressure: 'float' = 101.325, unit: 'str' = 'C') -> 'float'
Evaporation from the general Penman-Monteith equation.
>>> from atmoflux.hydro import penman_monteith
>>> round(penman_monteith(150.0, 20.0, 25.0, 1.5, 1.2, 50.0, 70.0), 3)
6.133potential_evapotranspiration
potential_evapotranspiration(net_radiation: 'float', ground_heat: 'float', temp: 'float', wind_2m: 'float', es: 'float', ea: 'float', pressure: 'float' = 101.325, unit: 'str' = 'C') -> 'float'
Reference evapotranspiration from the FAO-56 Penman-Monteith equation.
>>> from atmoflux.hydro import potential_evapotranspiration
>>> round(potential_evapotranspiration(15.0, 0.0, 25.0, 2.0, 3.169, 1.9, 101.3), 3)
5.539equilibrium_evaporation
equilibrium_evaporation(net_radiation: 'float', ground_heat: 'float', temp: 'float', pressure: 'float' = 101.325, unit: 'str' = 'C') -> 'float'
Equilibrium evaporation from available energy.
>>> from atmoflux.hydro import equilibrium_evaporation
>>> round(equilibrium_evaporation(15.0, 0.0, 25.0), 3)
4.521priestley_taylor
priestley_taylor(net_radiation: 'float', ground_heat: 'float', temp: 'float', alpha: 'float' = 1.26, pressure: 'float' = 101.325, unit: 'str' = 'C') -> 'float'
Priestley-Taylor evaporation.
>>> from atmoflux.hydro import priestley_taylor
>>> round(priestley_taylor(15.0, 0.0, 25.0), 3)
5.697hargreaves
hargreaves(temp_mean: 'float', temp_min: 'float', temp_max: 'float', extraterrestrial: 'float', unit: 'str' = 'C') -> 'float'
Hargreaves reference evapotranspiration.
>>> from atmoflux.hydro import hargreaves
>>> round(hargreaves(25.0, 18.0, 32.0, 36.0), 3)
5.41aerosols — Aerosols
Fluxes of particles and non-water trace gases: gravitational settling, resistance-model dry deposition, and surface emission.
settling_velocity
settling_velocity(diameter: 'float', particle_density: 'float', viscosity: 'float' = 1.789e-05, mean_free_path: 'float' = 6.63e-08) -> 'float'
Gravitational settling velocity of a spherical aerosol particle.
>>> from atmoflux.aerosols import settling_velocity
>>> round(settling_velocity(1e-6, 1000.0) * 1e6, 3)
35.486
>>> round(settling_velocity(10e-6, 1000.0) * 1e3, 3)
3.092dry_deposition_velocity
dry_deposition_velocity(settling: 'float', resistance_aero: 'float', resistance_surface: 'float') -> 'float'
Dry deposition velocity from the resistance-in-series model.
>>> from atmoflux.aerosols import dry_deposition_velocity, settling_velocity
>>> vs = settling_velocity(10e-6, 1000.0)
>>> round(dry_deposition_velocity(vs, 50.0, 20.0) * 1000, 3)
16.774emission_flux
emission_flux(concentration: 'float', transfer_velocity: 'float') -> 'float'
Surface emission flux from a transfer velocity and concentration.
>>> from atmoflux.aerosols import emission_flux
>>> emission_flux(2e-6, 0.01)
2e-08balance — Energy balance
Surface energy-budget diagnostics: closure residual, Bowen ratio, available energy, the closure ratio, ground-heat parameterization, and the EnergyBalance container.
surface_energy_residual
surface_energy_residual(net_radiation: 'float', sensible_heat: 'float', latent_heat: 'float', ground_heat: 'float' = 0.0) -> 'float'
Surface energy balance closure residual.
>>> from atmoflux.balance import surface_energy_residual
>>> surface_energy_residual(400.0, 150.0, 200.0, 50.0)
0.0bowen_ratio
bowen_ratio(sensible_heat: 'float', latent_heat: 'float') -> 'float'
Bowen ratio of sensible to latent heat flux.
>>> from atmoflux.balance import bowen_ratio
>>> round(bowen_ratio(150.0, 200.0), 3)
0.75energy_balance
energy_balance(net_radiation: 'float', sensible_heat: 'float', latent_heat: 'float', ground_heat: 'float' = 0.0) -> 'EnergyBalance'
Assemble an EnergyBalance container from surface flux components.
>>> from atmoflux.balance import bowen_ratio, energy_balance
>>> eb = energy_balance(400.0, 150.0, 200.0, 50.0)
>>> eb.residual
0.0
>>> round(eb.bowen_ratio, 2)
0.75available_energy
available_energy(net_radiation: 'float', ground_heat: 'float' = 0.0) -> 'float'
Available energy at the surface.
>>> from atmoflux.balance import available_energy
>>> available_energy(400.0, 50.0)
350.0energy_balance_ratio
energy_balance_ratio(sensible_heat: 'float', latent_heat: 'float', net_radiation: 'float', ground_heat: 'float' = 0.0) -> 'float'
Energy balance closure ratio.
>>> from atmoflux.balance import energy_balance_ratio
>>> round(energy_balance_ratio(150.0, 200.0, 400.0, 50.0), 3)
1.0ground_heat_fraction
ground_heat_fraction(net_radiation: 'float', fraction: 'float' = 0.1) -> 'float'
Estimate ground heat flux as a fraction of net radiation.
>>> from atmoflux.balance import ground_heat_fraction
>>> ground_heat_fraction(400.0)
40.0