Stable Layer#
Submodules#
- Zilitinkevich
ZilitinkevichStateZilitinkevichState.h_sblZilitinkevichState.thetaZilitinkevichState.qZilitinkevichState.co2ZilitinkevichState.uZilitinkevichState.vZilitinkevichState.surf_pressureZilitinkevichState.thetavZilitinkevichState.ustarZilitinkevichState.obukhovZilitinkevichState.wthetaZilitinkevichState.wqZilitinkevichState.wCO2ZilitinkevichState.thetatendZilitinkevichState.qtendZilitinkevichState.co2tendZilitinkevichState.utendZilitinkevichState.vtend
ZilitinkevichModelZilitinkevichModel.init_state()ZilitinkevichModel.run()ZilitinkevichModel.statistics()ZilitinkevichModel.integrate()ZilitinkevichModel.compute_sbl_height()ZilitinkevichModel.compute_thetatend()ZilitinkevichModel.compute_qtend()ZilitinkevichModel.compute_co2tend()ZilitinkevichModel.compute_utend()ZilitinkevichModel.compute_vtend()ZilitinkevichModel.compute_thetav()
Module contents#
- class abcmodel.atmos.stable_layer.ZilitinkevichModel(coriolis_param=0.0001, zilitinkevich_const=0.4, is_wind_prog=True, gamma_theta=0.006, gamma_q=0.0, gamma_co2=0.0, gammau=0.0, gammav=0.0)[source]#
Bases:
objectStable boundary layer model.
Computes the SBL height using the Zilitinkevich (1972) formula and provides tendencies for thermodynamic variables.
- Parameters:
coriolis_param (
float) – Coriolis parameter [s-1]. Default is 1e-4.zilitinkevich_const (
float) – Zilitinkevich constant [-]. Default is 0.4.is_wind_prog (
bool) – Prognostic wind switch. Default is True.gamma_theta (
float) – Free-atmosphere theta lapse rate [K/m]. Default is 0.006.gamma_q (
float) – Free-atmosphere q lapse rate [kg/kg/m]. Default is 0.0.gamma_co2 (
float) – Free-atmosphere CO2 lapse rate [ppm/m]. Default is 0.0.gammau (
float) – Free-atmosphere u lapse rate [s-1]. Default is 0.0.gammav (
float) – Free-atmosphere v lapse rate [s-1]. Default is 0.0.
- init_state(h_sbl=100.0, theta=288.0, q=0.008, co2=422.0, u=6.0, v=-4.0, surf_pressure=101300.0)[source]#
Initialize the SBL state.
- Parameters:
h_sbl (
float) – SBL height [m]. Default 100.0.theta (
float) – SBL potential temperature [K]. Default 288.0.q (
float) – SBL specific humidity [kg/kg]. Default 0.008.co2 (
float) – SBL CO2 [ppm]. Default 422.0.u (
float) – SBL zonal wind [m/s]. Default 6.0.v (
float) – SBL meridional wind [m/s]. Default -4.0.surf_pressure (
float) – Surface pressure [Pa]. Default 101300.0.
- run(state, h_residual)[source]#
Run the SBL model.
Computes SBL height via Zilitinkevich and tendencies.
- Parameters:
state (
AbstractCoupledState) – The coupled state.h_residual (
Array) – Residual layer height [m] (upper bound for SBL).
- Returns:
Updated SBL state.
- statistics(state)[source]#
Compute SBL diagnostic statistics.
- Parameters:
state (
AbstractCoupledState) – Coupled state with SBL.- Returns:
Updated SBL state with diagnostic fields.
- integrate(state, dt)[source]#
Integrate SBL state forward in time.
- Parameters:
state (
ZilitinkevichState) – SBL state.dt (
float) – Time step [s].
- Returns:
Updated SBL state.
- compute_sbl_height(ustar, obukhov, h_residual)[source]#
Compute SBL height using the Zilitinkevich (1972) formula.
\[h_{sbl} = C_z \, \sqrt{\frac{u_* \, L}{f}}\]where \(C_z\) is the Zilitinkevich constant, \(u_*\) is the friction velocity, \(L\) is the Obukhov length (positive in stable conditions), and \(f\) is the Coriolis parameter.
The result is clamped between 10 m and
h_residual.- Parameters:
ustar (
Array) – Friction velocity [m/s].obukhov (
Array) – Obukhov length [m] (positive in stable conditions).h_residual (
Array) – Residual layer height [m] (upper bound).
- Returns:
SBL height [m].
- compute_thetatend(h_sbl, wtheta)[source]#
Compute potential temperature tendency for SBL.
\[\frac{d\theta}{dt} = \frac{w'\theta'}{h_{sbl}}\]where \(w'\theta'\) is the surface kinematic heat flux (negative at night, cooling the SBL).
- Parameters:
h_sbl (
Array) – SBL height [m].wtheta (
Array) – Surface kinematic heat flux [K m/s].
- Returns:
Potential temperature tendency [K/s].
- compute_qtend(h_sbl, wq)[source]#
Compute specific humidity tendency for SBL.
\[\frac{dq}{dt} = \frac{w'q'}{h_{sbl}}\]- Parameters:
h_sbl (
Array) – SBL height [m].wq (
Array) – Surface kinematic moisture flux [kg/kg m/s].
- Returns:
Specific humidity tendency [kg/kg/s].
- compute_co2tend(h_sbl, wCO2)[source]#
Compute CO2 tendency for SBL.
\[\frac{dCO_2}{dt} = \frac{w'CO_2'}{h_{sbl}}\]- Parameters:
h_sbl (
Array) – SBL height [m].wCO2 (
Array) – Surface kinematic CO2 flux [mgC/m²/s].
- Returns:
CO2 tendency [ppm/s].
- compute_utend(h_sbl, uw, du, dv)[source]#
Compute zonal wind tendency for the SBL.
\[\frac{du}{dt} = -f \, dv - \frac{\overline{u'w'}}{h_{sbl}}\]where \(\overline{u'w'}\) is the surface momentum flux and \(f\) is the Coriolis parameter.
- Parameters:
h_sbl (
Array) – SBL height [m].uw (
Array) – Surface zonal momentum flux [m²/s²].du (
Array) – Zonal wind jump at SBL top [m/s].dv (
Array) – Meridional wind jump at SBL top [m/s].
- Returns:
Zonal wind tendency [m/s²].
- compute_vtend(h_sbl, vw, du, dv)[source]#
Compute meridional wind tendency for the SBL.
\[\frac{dv}{dt} = f \, du - \frac{\overline{v'w'}}{h_{sbl}}\]- Parameters:
h_sbl (
Array) – SBL height [m].vw (
Array) – Surface meridional momentum flux [m²/s²].du (
Array) – Zonal wind jump at SBL top [m/s].dv (
Array) – Meridional wind jump at SBL top [m/s].
- Returns:
Meridional wind tendency [m/s²].
- class abcmodel.atmos.stable_layer.ZilitinkevichState(h_sbl, theta, q, co2, u, v, surf_pressure, thetav=<factory>, ustar=<factory>, obukhov=<factory>, wtheta=<factory>, wq=<factory>, wCO2=<factory>, thetatend=<factory>, qtend=<factory>, co2tend=<factory>, utend=<factory>, vtend=<factory>)[source]#
Bases:
AbstractStateStable boundary layer (SBL) state.
Fields with default_factory are diagnostic and are populated during
run(); user-provided fields are set at initialization.- h_sbl: Array#
- theta: Array#
- q: Array#
- co2: Array#
- u: Array#
- v: Array#
- surf_pressure: Array#
- thetav: Array#
- ustar: Array#
- obukhov: Array#
- wtheta: Array#
- wq: Array#
- wCO2: Array#
- thetatend: Array#
- qtend: Array#
- co2tend: Array#
- utend: Array#
- vtend: Array#