Radiation

_Radiation, _Radiation_SW and _Radiation_LW are the base classes for radiative transfer modules

Currently this includes CAM3, RRTMG, RRTMG_LW, and RRTMG_SW

Basic characteristics:

State:

  • Ts (surface radiative temperature)

  • Tatm (air temperature)

Input arguments (both LW and SW):

  • specific_humidity (kg/kg)

  • absorber_vmr = None (dictionary of volumetric mixing ratios. Default values supplied if None)

  • cldfrac (layer cloud fraction

  • clwp (in-cloud liquid water path (g/m2))

  • ciwp = 0., # in-cloud ice water path (g/m2)

  • r_liq = 0., # Cloud water drop effective radius (microns)

  • r_ice = 0., # Cloud ice particle effective size (microns)

  • ozone_file = 'apeozone_cam3_5_54.nc' (file with ozone distribution - ignored if absorber_vmr is given)

If absorber_vmr = None then ozone will be interpolated to the model grid from a climatology file, or set to zero if ozone_file = None.

Additional input arguments for SW:

  • albedo = None (optional, single parameter to set all 4 albedo values)

  • aldif = 0.3, (near-infrared albedo, diffuse)

  • aldir = 0.3, (near-infrared albedo, direct)

  • asdif = 0.3, (shortwave albedo, diffuse)

  • asdir = 0.3, (shortwave albedo, direct)

  • S0 = const.S0, (solar constant, W/m2)

  • insolation = const.S0/4., (time-mean insolaltion, W/m2)

  • coszen = None, # cosine of the solar zenith angle

  • eccentricity_factor = 1., # instantaneous irradiance = S0 * eccentricity_factor

Additional input arguments for LW:
  • emissivity = 1., # surface emissivity

  • return_spectral_olr = False, # Whether or not to return spectrally-decomposed Outgoing Longwave Radiation (implemented for RRTMG only)

Shortave processes compute these diagnostics (minimum):

  • ASR (W/m2, net Absorbed Shortwave Radiation at TOA, positive down)

  • ASRclr (clear-sky component)

  • ASRcld (cloud component, all-sky minus clear-sky)

  • SW_flux_up (W/m2, defined at pressure level interfaces)

  • SW_flux_down (W/m2, defined at pressure level interfaces)

  • SW_flux_net (W/m2 downward net flux at pressure level interfaces)

  • SW_flux_up_clr (clear-sky flux)

  • SW_flux_down_clr (clear-sky flux)

  • SW_flux_net_clr (clear-sky flux)

  • TdotSW (K/day, radiative heating rate)

  • TdotSW_clr (clear-sky heating rate)

Longwave processes compute these diagnostics (minimum):

  • OLR (W/m2, net Outgoing Longwave radiation at TOA, positive up)

  • OLRclr (clear-sky component)

  • OLRcld (cloud component, all-sky minus clear-sky)

  • LW_flux_up (W/m2, defined at pressure level interfaces)

  • LW_flux_down (W/m2, defined at pressure level interfaces)

  • LW_flux_net (W/m2 upward net flux at pressure level interfaces)

  • LW_flux_up_clr (clear-sky flux)

  • LW_flux_down_clr (clear-sky flux)

  • LW_flux_net_clr (clear-sky flux)

  • TdotLW (K/day, radiative heating rate)

  • TdotLW_clr (clear-sky heating rate)

If return_spectral_olr = True (RRTMG only), an additional diagnostic is produced:

  • OLR_spectral (W/m2, Outgoing Longwave Radiation at TOA in spectral bands, positive up)

class climlab.radiation.radiation._Radiation(specific_humidity=None, absorber_vmr=None, cldfrac=0.0, clwp=0.0, ciwp=0.0, r_liq=0.0, r_ice=0.0, ozone_file='apeozone_cam3_5_54.nc', **kwargs)[source]

Bases: EnergyBudget

Abstact base class for SW and LW radiation processes.

Attributes:
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

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)

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.

class climlab.radiation.radiation._Radiation_LW(emissivity=1.0, **kwargs)[source]

Bases: _Radiation

Attributes:
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

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)

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.

_compute_LW_flux_diagnostics()[source]
class climlab.radiation.radiation._Radiation_SW(albedo=None, aldif=0.3, aldir=0.3, asdif=0.3, asdir=0.3, S0=1365.2, insolation=341.3, coszen=None, eccentricity_factor=1.0, **kwargs)[source]

Bases: _Radiation

Parent class for SW radiation modules

Attributes:
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

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)

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.

_compute_SW_flux_diagnostics()[source]
climlab.radiation.radiation.default_absorbers(Tatm, ozone_file='apeozone_cam3_5_54.nc', verbose=True)[source]

Initialize a dictionary of well-mixed radiatively active gases All values are volumetric mixing ratios.

Ozone is set to a climatology.

All other gases are assumed well-mixed:

  • CO2

  • CH4

  • N2O

  • O2

  • CFC11

  • CFC12

  • CFC22

  • CCL4

Specific values are based on the AquaPlanet Experiment protocols, except for O2 which is set the realistic value 0.21 (affects the RRTMG scheme).

climlab.radiation.radiation.default_specific_humidity(Tatm)[source]

Initialize a specific humidity distribution based on a prescribed relative humidity profile.

Input is air temperature array

Output is specific humidity on same grid

climlab.radiation.radiation.init_interface(field)[source]

Return a Field object defined at the vertical interfaces of the input Field object.