-
Notifications
You must be signed in to change notification settings - Fork 46
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
Include the option of McICA for the shortwave component of RRTMG #83
Conversation
We need to get the code passing tests. This means a couple of things:
|
|
||
num_reduced_g_intervals = self.num_reduced_g_intervals | ||
mid_levels = state['air_pressure'].shape[0] | ||
mcica_properties = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be set to zero, or taken as inputs and put into input_properties
? Will this even work with a cloud water droplet radius of zero?
@@ -196,7 +200,10 @@ def __init__( | |||
ignore_day_of_year=False, | |||
facular_sunspot_amplitude=None, | |||
solar_variability_by_band=None, | |||
aerosol_type='no_aerosol', **kwargs): | |||
aerosol_type='no_aerosol', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a description of what these additional keyword arguments do to the docstring of this method.
Thanks for the PR! I will go through the code this week, but I wanted to mention that the reason there climt/climt/_lib/rrtmg_sw/rrtmg_sw_rad.nomcica.f90 Lines 813 to 814 in 707909e
which cause RRTMG to violate energy conservation. This is done in the LW code as well. I have no idea why they decided to zero out these values. This might be ok for GCMs (which is where RRTMG is meant to be used) which have numerical dissipation in the upper model levels, but it used to |
…s cloud area fractions.
…t they are only defined when mcica is being used and added comments to explain them.
Codecov Report
@@ Coverage Diff @@
## develop #83 +/- ##
===========================================
- Coverage 93.27% 92.96% -0.31%
===========================================
Files 33 33
Lines 1324 1337 +13
===========================================
+ Hits 1235 1243 +8
- Misses 89 94 +5
Continue to review full report at Codecov.
|
Thanks again for this work! I will review the code this week and wrap this up. Have you updated HISTORY? You can add a comment to the top of HISTORY.rst to ensure we are |
And before I forget, please also add your names to AUTHORS.rst! |
This looks great!! I will be happy to merge this once you update HISTORY and AUTHORS. |
Great! I'm going to ignore codedov. I will probably add some tests as well. |
I got stuck pretty much straight away and asked @skosukhin for help. He kindly agreed and decided to start from the original rrtmg files and to change those files as little as possible, to make it easier to update to a newer version of rrtmg in the future. Both the nomcica and mcica versions work and produce results very similar to those from @JoyMonteiro 's implementation of the nomcica rrtmg, except in the uppermost model level. I don't know why.
On the python side, I added a dictionary with the extra properties required for mcica, but I expect you might want to move this and add the * dimension. Let me know if you have any comments or suggestions and I can try to include them, or feel free to edit it yourselves!
Oh and I have no idea what the input parameter iplon in the mcica version of rrtmg is, but actually I don't think it does anything anyway...