Replies: 1 comment
-
you are correct. this is a precision issue which may be related to different Fortran compilers and/or machines. Your proposed fix looks good. My question is that if it is a precision issue, would it correctly identify SatDegUnsatSoil < 0.01 in your if-statement for the comparison between 9.999999776482582E-003 and 0.01. Did you print out to see if your if-statement works? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
/hrldas-master/noahmp/noahmp-master/src/GroundWaterTopModelMod.F90,
Near line 130 of the original code:
SatDegUnsatSoil = max(SatDegUnsatSoil, real(0.01,kind=8))
Here, the max function did not take effect. I printed the results of SatDegUnsatSoil after line 129, which showed:
SatDegUnsatSoil: 9.999999776482582E-003;
9.999999776482582E-003 smaller than 0.01. However, it did not correctly give me 0.01. It might be a precision issue in Fortran, preventing the max function from making the correct comparison.
And I modified the if statement, the modified code:
if (SatDegUnsatSoil < 0.01) then
SatDegUnsatSoil = 0.01
Endif
Beta Was this translation helpful? Give feedback.
All reactions