atmtools / konrad

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

added quadrature scheme as radiation option in ARTS class #219

Closed pczarnecki closed 9 months ago

pczarnecki commented 10 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 ARTS as the radiation scheme and setting the kwarg quadrature = True in konrad.RCE: radiation = konrad.radiation.ARTS(arts_kwargs = {'quadrature':True}. Otherwise the default value of quadrature is False and calling the ARTS radiation scheme will use the existing ARTS code. 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. There is also an option to provide your own model configuration and lookup table by calling arts_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.