Skip to content

Commit 6d1db68

Browse files
authored
hydro: reservoir, reach lakes, style guide cleanup (#2146)
TYPE: new feature, enhancement KEYWORDS: hydro, reservoir, reach lakes, namelist style guide SOURCE: Soren Rasmussen and Ryan Cabell, NSF NCAR, internal DESCRIPTION OF CHANGES: * Add lake_opt to namelist, reservoirs to own nlist - Add (integer) to &hydro_nlist: 0 [lakes off], 1 [level pool], or 2 [passthrough], or 3 [reservoir DA] - turning lakes off (lake_option=0) will disable lakes even if route_lake_f is supplied, or outlake is turned on. - Reservoir DA will not be used unless lake_option=3, even if all other required namelist options are present - Reset lake_opt from 3 to 1 after setting DA flag * Reservoir options have been moved from &hydro_nlist to &reservoir_nlist - This will make it easier to isolate / compose namelist files - If lake_option is not equal to 3, &reservoir_nlist won't be read, meaning it can be completely removed for applications that don't need it - Use reasonable lake_option default when not specified - Update testing namelists * Forcing variables names that have been added to namelist.hrldas * Reach Lakes: support for lakes (reservoirs) in non-UDMP reach-based routing, restoring functionality that was in WRF-Hydro version 5.1.1 * Style guide cleanup - Remove unneeded return statements - Remove file header - Tabs to spaces - Trailing whitespace cleanup - MPI Capitalization Problem: WRF-Hydro developments need to be ported over for future release LIST OF MODIFIED FILES: ``` M hydro/CPL/WRF_cpl/module_wrf_HYDRO.F90 M hydro/CPL/WRF_cpl/module_wrf_HYDRO_downscale.F90 M hydro/CPL/WRF_cpl/wrf_drv_HYDRO.F90 M hydro/Data_Rec/module_RT_data.F90 M hydro/Data_Rec/module_gw_gw2d_data.F90 M hydro/Data_Rec/module_namelist.F90 M hydro/HYDRO_drv/module_HYDRO_drv.F90 M hydro/IO/netcdf_layer.F90 M hydro/MPP/CPL_WRF.F90 M hydro/MPP/module_mpp_GWBUCKET.F90 M hydro/MPP/module_mpp_ReachLS.F90 M hydro/MPP/mpp_land.F90 M hydro/OrchestratorLayer/config.F90 M hydro/Routing/Noah_distr_routing.F90 M hydro/Routing/Reservoirs/Level_Pool/module_levelpool.F90 M hydro/Routing/Reservoirs/Level_Pool/module_levelpool_properties.F90 M hydro/Routing/Reservoirs/Persistence_Level_Pool_Hybrid/module_persistence_levelpool_hybrid.F90 M hydro/Routing/Reservoirs/RFC_Forecasts/module_rfc_forecasts.F90 M hydro/Routing/module_GW_baseflow.F90 M hydro/Routing/module_HYDRO_io.F90 M hydro/Routing/module_HYDRO_utils.F90 M hydro/Routing/module_NWM_io.F90 M hydro/Routing/module_RT.F90 M hydro/Routing/module_UDMAP.F90 M hydro/Routing/module_channel_routing.F90 M hydro/Routing/module_date_utilities_rt.F90 M hydro/Routing/module_gw_gw2d.F90 M hydro/Routing/module_lsm_forcing.F90 M hydro/Routing/module_reservoir_routing.F90 M hydro/nudging/module_date_utils_nudging.F90 M hydro/nudging/module_nudging_io.F90 M hydro/nudging/module_nudging_utils.F90 M hydro/nudging/module_stream_nudging.F90 M hydro/template/HYDRO/hydro.namelist M hydro/template/NoahMP/namelist.hrldas M hydro/utils/module_hydro_stop.F90 ``` TESTS CONDUCTED: 1. Currently testing hydro's WRF testcase on new CMake and old Makefile build systems. **PR will be draft until fully tested.** 2. Are the Jenkins tests all passing? Yes ``` Test Type | Expected | Received | Failed = = = = = = = = = = = = = = = = = = = = = = = = = = = = Number of Tests : 23 24 Number of Builds : 60 57 Number of Simulations : 158 150 0 Number of Comparisons : 95 86 0 Failed Simulations are: None Which comparisons are not bit-for-bit: None ``` RELEASE NOTE: hydro updates: In `hydro.namelist` adding lake_opt to namelist, reservoirs to own namelist. Support for lakes (reservoirs) in non-UDMP reach-based routing added and some style guide cleanup completed.
1 parent 7042598 commit 6d1db68

36 files changed

+2013
-2351
lines changed

hydro/CPL/WRF_cpl/module_wrf_HYDRO.F90

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
! <brief list of changes to this source file>
6-
!
7-
! Usage:
8-
! Parameters: <Specify typical arguments passed>
9-
! Input Files:
10-
! <list file names and briefly describe the data they include>
11-
! Output Files:
12-
! <list file names and briefly describe the information they include>
13-
!
14-
! Condition codes:
15-
! <list exit condition or error codes returned >
16-
! If appropriate, descriptive troubleshooting instructions or
17-
! likely causes for failures could be mentioned here with the
18-
! appropriate error code
19-
!
20-
! User controllable options: <if applicable>
211

222
module module_WRF_HYDRO
233

@@ -106,7 +86,7 @@ subroutine wrf_cpl_HYDRO(HYDRO_dt,grid,its,ite,jts,jte)
10686

10787

10888
#ifdef MPP_LAND
109-
call MPI_COMM_DUP(MPI_COMM_WORLD, HYDRO_COMM_WORLD, ierr)
89+
call MPI_Comm_dup(MPI_COMM_WORLD, HYDRO_COMM_WORLD, ierr)
11090
call MPP_LAND_INIT(grid%e_we - grid%s_we - 1, grid%e_sn - grid%s_sn - 1)
11191

11292
call mpp_land_bcast_int1 (nlst(did)%nsoil)
@@ -214,9 +194,9 @@ subroutine wrf_cpl_HYDRO(HYDRO_dt,grid,its,ite,jts,jte)
214194
#endif
215195
else
216196
do k = 1, nlst(did)%nsoil
217-
RT_DOMAIN(did)%STC(:,:,k) = grid%TSLB(its:ite,k,jts:jte)
218-
RT_DOMAIN(did)%smc(:,:,k) = grid%smois(its:ite,k,jts:jte)
219-
RT_DOMAIN(did)%sh2ox(:,:,k) = grid%sh2o(its:ite,k,jts:jte)
197+
RT_DOMAIN(did)%STC(:,:,k) = grid%TSLB(its:ite,k,jts:jte)
198+
RT_DOMAIN(did)%smc(:,:,k) = grid%smois(its:ite,k,jts:jte)
199+
RT_DOMAIN(did)%sh2ox(:,:,k) = grid%sh2o(its:ite,k,jts:jte)
220200
end do
221201
rt_domain(did)%infxsrt = grid%infxsrt(its:ite,jts:jte)
222202
rt_domain(did)%soldrain = grid%soldrain(its:ite,jts:jte)
@@ -235,7 +215,7 @@ subroutine wrf_cpl_HYDRO(HYDRO_dt,grid,its,ite,jts,jte)
235215
! update WRF variable after running routing model.
236216
grid%sfcheadrt(its:ite,jts:jte) = rt_domain(did)%overland%control%surface_water_head_lsm
237217

238-
! provide groundwater soil flux to WRF for fully coupled simulations (FERSCH 09/2014)
218+
! provide groundwater soil flux to WRF for fully coupled simulations (FERSCH 09/2014)
239219
if(nlst(did)%GWBASESWCRT .eq. 3 ) then
240220
!Wei Yu: comment the following two lines. Not ready for WRF3.7 release
241221
!yw grid%qsgw(its:ite,jts:jte) = gw2d(did)%qsgw
@@ -269,7 +249,7 @@ subroutine wrf2lsm (z1,v1,kk1,z,vout,ix,jx,kk,vegtyp)
269249
do j = 1, jx
270250
do i = 1, ix
271251
do k = 1, kk
272-
call interpLayer(Z1,v1(i,1:kk1,j),kk1,Z(k),vout(i,j,k))
252+
call interpLayer(Z1,v1(i,1:kk1,j),kk1,Z(k),vout(i,j,k))
273253
end do
274254
end do
275255
end do
@@ -291,7 +271,7 @@ subroutine lsm2wrf (z1,v1,kk1,z,vout,ix,jx,kk,vegtyp)
291271
do j = 1, jx
292272
do i = 1, ix
293273
do k = 1, kk
294-
call interpLayer(Z1,v1(i,j,1:kk1),kk1,Z(k),vout(i,k,j))
274+
call interpLayer(Z1,v1(i,j,1:kk1),kk1,Z(k),vout(i,k,j))
295275
end do
296276
end do
297277
end do

hydro/CPL/WRF_cpl/module_wrf_HYDRO_downscale.F90

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
! <brief list of changes to this source file>
6-
!
7-
! Usage:
8-
! Parameters: <Specify typical arguments passed>
9-
! Input Files:
10-
! <list file names and briefly describe the data they include>
11-
! Output Files:
12-
! <list file names and briefly describe the information they include>
13-
!
14-
! Condition codes:
15-
! <list exit condition or error codes returned >
16-
! If appropriate, descriptive troubleshooting instructions or
17-
! likely causes for failures could be mentioned here with the
18-
! appropriate error code
19-
!
20-
! User controllable options: <if applicable>
211

222
module module_WRF_HYDRO
233

hydro/CPL/WRF_cpl/wrf_drv_HYDRO.F90

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
! <brief list of changes to this source file>
6-
!
7-
! Usage:
8-
! Parameters: <Specify typical arguments passed>
9-
! Input Files:
10-
! <list file names and briefly describe the data they include>
11-
! Output Files:
12-
! <list file names and briefly describe the information they include>
13-
!
14-
! Condition codes:
15-
! <list exit condition or error codes returned >
16-
! If appropriate, descriptive troubleshooting instructions or
17-
! likely causes for failures could be mentioned here with the
18-
! appropriate error code
19-
!
20-
! User controllable options: <if applicable>
211

222
!2345678
233
!ywGW subroutine wrf_drv_HYDRO(HYDRO_dt,grid, config_flags, its,ite,jts,jte)

hydro/Data_Rec/module_RT_data.F90

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
!
6-
! Usage:
7-
! Parameters: <Specify typical arguments passed>
8-
! Input Files:
9-
! <list file names and briefly describe the data they include>
10-
! Output Files:
11-
! <list file names and briefly describe the information they include>
12-
!
13-
! Condition codes:
14-
! <list exit condition or error codes returned >
15-
! If appropriate, descriptive troubleshooting instructions or
16-
! likely causes for failures could be mentioned here with the
17-
! appropriate error code
18-
!
19-
! User controllable options: <if applicable>
20-
211
Module module_RT_data
222
use module_rt_inc, only: rt_field
233
implicit none

hydro/Data_Rec/module_gw_gw2d_data.F90

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
! <brief list of changes to this source file>
6-
!
7-
! Usage:
8-
! Parameters: <Specify typical arguments passed>
9-
! Input Files:
10-
! <list file names and briefly describe the data they include>
11-
! Output Files:
12-
! <list file names and briefly describe the information they include>
13-
!
14-
! Condition codes:
15-
! <list exit condition or error codes returned >
16-
! If appropriate, descriptive troubleshooting instructions or
17-
! likely causes for failures could be mentioned here with the
18-
! appropriate error code
19-
!
20-
! User controllable options: <if applicable>
211

222
module module_gw_gw2d_data
233
implicit none

hydro/Data_Rec/module_namelist.F90

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,3 @@
1-
! Program Name:
2-
! Author(s)/Contact(s):
3-
! Abstract:
4-
! History Log:
5-
!
6-
! Usage:
7-
! Parameters: <Specify typical arguments passed>
8-
! Input Files:
9-
! <list file names and briefly describe the data they include>
10-
! Output Files:
11-
! <list file names and briefly describe the information they include>
12-
!
13-
! Condition codes:
14-
! <list exit condition or error codes returned >
15-
! If appropriate, descriptive troubleshooting instructions or
16-
! likely causes for failures could be mentioned here with the
17-
! appropriate error code
18-
!
19-
! User controllable options: <if applicable>
20-
211
module module_namelist
222

233
#ifdef MPP_LAND
@@ -574,7 +554,6 @@ subroutine read_rt_nlst(nlst)
574554
if(channel_option .eq. 4) nlst%rtFlag = 0
575555
! if(CHANRTSWCRT .eq. 0 .and. SUBRTSWCRT .eq. 0 .and. OVRTSWCRT .eq. 0 .and. GWBASESWCRT .eq. 0) nlst%rtFlag = 0
576556
if(SUBRTSWCRT .eq. 0 .and. OVRTSWCRT .eq. 0 .and. GWBASESWCRT .eq. 0) nlst%rtFlag = 0
577-
return
578557
end subroutine read_rt_nlst
579558

580559
subroutine rt_nlst_check(nlst)

0 commit comments

Comments
 (0)