SimplifiedBettsMiller

A climlab process for the Frierson Simplified Betts Miller convection scheme [Frierson, 2007]:
- Example:
Here is an example of setting up a complete single-column Radiative-Convective model with interactive water vapor. The model includes the following processes:
Constant insolation
Longwave and Shortwave radiation
Surface turbulent fluxes of sensible and latent heat
Moist convection using the Simplified Betts Miller scheme
The state variables for this model will be surface temperature, air temperature, and specific humidity. This model has a simple but self-contained hydrological cycle: water is evaporated from the surface and transported aloft by the moist convection scheme.
The vertical distribution of temperature and humidity at equilibrium will be determined by the interactions between moist convection, radiation, and surface fluxes:
import numpy as np import climlab from climlab.utils import constants as const num_lev = 30 water_depth = 10. short_timestep = const.seconds_per_hour * 3 long_timestep = short_timestep*3 insolation = 342. albedo = 0.18 # set initial conditions -- 24C at the surface, -60C at 200 hPa, isothermal stratosphere strat_idx = 6 Tinitial = np.zeros(num_lev) Tinitial[:strat_idx] = -60. + const.tempCtoK Tinitial[strat_idx:] = np.linspace(-60, 22, num_lev-strat_idx) + const.tempCtoK Tsinitial = 24. + const.tempCtoK full_state = climlab.column_state(water_depth=water_depth, num_lev=num_lev) full_state['Tatm'][:] = Tinitial full_state['Ts'][:] = Tsinitial # Initialize the model with a nearly dry atmosphere qStrat = 5.E-6 # a very small background specific humidity value full_state['q'] = 0.*full_state.Tatm + qStrat temperature_state = {'Tatm':full_state.Tatm,'Ts':full_state.Ts} # Surface model shf = climlab.surface.SensibleHeatFlux(name='Sensible Heat Flux', state=temperature_state, Cd=3E-3, timestep=short_timestep) lhf = climlab.surface.LatentHeatFlux(name='Latent Heat Flux', state=full_state, Cd=3E-3, timestep=short_timestep) surface = climlab.couple([shf,lhf], name="Slab") # Convection scheme -- water vapor is a state variable conv = climlab.convection.SimplifiedBettsMiller(name='Convection', state=full_state, timestep=short_timestep, ) rad = climlab.radiation.RRTMG(name='Radiation', state=temperature_state, specific_humidity=full_state.q, # water vapor is an input here, not a state variable albedo=albedo, insolation=insolation, timestep=long_timestep, icld=0, # no clouds ) atm = climlab.couple([rad, conv], name='Atmosphere') moistmodel = climlab.couple([atm,surface], name='Moist column model') print(moistmodel)Try running this model and verifying that the atmosphere moistens itself via convection, e.g:
moistmodel.integrate_years(1) moistmodel.qwhich should produce something like:
Field([5.00000000e-06, 5.00000000e-06, 5.00000000e-06, 5.00000000e-06, 5.00000000e-06, 5.00000000e-06, 8.55725020e-05, 2.02525334e-04, 4.03568410e-04, 6.98905819e-04, 1.08494727e-03, 1.54761989e-03, 2.06592591e-03, 2.62545894e-03, 3.22046387e-03, 3.84210271e-03, 4.48057560e-03, 5.12535633e-03, 5.76585382e-03, 6.39443880e-03, 7.00456365e-03, 7.47003956e-03, 8.02017591e-03, 8.57294739e-03, 9.10816435e-03, 9.63014344e-03, 1.01386863e-02, 1.06365703e-02, 1.11337461e-02, 1.51187832e-02])showing that humidity is now penetrating up to tropopause.
- class climlab.convection.simplified_betts_miller.SimplifiedBettsMiller(tau_bm=7200.0, rhbm=0.8, do_simp=False, do_shallower=True, do_changeqref=True, do_envsat=True, do_taucape=False, capetaubm=900.0, tau_min=2400.0, **kwargs)[source]
Bases:
TimeDependentProcessThe climlab wrapper for Dargan Frierson’s Simplified Betts Miller moist convection scheme [Frierson, 2007].
Basic characteristics:
State:
Tatm: air temperature in Kq: specific humidity in kg kg-1
Input arguments and default values:
tau_bm = 7200.: Betts-Miller relaxation timescale (seconds)rhbm = 0.8: relative humidity profile to which the scheme is relaxing (dimensionless)do_simp = False: do the simple method where you adjust timescales to make precip continuous always.do_shallower = True: do the shallow convection scheme where it chooses a smaller depth such that precipitation is zero.do_changeqref = True: do the shallow convection scheme where it changes the profile of both q and T in order make precip zero.do_envsat = True: reference profile is rhbm times saturated wrt environment (if false, it’s rhbm times parcel).do_taucape = False: scheme where taubm is proportional to CAPE-1/2capetaubm = 900.: for the above scheme, the value of CAPE (J/kg) for which tau = tau_bm. Ignored unlessdo_taucape == True.tau_min = 2400.: for the above scheme, the minimum relaxation time allowed (seconds). Ignored unlessdo_taucape == True.
Diagnostics:
precipitation: Precipitation rate (column total) in units of kg m-2 s-1 or mm s-1cape: Convective Available Potential Energy (CAPE) in units of J kg-1cin: Convective Inhibition (CIN) in units of J kg-1
See Frierson (2007) for more details.
- Attributes:
- current_time
depthDepth at grid centers (m)
depth_boundsDepth at grid interfaces (m)
diagnosticsDictionary access to all diagnostic variables
- elapsed_time
inputDictionary access to all input variables
latLatitude of grid centers (degrees North)
lat_boundsLatitude of grid interfaces (degrees North)
levPressure levels at grid centers (hPa or mb)
lev_boundsPressure levels at grid interfaces (hPa or mb)
lonLongitude of grid centers (degrees)
lon_boundsLongitude of grid interfaces (degrees)
timestepThe amount of time over which
step_forward()is integrating in unit seconds.timestep_in_secondsReturn a float value representing the timestep in units of seconds
Methods
add_diagnostic(name[, value])Create a new diagnostic variable called
namefor this process and initialize it with the givenvalue.add_input(name[, value])Create a new input variable called
namefor this process and initialize it with the givenvalue.add_subprocess(name, proc[, verbose])Adds a single subprocess to this process.
add_subprocesses(procdict)Adds a dictionary of subproceses to this process.
compute()Computes the tendencies for all state variables given current state and specified input.
compute_diagnostics([num_iter])Compute all tendencies and diagnostics, but don't update model state.
declare_diagnostics(diaglist)Add the variable names in
inputlistto the list of diagnostics.declare_input(inputlist)Add the variable names in
inputlistto the list of necessary inputs.integrate_converge([crit, verbose])Integrates the model until model states are converging.
integrate_days([days, verbose])Integrates the model forward for a specified number of days.
integrate_years([years, verbose])Integrates the model by a given number of years.
remove_diagnostic(name)Removes a diagnostic from the
process.diagnosticdictionary and also delete the associated process attribute.remove_subprocess(name[, verbose])Removes a single subprocess from this process.
set_state(name, value)Sets the variable
nameto a new statevalue.step_forward()Updates state variables with computed tendencies.
to_xarray([diagnostics, timeave])Convert process variables to
xarray.Datasetformat.