Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW data-driven radiation model #223

Merged
merged 3 commits into from
Jul 11, 2024
Merged

SW data-driven radiation model #223

merged 3 commits into from
Jul 11, 2024

Conversation

pczarnecki
Copy link
Contributor

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.

@lkluft
Copy link
Member

lkluft commented Jul 4, 2024

Sorry for letting this hang for so long!

Even though I am planning a major refactor of the radiation part, it makes sense to merge your changes for a clean version to reference.

Could you rebase and push your changes again so the checks can run again? I just fixed some technical issues, so hopefully your PR should be green again.

@lkluft
Copy link
Member

lkluft commented Jul 11, 2024

Thanks a lot for adding the ARTS LW component and your quadrature scheme! :)

I guess the only thing that's missing is your name in the CITATION.cff file 😉 Then we're ready to merge 🚀

@pczarnecki
Copy link
Contributor Author

Great, I've added it! Thanks!

@lkluft lkluft merged commit e42c353 into atmtools:main Jul 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants