Boltzmann

- class climlab.radiation.boltzmann.Boltzmann(eps=0.65, tau=0.95, **kwargs)[source]
Bases:
EnergyBudgetA class for black body radiation.
Implements a radiation subprocess which computes longwave radiation with the Stefan-Boltzmann law for black/grey body radiation.
According to the Stefan Boltzmann law the total power radiated from an object with surface area \(A\) and temperature \(T\) (in unit Kelvin) can be written as
\[P = A \varepsilon \sigma T^4\]where \(\varepsilon\) is the emissivity of the body.
As the
EnergyBudgetof the Energy Balance Model is accounted in unit \(\textrm{energy} / \textrm{area}\) (\(\textrm{W}/ \textrm{m}^2\)) the energy budget equation looks like this:\[C \frac{dT}{dt} = R\downarrow - R\uparrow - H\]The
Boltzmannradiation subprocess represents the outgoing radiation \(R\uparrow\) which then can be written as\[R\uparrow = \varepsilon \sigma T^4\]with state variable \(T\).
Initialization parameters
An instance of
Boltzmannis initialized with the following arguments:- Parameters:
Object attributes
During initialization both arguments described above are created as object attributes which calls their setter function (see below).
- Variables:
- Example:
Replacing an the regular AplusBT subprocess in an energy balance model:
>>> import climlab >>> from climlab.radiation.Boltzmann import Boltzmann >>> # creating EBM model >>> model = climlab.EBM() >>> print model
climlab Process of type <class 'climlab.model.ebm.EBM'>. State variables and domain shapes: Ts: (90, 1) The subprocess tree: top: <class 'climlab.model.ebm.EBM'> diffusion: <class 'climlab.dynamics.diffusion.MeridionalDiffusion'> LW: <class 'climlab.radiation.AplusBT.AplusBT'> albedo: <class 'climlab.surface.albedo.StepFunctionAlbedo'> iceline: <class 'climlab.surface.albedo.Iceline'> cold_albedo: <class 'climlab.surface.albedo.ConstantAlbedo'> warm_albedo: <class 'climlab.surface.albedo.P2Albedo'> insolation: <class 'climlab.radiation.insolation.P2Insolation'>>>> # creating and adding albedo feedback subprocess >>> LW_boltz = Boltzmann(eps=0.69, tau=0.98, state=model.state, **model.param) >>> # overwriting old 'LW' subprocess with same name >>> model.add_subprocess('LW', LW_boltz) >>> print model
climlab Process of type <class 'climlab.model.ebm.EBM'>. State variables and domain shapes: Ts: (90, 1) The subprocess tree: top: <class 'climlab.model.ebm.EBM'> diffusion: <class 'climlab.dynamics.diffusion.MeridionalDiffusion'> LW: <class 'climlab.radiation.Boltzmann.Boltzmann'> albedo: <class 'climlab.surface.albedo.StepFunctionAlbedo'> iceline: <class 'climlab.surface.albedo.Iceline'> cold_albedo: <class 'climlab.surface.albedo.ConstantAlbedo'> warm_albedo: <class 'climlab.surface.albedo.P2Albedo'> insolation: <class 'climlab.radiation.insolation.P2Insolation'>- Attributes:
- current_time
depthDepth at grid centers (m)
depth_boundsDepth at grid interfaces (m)
diagnosticsDictionary access to all diagnostic variables
- elapsed_time
epsProperty of emissivity parameter.
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)
tauProperty of the transmissivity parameter.
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.- property eps
Property of emissivity parameter.
- Getter:
Returns the albedo value which is stored in attribute
self._eps- Setter:
sets the emissivity which is addressed as
self._epsto the new valueupdates the parameter dictionary
self.param['eps']
- Type: