Skip to content

Add river routing grid comp#145

Merged
gmao-rreichle merged 25 commits intodevelopfrom
feature/wjiang/route
May 7, 2026
Merged

Add river routing grid comp#145
gmao-rreichle merged 25 commits intodevelopfrom
feature/wjiang/route

Conversation

@weiyuan-jiang
Copy link
Copy Markdown
Contributor

@weiyuan-jiang weiyuan-jiang commented Oct 29, 2025

Add river routing module. Replaces #131

If river routing grid comp is added, its checkpoint should be renamed and backed up.

Related PRs:
GEOS-ESM/GEOSgcm_GridComp#1143 (merged)
GEOS-ESM/GEOSgcm_GridComp#1375 (merged)
GEOS-ESM/GEOSldas#850

Testing:

Left for another PR:

  • enable ensemble functionality for routing (see 6ea9bbf)
  • enable routing of runoff from landice tiles

@weiyuan-jiang weiyuan-jiang requested a review from a team as a code owner October 29, 2025 12:57
@weiyuan-jiang weiyuan-jiang changed the title post-processing checkpoint of river routing grid comp Add river routing grid comp Oct 30, 2025
@gmao-rreichle
Copy link
Copy Markdown
Collaborator

@weiyuan-jiang, @zyj8881357 : When we add River Routing to GEOSlas, I would expect that we also modify the HISTORY template (GEOSldas_HIST.rc), as well as at least one config parameters that turns routing on/off (and possibly more). Do you have a list of what is still missing from this PR?

@weiyuan-jiang
Copy link
Copy Markdown
Contributor Author

  1. We need to find the permanent place for the BCS required by river-routing
  2. We need this PR be approved ( Add river routing module for offline (GEOSldas) simulations GEOSgcm_GridComp#1143 ). Maybe we should integrate make_bcs with the scripts Yujin provided to create river-routing BCs and move them to the appropriate directories
  3. Change this PR accordingly

@zyj8881357
Copy link
Copy Markdown

@weiyuan-jiang, @zyj8881357 : When we add River Routing to GEOSlas, I would expect that we also modify the HISTORY template (GEOSldas_HIST.rc), as well as at least one config parameters that turns routing on/off (and possibly more). Do you have a list of what is still missing from this PR?

We already have a option called RUN_ROUTE in our LDAS.rc that turns routing on/off (1/0) which also appears in our "exe"_input_filename template. I think we can continue to use this one (that is what we did in the PR).

If you'd like, we can add an option to turn on/off the reservoirs/lakes, but in my view, we don't need to do that because the reservoirs/lakes make the overall simulation better and we can keep less parameters in the config list.

@zyj8881357
Copy link
Copy Markdown

@weiyuan-jiang, @zyj8881357 : When we add River Routing to GEOSlas, I would expect that we also modify the HISTORY template (GEOSldas_HIST.rc), as well as at least one config parameters that turns routing on/off (and possibly more). Do you have a list of what is still missing from this PR?

In addition to what Weiyuan mentioned, we also need a place to store the raw input data for the pre-processing package that converts the raw data to the file "river_input.nc" that would be used by the make_bcs.

But maybe this can be done later because any changes in the make_bcs and routing model may affect the pre-processing package. We can first finalize the routing_model and make_bcs, and then work on the pre-processing package.

Comment thread GEOS_LdasGridComp.F90
@weiyuan-jiang
Copy link
Copy Markdown
Contributor Author

This line will be changed

routeRstFile = "/discover/nobackup/yzeng3/data/river_input_weiyuan/route_restart_package/"+"route_internal_rst."+y4m2[-2:]+"01_0000"

@gmao-rreichle
Copy link
Copy Markdown
Collaborator

@zyj8881357, @weiyuan-jiang : The standard routing configuration in GEOSldas uses a 1-hour time step for routing (RRM_DT: 3600 in GEOS_SurfaceGridComp.rc) and a heartbeat of 7.5 minutes. Do we have the following "assert" statements somewhere in the routing GC or in LDAS?

  • assert that RRM_DT is a multiple of HEARTBEAT
  • assert that segment length >= RRM_DT (a simulation with routing must complete at least one RRM_DT time step)

There may be other requirements that need to be verified.

@weiyuan-jiang
Copy link
Copy Markdown
Contributor Author

This line will be changed

routeRstFile = "/discover/nobackup/yzeng3/data/river_input_weiyuan/route_restart_package/"+"route_internal_rst."+y4m2[-2:]+"01_0000"

@zyj8881357 Is the line ready for change?

@zyj8881357
Copy link
Copy Markdown

This line will be changed

routeRstFile = "/discover/nobackup/yzeng3/data/river_input_weiyuan/route_restart_package/"+"route_internal_rst."+y4m2[-2:]+"01_0000"

@zyj8881357 Is the line ready for change?

@weiyuan-jiang Yes. The path is /discover/nobackup/projects/gmao/bcs_shared/restarts/surface/route/v202601/ . Could you please help me to update it in the code? I am not familiar with the string variable for dir "/discover/nobackup/projects/gmao/bcs_shared/" in the script. Thank you!

@weiyuan-jiang
Copy link
Copy Markdown
Contributor Author

This line will be changed

routeRstFile = "/discover/nobackup/yzeng3/data/river_input_weiyuan/route_restart_package/"+"route_internal_rst."+y4m2[-2:]+"01_0000"

@zyj8881357 Is the line ready for change?

@weiyuan-jiang Yes. The path is /discover/nobackup/projects/gmao/bcs_shared/restarts/surface/route/v202601/ . Could you please help me to update it in the code? I am not familiar with the string variable for dir "/discover/nobackup/projects/gmao/bcs_shared/" in the script. Thank you!

I realized that we don't support RESTART=0 any more. I removed it and gave users a hint

Copy link
Copy Markdown
Collaborator

@gmao-rreichle gmao-rreichle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiyuan-jiang @zyj8881357 , see comments below

Comment thread GEOS_LdasGridComp.F90
Comment thread GEOSldas_App/ldas.py Outdated
Comment thread GEOSldas_App/ldas.py
@zyj8881357
Copy link
Copy Markdown

  • Compare simulation (with routing) that has only land tiles with another simulation (with routing) that also has landice tiles (in addition to land tiles). The land and routing outputs for the two simulations should be zero-diff.

I have done this test. The runs with and without landice tiles are zero-diff for land and route.

@gmao-rreichle gmao-rreichle added enhancement New feature or request labels May 1, 2026
Update error message for missing route restart file.
@gmao-rreichle
Copy link
Copy Markdown
Collaborator

@zyj8881357 @biljanaorescanin
I think the current routing PRs are now ready for final testing:
GEOS-ESM/GEOSgcm_GridComp#1375
#145 (this PR)
GEOS-ESM/GEOSldas#850

@biljanaorescanin : When you get a chance, please run the usual 0-diff tests for LDAS and the GCM

@zyj8881357 : Please do one more check of a routing simulation with the latest GEOSgcm_GridComp and GEOSldas_GridComp branches.

cc: @weiyuan-jiang

@zyj8881357
Copy link
Copy Markdown

@zyj8881357 @biljanaorescanin I think the current routing PRs are now ready for final testing: GEOS-ESM/GEOSgcm_GridComp#1375 #145 (this PR) GEOS-ESM/GEOSldas#850

@biljanaorescanin : When you get a chance, please run the usual 0-diff tests for LDAS and the GCM

@zyj8881357 : Please do one more check of a routing simulation with the latest GEOSgcm_GridComp and GEOSldas_GridComp branches.

cc: @weiyuan-jiang

@gmao-rreichle I have finished both the zero-diff and scientific test with the latest GEOSgcm_GridComp and GEOSldas_GridComp branches. They work well and can produce reasonable discharge output against with the observations.

@gmao-rreichle gmao-rreichle marked this pull request as ready for review May 7, 2026 13:00
@gmao-rreichle gmao-rreichle requested a review from a team as a code owner May 7, 2026 13:00
@gmao-rreichle gmao-rreichle merged commit 1f3c1ee into develop May 7, 2026
13 of 16 checks passed
@gmao-rreichle gmao-rreichle deleted the feature/wjiang/route branch May 7, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-diff enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants