-
Notifications
You must be signed in to change notification settings - Fork 7
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
bug fix: units of RUNSRF in Catchment #535
Conversation
…esult from previous commit)
- clarified units of surface runoff, infiltration, and throughfall in subroutines interc(), rzdrain(), srunof() - moved subroutine rzdrain() to lsm_routines.F90 (identical for Catchment and CatchmentCN)
THRUL = THRUL_VOL ! introduced *_VOL variables for clarity | ||
THRUC = THRUC_VOL | ||
|
||
RUNSRF = RUNSRF * DTSTEP ! convert input surface runoff from flux to "volume" units |
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.
For reference, the first of two computational changes is here.
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.
This looks correct.
IF(CATDEF(N) .LT. 0.) THEN | ||
! bug fix: RUNSRF in flux units [kg m-2 s-1] for consistency with partition() | ||
! reichle, 6 Feb 2022 | ||
RUNSRF(N)=RUNSRF(N)-CATDEF(N)/DTSTEP |
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.
For reference, the second of two computational changes is here.
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.
This looks correct.
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.
I agree with the changes in this pull request.
Tests summary:
|
[Edited 6 Feb 2022, ~2:45pm, by Reichle]
Problem:
Water fluxes in catchment() are in units of kg m-2 s-1 except RUNSRF:
RUNSRF is in [kg m-2 s-1] into and out of subroutine partition().
Next, RUNSRF is assumed to be in "volume" units [kg m-2] into and out of subroutine rzdrain().
Finally, RUNSRF units going into subroutine srunoff() are [kg m-2] but returned in [kg m-2 s-1].
Also, subroutine interc() has precipitation inputs in flux units [kg m-2 s-1] and returns throughfall in as "volume" [kg m-2].
See attached Word docx for notes.
Also, identical copies of subroutine rzdrain() are included in catchment.F90 and catchmentCN.F90.
WATER_FLUXES_UNITS_IN_CATCHMENT.docx
Solution:
This PR changes the units of RUNSRF for all input and output arguments to be in flux units [kg m-2 s-1], for consistency with the units of all other water fluxes. The calculations within subroutine srunoff() remain in volume units.
The RUNSRF changes are zero-diff (initial tests with GEOSldas passed successfully).
I also tested changing the units of throughfall in the argument lists of interc() and srunoff(), but the result was not 0-diff owing to the additional divisions and multiplications. Rather than deal with a non-zero-diff change, I decided to keep the "volume" units of throughfall and added clarifying comments.
Finally, rzdrain() was moved to lsm_routines.F90. Unfortunately, the move obscures the bug fix needed in rzdrain(). The inline comments below point out the computational changes. All other changes are simply for wiring or cosmetic.
cc: @biljanaorescanin @rdkoster @sdrabenh