heat_capacity

Routines for calculating heat capacities for grid boxes.

climlab.utils.heat_capacity.atmosphere(dp)[source]

Returns heat capacity of a unit area of atmosphere, in units J /m**2 / K.

\[C_a = \frac{c_p \cdot dp \cdot f_{\textrm{mb-to-Pa}}}{g}\]

where

variable

value

unit

description

\(C_a\)

output

\(\textrm{J} / \textrm{m}^2 / \textrm{K}\)

heat capacity for atmospheric cell

\(c_p\)

\(1004.\)

\(\textrm{J} / \textrm{kg} / \textrm{K}\)

specific heat at constant pressure for dry air

\(dp\)

input

\(\textrm{mb}\)

pressure for atmospheric cell

\(f_{\textrm{mb-to-Pa}}\)

\(100\)

\(\textrm{Pa} / \textrm{mb}\)

conversion factor from mb to Pa

\(g\)

\(9.8\)

\(\textrm{m} / \textrm{s}^2\)

gravitational acceleration

Function-call argument

Parameters:

dp (array) – pressure intervals (unit: mb)

Returns:

the heat capacity for atmosphere cells correspoding to pressure input (unit: J /m**2 / K)

Return type:

array

Example:

Calculate atmospheric heat capacity for pressure intervals of 1, 10, 100 mb:

>>> from climlab.utils import heat_capacity

>>> pressure_interval = array([1,10,100]) # in mb
>>> heat_capacity.atmosphere(pressure_interval) # in J /m**2 / K
array([   10244.89795918,   102448.97959184,  1024489.79591837])
climlab.utils.heat_capacity.ocean(dz)[source]

Returns heat capacity of a unit area of water, in units J /m**2 / K.

\[C_o = \rho_w \cdot c_w \cdot dz\]

where

variable

value

unit

description

\(C_o\)

output

\(\textrm{J} / \textrm{m}^2 / \textrm{K}\)

heat capacity for oceanic cell

\(c_w\)

\(4181.3\)

\(\textrm{J} / \textrm{kg} / \textrm{K}\)

specific heat of liquid water

\(dz\)

input

\(\textrm{m}\)

water depth of oceanic cell

\(\rho_w\)

\(1000.\)

\(\textrm{kg} / \textrm{m}^3\)

density of water

Function-call argument

Parameters:

dz (array) – water depth of ocean cells (unit: m)

Returns:

the heat capacity for ocean cells correspoding to depth input (unit: J /m**2 / K)

Return type:

array

Example:

Calculate atmospheric heat capacity for pressure intervals of 1, 10, 100 m:

>>> from climlab.utils import heat_capacity

>>> pressure_interval = array([1,10,100]) # in m
>>> heat_capacity.ocean(pressure_interval) # in J /m**2 / K
array([  4.18130000e+06,   4.18130000e+07,   4.18130000e+08])
climlab.utils.heat_capacity.slab_ocean(water_depth)[source]

Returns heat capacity of a unit area slab of water, in units of J / m**2 / K.

Takes input argument water_depth and calls ocean()

Function-call argument

Parameters:

float – water depth of slab ocean (unit: m)

Returns:

the heat capacity for slab ocean cell (unit: J / m**2 / K)

Return type:

float