Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7faae9f
branch feature/yujinz/Routing_GEOSroute started, offline model was pu…
Oct 24, 2024
54950b8
change some paths for Discover
Oct 28, 2024
982bdd9
script build is replaced by run
Oct 29, 2024
f2a19da
readme.txt added
Oct 29, 2024
bf8b9a8
update K_str
Oct 31, 2024
71e44c5
Merge remote-tracking branch 'origin/develop' into feature/yujinz/Rou…
Oct 31, 2024
c6e341b
removing some Chinese characters in the comments
Oct 31, 2024
d2a0c95
more cleaning up
Nov 5, 2024
0d8ebcb
Merge remote-tracking branch 'origin/develop' into feature/yujinz/Rou…
Dec 2, 2024
5e9377a
move offline model to dir offline
Dec 2, 2024
7ceed5a
routing model was implemented to GEOSldas
Dec 2, 2024
17b7d4b
back to TAKI
Dec 6, 2024
431674c
back to Discover
Dec 6, 2024
5d98b30
a small bug fix for the offline model
Dec 18, 2024
abcf705
update the offline model to the coupled model
Jan 8, 2025
416a94f
Merge branch 'develop' into feature/yujinz/Routing_GEOSroute
gmao-rreichle Feb 26, 2025
96cbcd6
reservoir module added
Mar 10, 2025
ebe5287
temporarily disable flood control for dams
Mar 19, 2025
a81bcea
preprocessing for routing model added
Mar 20, 2025
0c5d779
code clean up, and comment&documents added
May 8, 2025
af2ec8b
Merge remote-tracking branch 'origin/develop' into feature/yujinz/Rou…
May 8, 2025
9a08d7b
'==' changed to '.eqv.'
May 8, 2025
32fe955
'.eqv.' replaces '=='
May 9, 2025
1fb57bb
Merge branch 'develop' into feature/yujinz/Routing_GEOSroute
gmao-rreichle May 21, 2025
ef58210
changed variable name NUM_CATCH -> NUM_CATCH_ENS for clarity (GEOS_La…
gmao-rreichle May 21, 2025
85af5a7
avoid duplicate hard-coding of #Pfaf catchments; fixed indent, alignm…
gmao-rreichle May 21, 2025
4e3cfec
added comments to clarify connected "RUNOFF" variable (GEOS_LandGridC…
gmao-rreichle May 21, 2025
e367061
Update CMakeLists.txt
weiyuan-jiang May 23, 2025
f1c450d
copying river_input through make_bcs
Jun 18, 2025
c60c59b
river routing input data pointing to bcs
Jun 19, 2025
636cbf1
-diag-disable=10448 added in the building of routing_model preproc
Jun 19, 2025
7305bb9
some modifications to address the comments from Weiyuan, yet to be te…
Aug 10, 2025
ff16f13
change name ntiles
weiyuan-jiang Aug 14, 2025
e2b66c6
add internal, export and catchment grid support
weiyuan-jiang Aug 25, 2025
dca6882
redistrubuted runnoff and collect qout
weiyuan-jiang Sep 5, 2025
3bf435f
more changes
weiyuan-jiang Sep 9, 2025
7f739aa
refactoring...
weiyuan-jiang Sep 10, 2025
58a7406
cleanup RUN1
weiyuan-jiang Sep 12, 2025
5fedcb5
create tile_pfaf file
Sep 17, 2025
0b7326a
rename and move get_pfaf_frac to mkEASETilesParam
weiyuan-jiang Sep 18, 2025
ab9ceaf
Merge branch 'develop' into feature/yujinz/Routing_GEOSroute
weiyuan-jiang Sep 18, 2025
1840281
Merge branch 'feature/yujinz/Routing_GEOSroute' into feature/wjiang/R…
weiyuan-jiang Sep 18, 2025
54008e6
Merge branch 'feature/wjiang/Routing_GEOSroute_on_yujin' into feature…
weiyuan-jiang Sep 19, 2025
06bfaf0
Merge pull request #1158 from GEOS-ESM/feature/wjiang/river_bcs
weiyuan-jiang Sep 19, 2025
1b2b95f
Merge branch 'feature/wjiang/Routing_GEOSroute_on_yujin' of github.co…
weiyuan-jiang Sep 19, 2025
ee0c6aa
reading restart from internal rst file
weiyuan-jiang Sep 22, 2025
6ca800d
read from tile_pfaf file
weiyuan-jiang Sep 22, 2025
ed2dc1b
reading areacat
weiyuan-jiang Sep 22, 2025
38a5c54
read more from river_input. remove internal mpi
weiyuan-jiang Sep 22, 2025
b026421
correct acc and change pointer to allocatable
weiyuan-jiang Sep 22, 2025
aab5b97
refactoring reservoir...
weiyuan-jiang Sep 23, 2025
d90f0cc
more clean up
weiyuan-jiang Sep 23, 2025
13578c8
cleanup fieldcreate
weiyuan-jiang Sep 24, 2025
e3396d4
Merge branch 'develop' into feature/yujinz/Routing_GEOSroute
gmao-rreichle Sep 24, 2025
d0bf2be
Merge branch 'feature/yujinz/Routing_GEOSroute' into feature/wjiang/R…
gmao-rreichle Sep 24, 2025
aae0ac1
fixed some issues
Nov 5, 2025
4fd39bf
pre-processing of routing model added
Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module GEOS_LandGridCompMod
use GEOS_CatchGridCompMod, only : CatchSetServices => SetServices
use GEOS_CatchCNGridCompMod, only : CatchCNSetServices => SetServices
use GEOS_IgniGridCompMod, only : IgniSetServices => SetServices
! use GEOS_RouteGridCompMod, only : RouteSetServices => SetServices
use GEOS_RouteGridCompMod, only : RouteSetServices => SetServices

implicit none
private
Expand All @@ -45,7 +45,7 @@ module GEOS_LandGridCompMod


integer :: VEGDYN
integer, allocatable :: CATCH(:), ROUTE (:), CATCHCN (:)
integer, allocatable :: CATCH(:), CATCHCN(:), ROUTE(:)
integer :: LSM_CHOICE, RUN_ROUTE, DO_GOSWIM
integer :: IGNI
logical :: DO_FIRE_DANGER
Expand Down Expand Up @@ -84,7 +84,7 @@ subroutine SetServices ( GC, RC )

character(len=ESMF_MAXSTR) :: GCName
type(ESMF_Config) :: CF, SCF
integer :: NUM_CATCH
integer :: NUM_CATCH_ENS
integer :: I
character(len=ESMF_MAXSTR) :: TMP
type(MAPL_MetaComp),pointer :: MAPL=>null()
Expand Down Expand Up @@ -134,7 +134,7 @@ subroutine SetServices ( GC, RC )
call MAPL_GridCompSetEntryPoint ( GC, ESMF_METHOD_RUN, Run2, RC=STATUS )
VERIFY_(STATUS)

call ESMF_ConfigGetAttribute ( CF, NUM_CATCH, Label="NUM_CATCH_ENSEMBLES:", default=1, RC=STATUS)
call ESMF_ConfigGetAttribute ( CF, NUM_CATCH_ENS, Label="NUM_CATCH_ENSEMBLES:", default=1, RC=STATUS)
VERIFY_(STATUS)

!------------------------------------------------------------
Expand Down Expand Up @@ -163,13 +163,13 @@ subroutine SetServices ( GC, RC )

CASE (1)

allocate (CATCH(NUM_CATCH), stat=status)
allocate (CATCH(NUM_CATCH_ENS), stat=status)
VERIFY_(STATUS)
if (NUM_CATCH == 1) then
if (NUM_CATCH_ENS == 1) then
CATCH(1) = MAPL_AddChild(GC, NAME='CATCH'//trim(tmp), SS=CatchSetServices, RC=STATUS)
VERIFY_(STATUS)
else
do I = 1, NUM_CATCH
do I = 1, NUM_CATCH_ENS
WRITE(TMP,'(I3.3)') I
GCName = 'ens' // trim(TMP) // ':CATCH'
CATCH(I) = MAPL_AddChild(GC, NAME=GCName, SS=CatchSetServices, RC=STATUS)
Expand All @@ -179,13 +179,13 @@ subroutine SetServices ( GC, RC )

CASE (2,3)

allocate (CATCHCN(NUM_CATCH), stat=status)
allocate (CATCHCN(NUM_CATCH_ENS), stat=status)
VERIFY_(STATUS)
if (NUM_CATCH == 1) then
if (NUM_CATCH_ENS == 1) then
CATCHCN(1) = MAPL_AddChild(GC, NAME='CATCHCN'//trim(tmp), SS=CatchCNSetServices, RC=STATUS)
VERIFY_(STATUS)
else
do I = 1, NUM_CATCH
do I = 1, NUM_CATCH_ENS
WRITE(TMP,'(I3.3)') I
GCName = 'ens' // trim(TMP) // ':CATCHCN'
CATCHCN(I) = MAPL_AddChild(GC, NAME=GCName, SS=CatchCNSetServices, RC=STATUS)
Expand All @@ -195,19 +195,21 @@ subroutine SetServices ( GC, RC )

END SELECT

! IF(RUN_ROUTE == 1) THEN
! if (NUM_CATCH == 1) then
! ROUTE(1) = MAPL_AddChild(GC, NAME='ROUTE', SS=RouteSetServices, RC=STATUS)
! VERIFY_(STATUS)
! else
! do I = 1, NUM_CATCH
! WRITE(TMP,'(I3.3)') I
! GCName = 'ens' // trim(TMP) // ':ROUTE'
! ROUTE(I) = MAPL_AddChild(GC, NAME=GCName, SS=RouteSetServices, RC=STATUS)
! VERIFY_(STATUS)
! end do
! end if
! ENDIF
IF(RUN_ROUTE == 1) THEN
allocate (ROUTE(NUM_CATCH_ENS), stat=status)
VERIFY_(STATUS)
if (NUM_CATCH_ENS == 1) then
ROUTE(1) = MAPL_AddChild(GC, NAME='ROUTE', SS=RouteSetServices, RC=STATUS)
VERIFY_(STATUS)
else
do I = 1, NUM_CATCH_ENS
WRITE(TMP,'(I3.3)') I
GCName = 'ens' // trim(TMP) // ':ROUTE'
ROUTE(I) = MAPL_AddChild(GC, NAME=GCName, SS=RouteSetServices, RC=STATUS)
VERIFY_(STATUS)
end do
end if
ENDIF

if (DO_FIRE_DANGER) then
IGNI = MAPL_AddChild(GC, NAME='IGNI'//trim(tmp), SS=IgniSetServices, RC=STATUS)
Expand Down Expand Up @@ -1426,7 +1428,7 @@ subroutine SetServices ( GC, RC )

! !CONNECTIONS:

DO I = 1, NUM_CATCH
DO I = 1, NUM_CATCH_ENS

SELECT CASE (LSM_CHOICE)

Expand All @@ -1453,16 +1455,16 @@ subroutine SetServices ( GC, RC )
VERIFY_(STATUS)
end if

! IF(RUN_ROUTE == 1) THEN
! call MAPL_AddConnectivity ( &
! GC ,&
! SHORT_NAME = (/'RUNOFF '/) ,&
! SRC_ID = CATCH(I) ,&
! DST_ID = ROUTE(I) ,&
!
! RC=STATUS )
! VERIFY_(STATUS)
! ENDIF
IF(RUN_ROUTE == 1) THEN
call MAPL_AddConnectivity ( &
GC ,&
SHORT_NAME = (/'RUNOFF '/) ,& ! RUNOFF = total runoff = surface runoff + baseflow
SRC_ID = CATCH(I) ,&
DST_ID = ROUTE(I) ,&

RC=STATUS )
VERIFY_(STATUS)
ENDIF

CASE (2,3)
call MAPL_AddConnectivity ( &
Expand All @@ -1486,19 +1488,19 @@ subroutine SetServices ( GC, RC )
VERIFY_(STATUS)
end if

! IF(RUN_ROUTE == 1) THEN
! call MAPL_AddConnectivity ( &
! GC ,&
! SHORT_NAME = (/'RUNOFF '/) ,&
! SRC_ID = CATCHCN(I) ,&
! DST_ID = ROUTE(I) ,&
!
! RC=STATUS )
! VERIFY_(STATUS)
! ENDIF
IF(RUN_ROUTE == 1) THEN
call MAPL_AddConnectivity ( &
GC ,&
SHORT_NAME = (/'RUNOFF '/) ,& ! RUNOFF = total runoff = surface runoff + baseflow
SRC_ID = CATCHCN(I) ,&
DST_ID = ROUTE(I) ,&

RC=STATUS )
VERIFY_(STATUS)
ENDIF
END SELECT
END DO


call MAPL_TimerAdd(GC, name="INITIALIZE" ,RC=STATUS)
VERIFY_(STATUS)
Expand Down Expand Up @@ -1669,6 +1671,7 @@ subroutine Run1(GC, IMPORT, EXPORT, CLOCK, RC )
!--------------------------------

DO I = 1, size(GCS)
if (trim(GCnames(i)) == "ROUTE") cycle
call MAPL_TimerOn(MAPL,trim(GCnames(i)), RC=STATUS ); VERIFY_(STATUS)
call ESMF_GridCompRun(GCS(I), importState=GIM(I), exportState=GEX(I), &
CLOCK=CLOCK, PHASE=1, userRC=STATUS)
Expand Down Expand Up @@ -1714,7 +1717,7 @@ subroutine Run2(GC, IMPORT, EXPORT, CLOCK, RC )
type (ESMF_State), pointer :: GEX(:)
character(len=ESMF_MAXSTR),pointer :: GCnames(:)

integer :: I
integer :: I, phase

!=============================================================================

Expand Down Expand Up @@ -1743,9 +1746,11 @@ subroutine Run2(GC, IMPORT, EXPORT, CLOCK, RC )
!--------------------------------
DO I=1,size(GCS)
if (I == VEGDYN) cycle
phase = 2
if (trim(GCnames(i)) == "ROUTE") phase = 1
call MAPL_TimerOn(MAPL,trim(GCnames(i)), RC=STATUS ); VERIFY_(STATUS)
call ESMF_GridCompRun(GCS(I), importState=GIM(I), exportState=GEX(I), &
CLOCK=CLOCK, PHASE=2, userRC=STATUS)
CLOCK=CLOCK, PHASE=phase, userRC=STATUS)
VERIFY_(STATUS)
call MAPL_TimerOff(MAPL,trim(GCnames(i)), RC=STATUS ); VERIFY_(STATUS)
END DO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
esma_set_this ()

set (srcs
#GEOS_RouteGridComp.F90
GEOS_RouteGridComp.F90
routing_model.F90
reservoir.F90
)

esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL ESMF::ESMF NetCDF::NetCDF_Fortran)
esma_add_library (${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_LandShared ESMF::ESMF NetCDF::NetCDF_Fortran)

install(PROGRAMS build_rivernetwork.py DESTINATION bin)
Loading
Loading