GreyGas¶
digraph inheritance11bbc52178 { 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)"]; "GreyGas" [URL="#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)"]; "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)"]; }- class climlab.radiation.greygas.GreyGas(absorptivity=None, reflectivity=None, emissivity_sfc=1.0, albedo_sfc=0.0, **kwargs)[source]¶
Bases:
EnergyBudget
Base class for all band radiation models, including grey and semi-grey model.
Input argument absorptivity is band absorptivity (should be same size as the grid).
By default emissivity = absorptivity. Subclasses can override this is necessary (e.g. for shortwave model).
The following boundary and input values need to be specified by user or parent process: - albedo_sfc (default is zero) - flux_from_space - absorptivity - reflectivity (default is zero) These are accessible (and settable) as process attributes Also stored in process.input dictionary
The following values are computed are stored in the .diagnostics dictionary: - flux_from_sfc - flux_to_sfc - flux_to_space - absorbed - absorbed_total - emission - emission_sfc - flux_reflected_up (all in W/m2)
- Attributes:
- absorptivity
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 givenvalue
.add_input
(name[, value])Create a new input variable called
name
for this process and initialize it with the givenvalue
.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.Compute the contributions to the downwelling flux to surface due to emissions from each level.
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 statevalue
.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 absorptivity¶
- property emissivity¶
- flux_components_bottom()[source]¶
Compute the contributions to the downwelling flux to surface due to emissions from each level.
- flux_components_top()[source]¶
Compute the contributions to the outgoing flux to space due to emissions from each level and the surface.
- property reflectivity¶
- property transmissivity¶
- class climlab.radiation.greygas.GreyGasSW(albedo_sfc=0.33, emissivity_sfc=0.0, **kwargs)[source]¶
Bases:
GreyGas
Emissivity is always set to zero for shortwave classes.
- Attributes:
- absorptivity
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 givenvalue
.add_input
(name[, value])Create a new input variable called
name
for this process and initialize it with the givenvalue
.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 statevalue
.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¶