GEOS-ESM / GEOS-ESM/GEOSgcm_GridComp
small inconsistency in accounting for capac residual?
Nobody has claimed this yet.
- Dominant language
- Fortran
- Stars
- 10
- Forks
- 13
- Avg merge
- 17h 35m
- Merged PRs (30d)
- 14
Description
@rdkoster:
Near the end of subroutine catchment(), we compute (total) RUNOFF as the sum of surface runoff and baseflow:
https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/d21d47891784743ea5db368ac8faed53de52c7af/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/catchment.F90#L1271
Immediately thereafter, we check for negligible amounts of CAPAC (<1e-10) and convert them into (total) RUNOFF:
https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/d21d47891784743ea5db368ac8faed53de52c7af/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/catchment.F90#L1273
Don't we also need to add CAPAC(N)/DTSTEP to RUNSRF (or, alternatively, to BFLOW) so as to maintain consistency with (total) RUNOFF?
The water amounts involved are probably so small that in practice nobody ever notices. But we go to the trouble of accounting for them in RUNOFF, so maybe it's worth to also adjust the runoff components for consistency.
Please advise, thanks
PS: Here's the full block of code for reference (lines 1271-1275 in today's version of the "develop" branch)
RUNOFF(N) = RUNSRF(N)+BFLOW(N)
IF(CAPAC(N).LT.1.E-10) THEN
RUNOFF(N) = RUNOFF(N)+CAPAC(N)/DTSTEP
CAPAC(N) = 0.0
endif
cc: @biljanaorescanin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading GEOScatch_GridComp/catchment.F90 in subroutine catchment() around lines 1271-1275, tracing how RUNOFF, RUNSRF, BFLOW, CAPAC, and DTSTEP are accounted for. Done means the negligible CAPAC conversion leaves total RUNOFF consistent with its runoff components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100