transmissivity

digraph inheritance5753cfd9b8 { bgcolor=transparent; rankdir=LR; ratio=expand; size=""; "Transmissivity" [URL="#climlab.radiation.transmissivity.Transmissivity",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="Class for calculating and store transmissivity between levels,"]; }
class climlab.radiation.transmissivity.Transmissivity(absorptivity, reflectivity=None, axis=0)[source]

Bases: object

Class for calculating and store transmissivity between levels, and computing radiative fluxes between levels.

Input: numpy array of absorptivities. It is assumed that the last dimension is vertical levels.

Attributes: (all stored as numpy arrays):

  • N: number of levels

  • absorptivity: level absorptivity (N)

  • transmissivity: level transmissivity (N)

  • Tup: transmissivity matrix for upwelling beam (N+1, N+1)

  • Tdown: transmissivity matrix for downwelling beam (N+1, N+1)

Example for N = 3 atmospheric layers:

tau is a vector of transmissivities

\[\tau = \left[ 1, \tau_0, \tau_1, \tau_2 \right]\]

A is a matrix

\[\begin{split}A= \left[ \begin{array}{cccc} 1 & 1 & 1 & 1 \\ \tau_0 & 1 & 1 & 1 \\ \tau_1 & \tau_1 & 1 & 1 \\ \tau_2 & \tau_2 & \tau_2 & 1 \\ \end{array} \right]\end{split}\]

We then take the cumulative product along columns, and finally take the lower triangle of the result to get

\[\begin{split}T_{down} = \left[ \begin{array}{cccc} 1 & 0 & 0 & 0 \\ \tau_0 & 1 & 0 & 0 \\ \tau_0 \tau_1 & \tau_1 & 1 & 0 \\ \tau_0 \tau_1 \tau_2 & \tau_1 \tau_2 & \tau_2 & 1 \\ \end{array} \right]\end{split}\]

and Tup = transpose(Tdown)

Construct a column emission vector for the downwelling beam:

\[\begin{split}E_{down} = \left[ \begin{array}{c} ext{flux_from_space} \\ E0 \\ E1 \\ E2 \\ \end{array} \right]\end{split}\]

Now we can get the downwelling beam at layer interfaces by matrix multiplication:

D = Tdown * Edown

For the upwelling beam, we start by adding the reflected part at the surface to the surface emissions:

Eup = [emit_sfc + albedo_sfc*D[0], E0, E1, E2]

\[\begin{split}Eup = \left[ \begin{array}{c} E0 \\ E1 \\ E2 \\ emit_{sfc} + albedo_{sfc} * D[-1] \end{array} \right]\end{split}\]

So that the upwelling flux is

U = Tup * Eup

The total flux, positive up is thus

F = U - D

The absorbed radiation at the surface is then -F[-1] The absorbed radiation in the atmosphere is the flux convergence:

-diff(F)

Methods

flux_down(fluxDownTop[, emission])

Compute upwelling radiative flux at interfaces between layers.

flux_up(fluxUpBottom[, emission])

Compute downwelling radiative flux at interfaces between layers.

flux_reflected_up

flux_down(fluxDownTop, emission=None)[source]

Compute upwelling radiative flux at interfaces between layers.

Inputs:

  • fluxUpBottom: flux up from bottom

  • emission: emission from atmospheric levels (N) defaults to zero if not given

Returns:
  • vector of upwelling radiative flux between levels (N+1) element N is the flux up to space.

flux_reflected_up(fluxDown, albedo_sfc=0.0)[source]
flux_up(fluxUpBottom, emission=None)[source]

Compute downwelling radiative flux at interfaces between layers.

Inputs:

  • fluxDownTop: flux down at top

  • emission: emission from atmospheric levels (N) defaults to zero if not given

Returns:

  • vector of downwelling radiative flux between levels (N+1) element 0 is the flux down to the surface.

climlab.radiation.transmissivity.compute_T_vectorized(transmissivity)[source]