Surface

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

Abstract base class to define requirements for surface models.

__init__(temperature=288.0, albedo=0.2, longwave_emissivity=1, height=0.0)[source]

Initialize a surface model.

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 (float) – Surface height [m].

Methods

__init__([temperature, albedo, ...])

Initialize a surface model.

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

Adjust the surface according to 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.