-
Notifications
You must be signed in to change notification settings - Fork 35
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
Noah MP Glacier: should snowalb_bats_glacier
be called even if cosz<0
?
#227
Comments
That sure looks like a bug to me. |
@HelinWei-NOAA @barlage Could you please provide any suggestions or feedback on this issue? |
I agree it is a bug. My suggestion is to add if (cosz > 0) block before calling both snowalb_bats_glacier and snowalb_class_glacier at line 845 |
Thanks @HelinWei-NOAA and everyone else. This is resolved by NCAR#1091 in NCAR ccpp-physics main. |
Though I don't have an issue with this if statement proposed in NCAR#1091, this should probably be dealt with in the same way that it is in the non-glacier code (similar to what @HelinWei-NOAA said above). Unfortunately, that is done with a However, I see another potential issue with this as a solution in the glacier code since the ice albedo is fixed. This means the albedo at night will be >0 and will then get replaced at the driver level. And will then get used on the time step when the sun comes up (if the land model is not called before the radiation time step). Unless the initialization of So, apologies for thinking through this here, but probably the solution proposed by @HelinWei-NOAA is good for now and we can deal with the timing issue later. |
Description
Tracking a bug in NEPTUNE/CCPP physics where I am getting a FPE invalid from Noah MP Glacier line 974 because:
just before
According to the note in
ccpp-physics/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90
Line 969 in 5a36313
this calculation is only valid for
cosz>0
. Looking through the entire file, there are notes all over the place thatcosz
should be between 0 and 1, but there are alsoif
statements, for example inglacier_atm
, that setswdown
to zero ifcosz < 0
.I am hoping for some feedback/suggestions from the NoahMP developers before I spend hours debugging this further (and fixing it the wrong way). Thanks!
The text was updated successfully, but these errors were encountered: