konrad
konrad copied to clipboard
SW data-driven radiation model
Similarly as in the longwave, I've added a radiation scheme option that implements the quadrature scheme described in Czarnecki, Polvani and Pincus 23 in the shortwave for the clear sky. This includes a corresponding shortwave calculation by ARTS, which can be called for any lines and mirrors the longwave. 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 as well as forcing by CO2. There is also an option to provide your own model configuration and lookup table by calling arts_kwargs = {'quadrature_filename_lw':'/path/to/lw_filename', 'lookup_filename_lw': 'path/to/lw_filename'}, and similarly for the shortwave {'quadrature_filename_sw':'/path/to/sw_filename', 'lookup_filename_sw': 'path/to/sw_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. As with the longwave, the lookup table must be provided for the ARTS line-by-line calculation, and an analogous function to create said lookup table with the ARTS Disort solver has been written.