nband

digraph inheritance2c4cdf99d1 { bgcolor=transparent; rankdir=LR; ratio=expand; size=""; "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)"]; "FourBandLW" [URL="#climlab.radiation.nband.FourBandLW",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"]; "NbandRadiation" -> "FourBandLW" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "FourBandSW" [URL="#climlab.radiation.nband.FourBandSW",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"]; "NbandRadiation" -> "FourBandSW" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "GreyGas" [URL="climlab.radiation.greygas.html#climlab.radiation.greygas.GreyGas",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="Base class for all band radiation models,"]; "EnergyBudget" -> "GreyGas" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "NbandRadiation" [URL="#climlab.radiation.nband.NbandRadiation",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="Process for radiative transfer."]; "GreyGas" -> "NbandRadiation" [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."]; "ThreeBandSW" [URL="#climlab.radiation.nband.ThreeBandSW",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"]; "NbandRadiation" -> "ThreeBandSW" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "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.nband.FourBandLW(**kwargs)[source]

Bases: NbandRadiation

Closely following SPEEDY / MITgcm longwave model band 0 is window region (between 8.5 and 11 microns) band 1 is CO2 channel (the band of strong absorption by CO2 around 15 microns) band 2 is weak H2O channel (aggregation of spectral regions with weak to moderate absorption by H2O) band 3 is strong H2O channel (aggregation of regions with strong absorption by H2O)

Attributes:
absorptivity
band_fraction
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

emissivity
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)

reflectivity
timestep

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

transmissivity

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.

flux_components_bottom()

Compute the contributions to the downwelling flux to surface due to emissions from each level.

flux_components_top()

Compute the contributions to the outgoing flux to space due to emissions from each level and the surface.

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.nband.FourBandSW(emissivity_sfc=0.0, **kwargs)[source]

Bases: NbandRadiation

A four-band mdoel for shortwave radiation.

The spectral decomposition used here is largely based on the “Moist Radiative-Convective Model” by Aarnout van Delden, Utrecht University a.j.vandelden@uu.nl http://www.staff.science.uu.nl/~delde102/RCM.htm

Four SW channels:

channel 0 is Hartley and Huggins band (UV, 6%, <340 nm) channel 1 is part of visible with no O3 absorption (14%, 340 - 500 nm) channel 2 is Chappuis band (27%, 500 - 700 nm) channel 3 is near-infrared (53%, > 700 nm)

Attributes:
absorptivity
band_fraction
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

emissivity
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)

reflectivity
timestep

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

transmissivity

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.

flux_components_bottom()

Compute the contributions to the downwelling flux to surface due to emissions from each level.

flux_components_top()

Compute the contributions to the outgoing flux to space due to emissions from each level and the surface.

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 emissivity
class climlab.radiation.nband.NbandRadiation(absorber_vmr=None, **kwargs)[source]

Bases: GreyGas

Process for radiative transfer. Solves the discretized Schwarschild two-stream equations with the spectrum divided into N spectral bands.

Every NbandRadiation object has an attribute self.band_fraction with sum(self.band_fraction) == 1 that gives the fraction of the total beam in each band

Also a dictionary self.absorber_vmr that gives the volumetric mixing ratio of every absorbing gas on the same grid as temperature

and a dictionary self.absorption_cross_section that gives the absorption cross-section per unit mass for each gas in every spectral band

Attributes:
absorptivity
band_fraction
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

emissivity
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)

reflectivity
timestep

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

transmissivity

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.

flux_components_bottom()

Compute the contributions to the downwelling flux to surface due to emissions from each level.

flux_components_top()

Compute the contributions to the outgoing flux to space due to emissions from each level and the surface.

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 band_fraction
climlab.radiation.nband.SPEEDY_band_fraction(T)[source]

Python / numpy implementation of the formula used by SPEEDY and MITgcm to partition longwave emissions into 4 spectral bands.

Input: temperature in Kelvin

returns: a four-element array of band fraction

Reproducing here the FORTRAN code from MITgcm/pkg/aim_v23/phy_radiat.F

 EPS3=0.95 _d 0

 DO JTEMP=200,320
   FBAND(JTEMP,0)= EPSLW
   FBAND(JTEMP,2)= 0.148 _d 0 - 3.0 _d -6 *(JTEMP-247)**2
   FBAND(JTEMP,3)=(0.375 _d 0 - 5.5 _d -6 *(JTEMP-282)**2)*EPS3
   FBAND(JTEMP,4)= 0.314 _d 0 + 1.0 _d -5 *(JTEMP-315)**2
   FBAND(JTEMP,1)= 1. _d 0 -(FBAND(JTEMP,0)+FBAND(JTEMP,2)
&                           +FBAND(JTEMP,3)+FBAND(JTEMP,4))
 ENDDO

 DO JB=0,NBAND
   DO JTEMP=lwTemp1,199
     FBAND(JTEMP,JB)=FBAND(200,JB)
   ENDDO
   DO JTEMP=321,lwTemp2
     FBAND(JTEMP,JB)=FBAND(320,JB)
   ENDDO
 ENDDO
class climlab.radiation.nband.ThreeBandSW(emissivity_sfc=0.0, **kwargs)[source]

Bases: NbandRadiation

A three-band mdoel for shortwave radiation.

The spectral decomposition used here is largely based on the “Moist Radiative-Convective Model” by Aarnout van Delden, Utrecht University a.j.vandelden@uu.nl http://www.staff.science.uu.nl/~delde102/RCM.htm

Three SW channels:

channel 0 is Hartley and Huggins band (UV, 1%, 200 - 340 nm) channel 1 is Chappuis band (27%, 450 - 800 nm) channel 2 is remaining radiation (72%)

Attributes:
absorptivity
band_fraction
depth

Depth at grid centers (m)

depth_bounds

Depth at grid interfaces (m)

diagnostics

Dictionary access to all diagnostic variables

emissivity
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)

reflectivity
timestep

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

transmissivity

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.

flux_components_bottom()

Compute the contributions to the downwelling flux to surface due to emissions from each level.

flux_components_top()

Compute the contributions to the outgoing flux to space due to emissions from each level and the surface.

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 emissivity