Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PURPOSE
This PR adds the
nowdate
variable -- which is a member ofdomaingrid_type
anddomain_type
-- to theDomainVarOutTransfer
subroutine.Because
nowdate
is calculated/updated within the scope ofsolve_noahowp
(specifically within theUtilitiesMain
subroutine), the updated value must be included within theDomainVarOutTransfer
subroutine so that the updatednowdate
is available to the subsequent time step call toread_forcing_text
. Ifnowdate
is not included, the forcing file is incorrectly read-in.ADDITIONS
domaingrid%nowdate = domain%nowdate
was added to theDomainVarOutTransfer
subroutine.CHANGES
TESTING
/test/analysis/compare_outputnc.py
was executed and grid cell (1,1) passed all tests while other grid cells did not pass all tests.NOTES
This was a difficult bug to find. I was working on a PR for the read NetCDF file functions and could not get
/test/analysis/compare_outputnc.py
to pass tests for gric cell (1,1). I assumed that my changes related to the new PR were causing the problem. However, I found that the problem was due to my removing nowdate from theDomainVarOutTransfer
subroutine in PR #82.I think the best solution would be to calculate/advance
domaingrid_type%nowdate
outside the scope ofsolve_noahowp
, then transfernowdate
intodomain_type
prior to callingsolve_noahowp
, then don't worry about transferringnowdate
back out todomaingrid_type
because there is no need to do so.