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: dry and moist air density, sensible and latent heat flux, transfer coefficients, shear stress, and resistance.
air_density
air_density(temp: 'FloatArray', pressure: 'FloatArray', unit:
'str' =
'C') -> 'FloatArray'
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.225
sensible_heat_flux
sensible_heat_flux(density: 'FloatArray', wind_speed:
'FloatArray', temp_air:
'FloatArray', temp_surface: 'FloatArray', transfer_coeff: 'FloatArray',
unit: 'str' = 'C') -> 'FloatArray'
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.517
latent_heat_flux
latent_heat_flux(density: 'FloatArray', wind_speed:
'FloatArray', q_air:
'FloatArray', q_surface: 'FloatArray', transfer_coeff: 'FloatArray') ->
'FloatArray'
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.864
bulk_transfer_coefficient
bulk_transfer_coefficient(height: 'FloatArray', roughness:
'FloatArray',
displacement: 'FloatArray' = 0.0, karman: 'FloatArray' = 0.4) ->
'FloatArray'
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.004741
surface_shear_stress
surface_shear_stress(density: 'FloatArray', friction_velocity:
'FloatArray') ->
'FloatArray'
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.11025
aerodynamic_resistance
aerodynamic_resistance(wind_speed: 'FloatArray', height:
'FloatArray', roughness:
'FloatArray', displacement: 'FloatArray' = 0.0, karman: 'FloatArray' =
0.4) -> 'FloatArray'
Neutral aerodynamic resistance to turbulent transfer.
>>> from atmoflux.turbulent import aerodynamic_resistance
>>> round(aerodynamic_resistance(3.0, 10.0, 0.03), 2)
70.3
moist_air_density
moist_air_density(temp: 'FloatArray', pressure: 'FloatArray',
mixing_ratio:
'FloatArray', unit: 'str' = 'C') -> 'FloatArray'
Density of moist air from temperature, pressure, and mixing ratio.
Added in 1.2.0.
>>> from atmoflux.turbulent import moist_air_density
>>> round(moist_air_density(15, 101.325, 0.01), 4)
1.2176
stability — 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: 'FloatArray', temp_upper:
'FloatArray',
wind_upper: 'FloatArray', height_lower: 'FloatArray', height_upper:
'FloatArray', unit: 'str' = 'C') -> 'FloatArray'
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.01091
obukhov_length
obukhov_length(friction_velocity: 'FloatArray', temp:
'FloatArray',
sensible_heat_flux: 'FloatArray', density: 'FloatArray', unit: 'str' =
'C') -> 'FloatArray'
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.334
stability_parameter
stability_parameter(height: 'FloatArray', obukhov_length:
'FloatArray') ->
'FloatArray'
Monin-Obukhov stability parameter zeta = z / L.
>>> from atmoflux.stability import stability_parameter
>>> round(stability_parameter(10.0, -50.0), 2)
-0.2
psi_momentum
psi_momentum(zeta: 'FloatArray') -> 'FloatArray'
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.2836
psi_heat
psi_heat(zeta: 'FloatArray') -> 'FloatArray'
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.5343
stability_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, Hargreaves, and Dalton mass-transfer methods.
latent_heat_to_evaporation
latent_heat_to_evaporation(latent_heat: 'FloatArray', density_water:
'FloatArray' =
1000.0) -> 'FloatArray'
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.527
penman_evaporation
penman_evaporation(net_radiation: 'FloatArray', ground_heat:
'FloatArray', temp:
'FloatArray', wind_2m: 'FloatArray', es: 'FloatArray', ea:
'FloatArray', pressure: 'FloatArray' = 101.325, unit: 'str' =
'C', method: 'str' = 'tetens') -> 'FloatArray'
Open-water evaporation using the Penman combination equation.
Changed in 1.2.0: new method argument selects the saturation vapor pressure formula
for the slope term, "tetens" (default) or "alduchov" (details).
>>> 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.326
penman_monteith
penman_monteith(net_radiation: 'FloatArray', ground_heat:
'FloatArray', temp:
'FloatArray', vpd: 'FloatArray', density: 'FloatArray', resistance_aero:
'FloatArray', resistance_surface: 'FloatArray', pressure: 'FloatArray' =
101.325, unit: 'str' = 'C', method: 'str' = 'tetens') ->
'FloatArray'
Evaporation from the general Penman-Monteith equation.
Changed in 1.2.0: new method argument selects the saturation vapor pressure formula
for the slope term, "tetens" (default) or "alduchov" (details).
>>> 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.133
potential_evapotranspiration
potential_evapotranspiration(net_radiation: 'FloatArray', ground_heat:
'FloatArray',
temp: 'FloatArray', wind_2m: 'FloatArray', es: 'FloatArray', ea:
'FloatArray', pressure: 'FloatArray' = 101.325, unit: 'str' =
'C') -> 'FloatArray'
Reference evapotranspiration from the FAO-56 Penman-Monteith equation.
The FAO-56 standard specifies the Tetens slope; therefore, this function does not include a
method argument.
>>> 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.539
equilibrium_evaporation
equilibrium_evaporation(net_radiation: 'FloatArray', ground_heat:
'FloatArray',
temp: 'FloatArray', pressure: 'FloatArray' = 101.325, unit: 'str' =
'C', method: 'str' = 'tetens') -> 'FloatArray'
Equilibrium evaporation from available energy.
Changed in 1.2.0: new method argument selects the saturation vapor pressure formula
for the slope term, "tetens" (default) or "alduchov" (details).
>>> from atmoflux.hydro import equilibrium_evaporation
>>> round(equilibrium_evaporation(15.0, 0.0, 25.0), 3)
4.521
priestley_taylor
priestley_taylor(net_radiation: 'FloatArray', ground_heat:
'FloatArray', temp:
'FloatArray', alpha: 'FloatArray' = 1.26, pressure: 'FloatArray' =
101.325, unit: 'str' = 'C', method: 'str' = 'tetens') ->
'FloatArray'
Priestley-Taylor evaporation.
Changed in 1.2.0: new method argument selects the saturation vapor pressure formula
for the slope term, "tetens" (default) or "alduchov" (details).
>>> from atmoflux.hydro import priestley_taylor
>>> round(priestley_taylor(15.0, 0.0, 25.0), 3)
5.697
hargreaves
hargreaves(temp_mean: 'FloatArray', temp_min: 'FloatArray',
temp_max:
'FloatArray', extraterrestrial: 'FloatArray', unit: 'str' = 'C')
-> 'FloatArray'
Hargreaves reference evapotranspiration.
>>> from atmoflux.hydro import hargreaves
>>> round(hargreaves(25.0, 18.0, 32.0, 36.0), 3)
5.41
dalton_evaporation
dalton_evaporation(vpd: 'FloatArray', transfer_coeff:
'FloatArray') ->
'FloatArray'
Mass-transfer (Dalton-type) evaporation from the vapor pressure deficit.
The transfer coefficient K (mm/day/kPa) is empirical and site-dependent. A negative vapor
pressure deficit gives negative evaporation, i.e. condensation.
Added in 1.2.0.
>>> from atmoflux.hydro import dalton_evaporation
>>> round(dalton_evaporation(1.2671, 3.0), 3)
3.801
aerosols — Aerosols
Fluxes of particles and non-water trace gases: gravitational settling, resistance-model dry deposition, and surface emission, plus the particle Reynolds number for checking the Stokes regime.
settling_velocity
settling_velocity(diameter: 'FloatArray', particle_density:
'FloatArray', viscosity:
'FloatArray' = 1.789e-05, mean_free_path: 'FloatArray' = 6.63e-08) ->
'FloatArray'
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.092
dry_deposition_velocity
dry_deposition_velocity(settling: 'FloatArray', resistance_aero:
'FloatArray',
resistance_surface: 'FloatArray') -> 'FloatArray'
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.774
emission_flux
emission_flux(concentration: 'FloatArray', transfer_velocity:
'FloatArray') ->
'FloatArray'
Surface emission flux from a transfer velocity and concentration.
>>> from atmoflux.aerosols import emission_flux
>>> emission_flux(2e-6, 0.01)
2e-08
particle_reynolds_number
particle_reynolds_number(diameter: 'FloatArray', velocity:
'FloatArray', density:
'FloatArray' = 1.225, viscosity: 'FloatArray' = 1.789e-05) ->
'FloatArray'
Particle Reynolds number for a particle moving relative to air.
Use it to check settling_velocity: Stokes’ law holds
for particle Reynolds numbers below about 1.
Added in 1.2.0.
>>> from atmoflux.aerosols import settling_velocity, particle_reynolds_number
>>> vs = settling_velocity(10e-6, 1000.0)
>>> round(particle_reynolds_number(10e-6, vs), 5)
0.00212
balance — 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: 'FloatArray', sensible_heat:
'FloatArray',
latent_heat: 'FloatArray', ground_heat: 'FloatArray' = 0.0) ->
'FloatArray'
Surface energy balance closure residual.
>>> from atmoflux.balance import surface_energy_residual
>>> surface_energy_residual(400.0, 150.0, 200.0, 50.0)
0.0
bowen_ratio
bowen_ratio(sensible_heat: 'FloatArray', latent_heat:
'FloatArray') ->
'FloatArray'
Bowen ratio of sensible to latent heat flux.
>>> from atmoflux.balance import bowen_ratio
>>> round(bowen_ratio(150.0, 200.0), 3)
0.75
energy_balance
energy_balance(net_radiation: 'FloatArray', sensible_heat:
'FloatArray',
latent_heat: 'FloatArray', ground_heat: 'FloatArray' = 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.75
available_energy
available_energy(net_radiation: 'FloatArray', ground_heat:
'FloatArray' = 0.0) ->
'FloatArray'
Available energy at the surface.
>>> from atmoflux.balance import available_energy
>>> available_energy(400.0, 50.0)
350.0
energy_balance_ratio
energy_balance_ratio(sensible_heat: 'FloatArray', latent_heat:
'FloatArray',
net_radiation: 'FloatArray', ground_heat: 'FloatArray' = 0.0) ->
'FloatArray'
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.0
ground_heat_fraction
ground_heat_fraction(net_radiation: 'FloatArray', fraction:
'FloatArray' = 0.1)
-> 'FloatArray'
Estimate ground heat flux as a fraction of net radiation.
>>> from atmoflux.balance import ground_heat_fraction
>>> ground_heat_fraction(400.0)
40.0