Skip to content

Commit

Permalink
Calculate lake count correctly, update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rcabell authored and scrasmussen committed Nov 6, 2024
1 parent 65f9252 commit 41c9955
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build

on:
push:
branches: [ main, v5.2.x ]
branches: [ main ]
pull_request:
branches: [ main, v5.2.x ]
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
configuration: [nwm_ana, nwm_long_range, gridded, reach]
configuration: [nwm_ana, nwm_long_range, gridded, reach, reach_lakes]
runs-on: ubuntu-latest

env:
Expand Down
4 changes: 2 additions & 2 deletions src/Routing/module_RT.F90
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ subroutine getChanDim(did)
rt_domain(did)%GNLINKSL = 1
rt_domain(did)%NLINKSL = 1
endif
if(nlst(did)%UDMP_OPT .eq. 1) &
if(nlst(did)%UDMP_OPT .eq. 1 .or. nlst(did)%channel_option .eq. 1 .or. nlst(did)%channel_option .eq. 2) &
call read_NSIMLAKES(rt_domain(did)%NLAKES,nlst(did)%route_lake_f)

call rt_allocate(did,rt_domain(did)%ix,rt_domain(did)%jx,&
Expand Down Expand Up @@ -615,7 +615,7 @@ subroutine getChanDim(did)

endif

if(nlst(did)%UDMP_OPT .eq. 1) then
if(nlst(did)%UDMP_OPT .eq. 1 .or. nlst(did)%channel_option .eq. 1 .or. nlst(did)%channel_option .eq. 2) then
call read_NSIMLAKES(rt_domain(did)%NLAKES,nlst(did)%route_lake_f)
endif

Expand Down
2 changes: 1 addition & 1 deletion src/Routing/module_channel_routing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ Subroutine drive_CHANNEL(did, latval,lonval,KT, IXRT,JXRT, SUBRTSWCRT, &
if(TYPEL(k) == 1) then !--link is a reservoir
l_idx = lake_lookup(k)
if (l_idx >= 0) then !-- -999 if not a reservoir in the lookup table (belt-and-suspenders check)
call rt_domain(did)%reservoirs(lakeid)%ptr%run(Qup, Quc, 0.0, &
call rt_domain(did)%reservoirs(l_idx)%ptr%run(Qup, Quc, 0.0, &
RESHT(l_idx), QLINK(k,2), DTRT_CH, rt_domain(did)%final_reservoir_type(l_idx), &
rt_domain(did)%reservoir_assimilated_value(l_idx), rt_domain(did)%reservoir_assimilated_source_file(l_idx))

Expand Down

0 comments on commit 41c9955

Please sign in to comment.