-
Notifications
You must be signed in to change notification settings - Fork 21
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
Patch SNOWT_AVG and ACSNOM #94
Patch SNOWT_AVG and ACSNOM #94
Conversation
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.
Hi Grey,
This is small PR and this should be good to go. I put one comment (something to think about for future).
src/SnowWaterModule.f90
Outdated
@@ -30,9 +30,11 @@ SUBROUTINE SnowWater (domain, levels, parameters, energy, water, forcing) | |||
! ------------------------ local variables --------------------------- | |||
INTEGER :: IZ,i | |||
REAL :: BDSNOW !bulk density of snow (kg/m3) | |||
REAL :: realMissing |
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.
maybe like this? realMissing looks like parameter (no value change)
REAL, parameter :: realMissing=-999999.0
and then remove L37 (realMissing = -999999.0). this is more like parameter so not in the data initialization category.
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.
Also, this would be personal choice, but parameter variable could be stored in a separate module so they can be shared from there. if realMissing is used for somewhere and you have many similar global parameters, this would be way to go.
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.
Good point. I went ahead and set the value of realMissing when it is declared, as you suggested.
I also agree that we should implement a constants module at some point. I know it's an issue (i.e., Issue #5) -- I just need to get with Keith regarding prioritization of tasks.
Thank you for having a look, @nmizukami. Appreciate it! Apologies for taking so long to get back to you. I was distracted by AGU. |
Purpose
To fix handling of
SNOWT_AVG
andACSNOM
variables that were added to the gridded branch in PR #86.Changes
SNOWT_AVG
was being set tohuge(1.)
when there was no snow/ice. However, this PR changes the waySNOWT_AVG
calculated such thatSNOWT_AVG
will be-999999.0
when there is no snow/ice. See PR Add support for NWM 3.0 baseline variables #91 and this comment specifically for further explanation.This PR adds
SNOWT_AVG
toenergy_type%InitDefault
,energy_type%TransferIn
, andenergy_type%TransferOut
becauseSNOWT_AVG
should have been present in these subroutines but was not. This problem surfaced when I reexamined the unit test output forSNOWT_AVG
(after changing our means of calculatingSNOWT_AVG
as described in the first bullet point above) but did not see expected values for the variable in the unit test output.SNOWT_AVG
in the transfer in/out subroutines but this change was mistakenly undone by PR Make 'transfer-in' and 'transfer-out' subroutines type-bound to noahowp_type sub-types #89This PR adds
ACSNOM
towater_type%InitDefault
,water_type%TransferIn
, andwater_type%TransferOut
becauseACSNOM
should have been present in these subroutines but was not. This problem surfaced when I reexamined the unit test output (after changing our means of calculatingSNOWT_AVG
as described in the first bullet point above) but did not see expected values for the variable in the unit test output.ACSNOM
in the transfer in/out subroutines but this change was mistakenly undone by PR Make 'transfer-in' and 'transfer-out' subroutines type-bound to noahowp_type sub-types #89Testing