Boltzmann

digraph inheritanced6752ff870 { bgcolor=transparent; rankdir=LR; ratio=expand; size=""; "Boltzmann" [URL="#climlab.radiation.boltzmann.Boltzmann",dirType=back,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=14,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class for black body radiation."]; "EnergyBudget" -> "Boltzmann" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "EnergyBudget" [URL="climlab.process.energy_budget.html#climlab.process.energy_budget.EnergyBudget",dirType=back,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=14,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A parent class for explicit energy budget processes."]; "TimeDependentProcess" -> "EnergyBudget" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "Process" [URL="climlab.process.process.html#climlab.process.process.Process",dirType=back,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=14,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A generic parent class for all climlab process objects."]; "TimeDependentProcess" [URL="climlab.process.time_dependent_process.html#climlab.process.time_dependent_process.TimeDependentProcess",dirType=back,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=14,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A generic parent class for all time-dependent processes."]; "Process" -> "TimeDependentProcess" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; }
class climlab.radiation.boltzmann.Boltzmann(eps=0.65, tau=0.95, **kwargs)[source]

Bases: EnergyBudget

A 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 EnergyBudget of 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 \n\]

The Boltzmann radiation 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 n

An instance of Boltzmann is initialized with the following arguments:

Parameters:
  • eps (float) – emissivity of the planet’s surface which is the effectiveness in emitting energy as thermal radiation [default: 0.65]

  • tau (float) – transmissivity of the planet’s atmosphere which is the effectiveness in transmitting the longwave radiation emitted from the surface [default: 0.95]

Object attributes n

During initialization both arguments described above are created as object attributes which calls their setter function (see below).

Variables:
  • eps (float) – calls the setter function of eps()

  • tau (float) – calls the setter function of tau()

  • diagnostics (dict) – the subprocess’s diagnostic dictionary self.diagnostic is initialized through calling self.add_diagnostic('OLR', 0. * self.Ts)

  • OLR (Field) – the subprocess attribute self.OLR is created with correct dimensions

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:
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

eps

Property of emissivity parameter.

input

Dictionary access to all input variables

lat

Latitude of grid centers (degrees North)

lat_bounds

Latitude of grid interfaces (degrees North)

lev

Pressure levels at grid centers (hPa or mb)

lev_bounds

Pressure levels at grid interfaces (hPa or mb)

lon

Longitude of grid centers (degrees)

lon_bounds

Longitude of grid interfaces (degrees)

tau

Property of the transmissivity parameter.

timestep

The amount of time over which step_forward() is integrating in unit seconds.

Methods

add_diagnostic(name[, value])

Create a new diagnostic variable called name for this process and initialize it with the given value.

add_input(name[, value])

Create a new input variable called name for this process and initialize it with the given value.

add_subprocess(name, proc)

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 inputlist to the list of diagnostics.

declare_input(inputlist)

Add the variable names in inputlist to 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.diagnostic dictionary 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 name to a new state value.

set_timestep([timestep, num_steps_per_year])

Calculates the timestep in unit seconds and calls the setter function of timestep()

step_forward()

Updates state variables with computed tendencies.

to_xarray([diagnostics])

Convert process variables to xarray.Dataset format.

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._eps to the new value

  • updates the parameter dictionary self.param['eps']

Type:

float

property tau

Property of the transmissivity parameter.

Getter:

Returns the albedo value which is stored in attribute self._tau

Setter:
  • sets the emissivity which is addressed as self._tau to the new value

  • updates the parameter dictionary self.param['tau']

Type:

float