MeridionalHeatDiffusion

digraph inheritanceee22543792 { bgcolor=transparent; rankdir=LR; ratio=expand; size=""; "AdvectionDiffusion" [URL="climlab.dynamics.AdvectionDiffusion.html#climlab.dynamics.advection_diffusion.AdvectionDiffusion",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 one dimensional implicit advection-diffusion modules."]; "ImplicitProcess" -> "AdvectionDiffusion" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "ImplicitProcess" [URL="climlab.process.implicit.html#climlab.process.implicit.ImplicitProcess",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 modules that use implicit time discretization."]; "TimeDependentProcess" -> "ImplicitProcess" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "MeridionalAdvectionDiffusion" [URL="climlab.dynamics.MeridionalAdvectionDiffusion.html#climlab.dynamics.meridional_advection_diffusion.MeridionalAdvectionDiffusion",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 meridional advection-diffusion processes."]; "AdvectionDiffusion" -> "MeridionalAdvectionDiffusion" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "MeridionalDiffusion" [URL="climlab.dynamics.MeridionalAdvectionDiffusion.html#climlab.dynamics.meridional_advection_diffusion.MeridionalDiffusion",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 meridional diffusion-only processes,"]; "MeridionalAdvectionDiffusion" -> "MeridionalDiffusion" [arrowsize=0.5,dirType=back,style="setlinewidth(0.5)"]; "MeridionalHeatDiffusion" [URL="#climlab.dynamics.meridional_heat_diffusion.MeridionalHeatDiffusion",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 1D diffusion solver for Energy Balance Models."]; "MeridionalDiffusion" -> "MeridionalHeatDiffusion" [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."]; "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)"]; }

Solver for the 1D meridional heat diffusion equation on the sphere:

\[C\frac{\partial}{\partial t} T(\phi,t) = \frac{1}{\cos\phi} \frac{\partial}{\partial \phi} \left[ \cos\phi ~ D ~ \frac{\partial T}{\partial \phi} \right]\]

for a temperature state variable \(T(\phi,t)\), a vertically-integrated heat capacity \(C\), and arbitrary thermal diffusivity \(D(\phi,t)\) in units of W/m2/K.

The diffusivity \(D\) can be a single scalar, or optionally a vector specified at grid cell boundaries (so its length must be exactly 1 greater than the length of \(\phi\)).

\(D\) can be modified by the user at any time (e.g., after each timestep, if it depends on other state variables).

The heat capacity \(C\) is normally handled automatically by CLIMLAB as part of the grid specification.

A fully implicit timestep is used for computational efficiency. Thus the computed tendency \(\frac{\partial T}{\partial t}\) will depend on the timestep.

The diagnostics diffusive_flux and flux_convergence are computed as described in the parent class MeridionalDiffusion. Two additional diagnostics are computed here, which are meaningful if \(T\) represents a zonally averaged temperature:

  • heat_transport given by \(\mathcal{H}(\phi) = -2 \pi ~ a^2 ~ \cos\phi ~ D ~ \frac{\partial T}{\partial \phi}\) in units of PW (petawatts).

  • heat_transport_convergence given by \(-\frac{1}{2 \pi ~a^2 \cos\phi} \frac{\partial \mathcal{H}}{\partial \phi}\) in units of W/m2

Non-uniform grid spacing is supported.

The state variable \(T\) may be multi-dimensional, but the diffusion will operate along the latitude dimension only.

class climlab.dynamics.meridional_heat_diffusion.MeridionalHeatDiffusion(D=0.555, use_banded_solver=False, **kwargs)[source]

Bases: MeridionalDiffusion

A 1D diffusion solver for Energy Balance Models.

Solves the meridional heat diffusion equation

\[C \]

rac{partial T}{partial t} = - rac{1}{cosphi} rac{partial}{partial phi} left[ -D cosphi rac{partial T}{partial phi} ight]

on an evenly-spaced latitude grid, with a state variable \(T\), a heat capacity \(C\) and diffusivity \(D\).

Assuming \(T\) is a temperature in K or degC, then the units are:

  • \(D\) in W m-2 K-1

  • \(C\) in J m-2 K-1

\(D\) is provided as input, and can be either scalar or vector defined at latitude boundaries.

\(C\) is normally handled automatically for temperature state variables in CLIMLAB.

Attributes:
D
K
U
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)

prescribed_flux
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.

property D
_update_diagnostics(newstate)[source]

This method is called each timestep after the new state is computed with the implicit solver. Daughter classes can implement this method to compute any diagnostic quantities using the new state.

_update_diffusivity()[source]