|
| | __init__ (self, dt, method, name, tag, case, grid, prognostic_variables, attrs=None, mf_max=0.05, mf_dtheta=.5, mf_rt_factor=1.2, do_adjustment=True, do_shallow=True, do_turb=True) |
| | setup (self, init_state, duration) |
| | step (self, state, timestep, timestep_number) |
| | __init__ (self, dt, method, name, tag, case, grid, prognostic_variables) |
| | budget_add (self, state, key, value) |
| | budget_fields (self, state) |
| | budget_record (self, state, before, scheme, process, variables, timestep) |
| | finalize (self) |
| | execute (self, previous_state, timestep, timestep_number) |
| | add_vertical_coordinate (self, state) |
| | add_conversions (self, state) |
| | build_init_state (self, init_state) |
| | forcing (self, state, timestep, timestep_number) |
|
| | _k_diff (self, theta, rv, u, v, ctx, sfth, sfrv, sfu, sfv, timestep) |
| | _preparation (self, state) |
| | _adjust (self, theta, rv, rc, ctx) |
| | _surface (self, state, ctx) |
| | _massflux (self, state, ctx, timestep) |
Simplified physics scheme.
Features:
- all-or-nothing saturation adjustment (liquid only)
- K-gradient turbulence with constant K
- mass-flux shallow convection (prescribed half-sine profile)
- WASP or prescribed surface fluxes
- only vapour (v) and cloud liquid water (c)
Definition at line 12 of file simple_physics.py.
| pyphyex.phyex1d.simple_physics.SimplePhysics._k_diff |
( |
| self, |
|
|
| theta, |
|
|
| rv, |
|
|
| u, |
|
|
| v, |
|
|
| ctx, |
|
|
| sfth, |
|
|
| sfrv, |
|
|
| sfu, |
|
|
| sfv, |
|
|
| timestep ) |
|
protected |
K-gradient diffusion tendencies for all variables in one pass.
Uses an implicit tridiagonal solver following PHYEX's TRIDIAG_THERMO.
Parameters
----------
theta : ndarray (nz,) — potential temperature
rv : ndarray (nz,) — water vapour mixing ratio
u, v : ndarray (nz,) — wind components
ctx : dict — context from _preparation
sfth, sfrv, sfu, sfv : float — surface fluxes
timestep : float — time step (s)
Returns
-------
tuple of ndarray — (tend_theta, tend_rv, tend_u, tend_v)
Definition at line 53 of file simple_physics.py.
| pyphyex.phyex1d.simple_physics.SimplePhysics._massflux |
( |
| self, |
|
|
| state, |
|
|
| ctx, |
|
|
| timestep ) |
|
protected |
Mass-flux shallow convection scheme with implicit tridiagonal solver
following PHYEX's TRIDIAG_MASSFLUX.
Updraft properties equal near-surface values (no perturbation).
Cloud top is the first flux level above ground where environmental
theta_l equals the updraft theta_l. The mass-flux profile is a
half-sine (0 at surface, 0 at cloud top, max in the middle).
Parameters
----------
timestep : float — time step (s)
Returns
-------
tend_theta_l : ndarray (nkt,) — theta_l tendency (K/s)
tend_rt : ndarray (nkt,) — total-water tendency (kg/kg/s)
tend_u : ndarray (nkt,) — u-wind tendency (m/s²)
tend_v : ndarray (nkt,) — v-wind tendency (m/s²)
Definition at line 410 of file simple_physics.py.