eCLM-ParFlow: Couple urban landunits - #133
Open
s-poll wants to merge 1 commit into
Open
Conversation
- bugfix: pfl_psi/pfl_h2osoi_liq were distributed over filter_soilc, but eCLM run over filter_hydrologyc, leading to soilwater_parflow wrote nan into h2osoi_liq for pervious road - distribute over filter_nolakec testing col%hydrologically_active, the predicate filterMod uses for filter_hydrologyc, originally leading to undefined TWS - impervious urban runoff left the domain as river runoff, route it into ParFlow layer 1, zeroed qflx_surf/qflx_qrgwl and write it to qflx_drain as for every other coupled column
kvrigor
requested changes
Sep 2, 2026
| qflx_parflow(c,1:nlevsoi) = 0._r8 | ||
| qflx_parflow(c,1) = qflx_surf(c) + qflx_qrgwl(c) | ||
| qflx_surf(c) = 0._r8 | ||
| qflx_qrgwl(c) = 0._r8 |
Member
There was a problem hiding this comment.
Zero-ing qflx_surf and qflx_qrgwl wouldn't be a good idea. Processes relying on these fluxes will be affected, e.g. qflx_runoff:
eCLM/src/clm5/biogeophys/HydrologyDrainageMod.F90
Lines 231 to 236 in 102b7c5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #61.
Summary
Urban landunits were only partly connected to ParFlow. Two issues:
h2osoi_liqatspval(1e36) on every column and levelBoth are fixed here, so every hydrologically active column receives ParFlow's soil water and the impervious fraction contributes its runoff to the subsurface instead of losing it.
Note on #61: The consequence is more severe than the column being ignored:
icol_road_pervis in the used filters (e.g.filter_hydrologyc), so rather than being skipped it reads state that was never written.1. Distribute ParFlow state on the hydrology filter
The ParFlow state is written on one column filter and read on another, and the two are not the same set.
clm_drv_initwrotepfl_psi/pfl_h2osoi_liqonfilter_soilc(istsoilandistcroplandunits only). Every routine that reads them loops overfilter_hydrologyc, which builds fromcol%hydrologically_active: soil + crop +icol_road_perv(column_varcon.F90:69-76).The read set is therefore a strict superset of the written set, and the extra members, the pervious-road columns, read array slots nothing ever filled:
spvalon cold start (WaterStateType.F90:862-863), NaN on restart.soilwater_parflowwrote that straight intoh2osoi_liq.The physical statement, and the answer to the question raised in #61: ParFlow resolves one soil column per gridcell, and all hydrologically active eCLM tiles share it — pervious road draws from the same water table as the surrounding vegetation.
EUR-12 domain
Before, all 20 levels of all 22,110 active pervious-road columns held
spval:TWSwas previously undefined on 21.5 % of land cells. The match is three-way exact: 22,110 undefined land cells = 22,110 activeicol_road_pervcolumns = 22,110 gridcells containing them.2. Route impervious urban runoff into ParFlow
Roof, wall and impervious-road runoff was zeroed for drainage and left via
qflx_runoff, never reaching ParFlow. It is now routed into ParFlow layer 1, with both runoff terms zeroed where they are read so the water is not counted twice, and the exchange booked toqflx_drain = -sum(qflx_parflow). It follows the convention of every other coupled column (SoilHydrologyMod.F90:2396).qflx_drainis taken while the flux is still in mm/s, before the1/dzconversion, matching the hydrologically active loop above it.Impact: This routes 100 % of impervious runoff locally, the opposite from the previous behavior; real cities probably lie in between. Could be fixed in future by introducing a partial fraction and/or by modifying hydraulic parameter in ParFlow.
Known gaps
QOVERdoes not include urban surface runoff. Even in a build where impervious urban columns demonstrably generate runoff, their ponding storage sits at thepondmx_urbanlimit, which is only set on the branch that also setsqflx_surf,QOVERreads exactly zero on every land cell. For now:QOVERshould not be used as an urban diagnostic insteadQRUNOFF/QDRAIshould be used.