SlabOcean

class konrad.surface.SlabOcean(*args, **kwargs)[source]

Surface model with adjustable temperature.

__init__(depth=50.0, heat_sink=66.0, **kwargs)[source]

Initialize a slab ocean.

Parameters
  • temperature (float) – Surface temperature [K].

  • albedo (float) – Surface albedo [1]. The default value of 0.2 is a decent choice for clear-sky simulation in the tropics.

  • longwave_emissivity (float) – Longwave emissivity [1].

  • height (int / float) – Surface height [m].

  • heat_sink (float) – Flux of energy out of the surface [W m^-2]. The default value represents a surface enthalpy transport to the extra-tropics.

  • depth (float) – Ocean depth [m].

Methods

__init__([depth, heat_sink])

Initialize a slab ocean.

adjust(sw_down, sw_up, lw_down, lw_up, timestep)

Increase the surface temperature using given radiative fluxes.

create_variable(name[, data, dims])

Create a variable in the model component.

from_atmosphere(atmosphere, **kwargs)

Initialize the surface by extrapolating the atmospheric temperature.

from_netcdf(ncfile[, timestep])

Create a surface model from a netCDF file.

get(variable[, default, keepdims])

Get values of a given variable.

hash_attributes()

Create a hash from all hashable component attributes.

set(variable, value)

Set the values of a variable.

to_dataset()

Convert model component into an xarray.Dataset.

Attributes

attrs

Dictionary containing all attributes.

data_vars

Dictionary containing all data variables and their dimensions.

netcdf_subgroups

Define subgroups used when storing to netCDF file.