Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

River routing for GEOSldas #1023

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 Down Expand Up @@ -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
allocate (ROUTE(NUM_CATCH), stat=status)
VERIFY_(STATUS)
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 (DO_FIRE_DANGER) then
IGNI = MAPL_AddChild(GC, NAME='IGNI'//trim(tmp), SS=IgniSetServices, RC=STATUS)
Expand Down Expand Up @@ -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 '/) ,&
SRC_ID = CATCH(I) ,&
DST_ID = ROUTE(I) ,&

RC=STATUS )
VERIFY_(STATUS)
ENDIF

CASE (2,3)
call MAPL_AddConnectivity ( &
Expand All @@ -1486,16 +1488,16 @@ 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 '/) ,&
SRC_ID = CATCHCN(I) ,&
DST_ID = ROUTE(I) ,&

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

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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
esma_set_this ()

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

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

install(PROGRAMS build_rivernetwork.py DESTINATION bin)
Loading