atmtools / konrad

Implementation of a radiative-convective equilibrium model.
MIT License
19 stars 18 forks source link

added quadrature scheme as radiation option #217

Closed pczarnecki closed 10 months ago

pczarnecki commented 11 months ago

I've added a radiation scheme option that implements the quadrature scheme described in Czarnecki, Pincus and Polvani 23 in the longwave for the clear sky. The shortwave is handled by RRTMG, as in the implementation of ARTS. The scheme can be called by using radiation = konrad.radiation.quadrature() in konrad.rce(). The default setting is to use a lookup table for a quadrature configuration of 64 spectral points trained on fluxes and heating rates in the present day, with heating rates computed using a second order accurate difference, as in np.gradient. The lookup tables and configuration files for this model are provided in konrad/konrad/radiation/data. There is also an option to provide your own model configuration and lookup table by calling quadrature_kwargs = {'quadrature_filename':'/path/to/filename', 'lookup_filename': 'path/to/filename'}, where the quadrature file is an xarray with variable W (weights) and S (wavenumbers), and the lookup table is compatible with ARTS. If 'lookup_filename': None, the monochromatic fluxes will be computed on-the-fly with ARTS.