# transmissivity¶

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_0 & \tau_1 & 1 & 1 \\ \tau_0 & \tau_1 & \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}Tup= \left[ \begin{array}{cccc} 1 & 0 & 0 & 0 \\ \tau_0 & 1 & 0 & 0 \\ \tau_1 \tau_0 & \tau_1 & 1 & 0 \\ \tau_2 \tau_1 \tau_00 & \tau_2 \tau_1 & \tau_2 & 1 \\ \end{array} \right]\end{split}$

and Tdown = transpose(Tup)

Construct an emission vector for the downwelling beam:

Edown = [E0, E1, E2, fromspace]

Now we can get the downwelling beam 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]

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[0] The absorbed radiation in the atmosphere is the flux convergence:

-diff(F)

Methods

 flux_down(self, fluxDownTop[, emission]) Compute upwelling radiative flux at interfaces between layers. flux_up(self, fluxUpBottom[, emission]) Compute downwelling radiative flux at interfaces between layers.
 flux_reflected_up
flux_down(self, 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(self, fluxDown, albedo_sfc=0.0)[source]
flux_up(self, 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]
climlab.radiation.transmissivity.tril(array, k=0)[source]

Lower triangle of an array. Return a copy of an array with elements above the k-th diagonal zeroed. Need a multi-dimensional version here because numpy.tril does not broadcast for numpy verison < 1.9.