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

Finalized implementation of new lake shape options in the levelpool simulations #508

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
14 changes: 10 additions & 4 deletions trunk/NDHMS/Data_Rec/module_namelist.F
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ subroutine read_rt_nlst(nlst)
GWBASESWCRT, GW_RESTART,RSTRT_SWC,TERADJ_SOLAR, &
sys_cpl, rst_typ, rst_bi_in, rst_bi_out, &
gwChanCondSw, GwPreCycles, GwSpinCycles, GwPreDiagInterval, gwsoilcpl, &
UDMP_OPT, io_form_outputs, bucket_loss
UDMP_OPT, io_form_outputs, bucket_loss, &
lake_shape_option
real:: DTRT_TER,DTRT_CH,dxrt, gwChanCondConstIn, gwChanCondConstOut, gwIhShift
character(len=256) :: route_topo_f=""
character(len=256) :: route_chan_f=""
Expand Down Expand Up @@ -138,8 +139,8 @@ subroutine read_rt_nlst(nlst)
CHRTOUT_DOMAIN,CHANOBS_DOMAIN,CHRTOUT_GRID,LSMOUT_DOMAIN,&
RTOUT_DOMAIN, output_gw, outlake, &
frxst_pts_out, udmap_file, UDMP_OPT, GWBUCKPARM_file, bucket_loss, &
io_config_outputs, io_form_outputs, hydrotbl_f, t0OutputFlag, output_channelBucket_influx

io_config_outputs, io_form_outputs, hydrotbl_f, t0OutputFlag, output_channelBucket_influx, &
lake_shape_option
#ifdef WRF_HYDRO_NUDGING
namelist /NUDGING_nlist/ nudgingParamFile, netwkReExFile, &
readTimesliceParallel, temporalPersistence, &
Expand Down Expand Up @@ -359,6 +360,7 @@ subroutine read_rt_nlst(nlst)
call mpp_land_bcast_int1(RTOUT_DOMAIN)
call mpp_land_bcast_int1(UDMP_OPT)
call mpp_land_bcast_int1(reservoir_data_ingest)
!call mpp_land_bcast_int1(lake_shape_option)
#ifdef WRF_HYDRO_NUDGING
call mpp_land_bcast_char(256, nudgingParamFile )
call mpp_land_bcast_char(256, netwkReExFile )
Expand Down Expand Up @@ -401,6 +403,7 @@ subroutine read_rt_nlst(nlst)
nlst%DTRT_TER = DTRT_TER
nlst%DTRT_CH = DTRT_CH
nlst%DTCT = DTRT_CH ! small time step for grid based channel routing
nlst%lake_shape_option = lake_shape_option

#ifdef MPP_LAND
if(my_id .eq. IO_id) then
Expand Down Expand Up @@ -519,6 +522,7 @@ subroutine read_rt_nlst(nlst)
write(6,*) " nlst%compound_channel ", compound_channel
write(6,*) " nlst%route_lake_f ",route_lake_f
write(6,*) " nlst%reservoir_parameter_file ", reservoir_parameter_file
write(6,*) " nlst%lake_shape_option ", lake_shape_option
write(6,*) " nlst%reservoir_usgs_timeslice_path ", reservoir_usgs_timeslice_path
write(6,*) " nlst%reservoir_usace_timeslice_path ", reservoir_usace_timeslice_path
write(6,*) " nlst%reservoir_observation_lookback_hours ", nlst%reservoir_observation_lookback_hours
Expand Down Expand Up @@ -803,7 +807,9 @@ subroutine rt_nlst_check(nlst)
if (.not. fileExists) call hydro_stop('hydro.namelist ERROR: reservoir_parameter_file not found.')
endif
end if

if( (nlst%lake_shape_option .lt. 0 ) .or. (nlst%lake_shape_option .gt. 3) ) then
call hydro_stop('hydro.namelist ERROR: Invalid lake_shape_option specified')
endif
if(nlst%reservoir_persistence_usgs) then
if(len(trim(nlst%reservoir_usgs_timeslice_path)) .eq. 0) then
call hydro_stop('hydro.namelist ERROR: You MUST specify a reservoir_usgs timeslice_path for reservoir USGS persistence capability.')
Expand Down
3 changes: 2 additions & 1 deletion trunk/NDHMS/Data_Rec/namelist.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
SUBRTSWCRT, OVRTSWCRT, AGGFACTRT, &
GWBASESWCRT, GW_RESTART,RSTRT_SWC,TERADJ_SOLAR, &
sys_cpl, gwChanCondSw, GwPreCycles, GwSpinCycles, GwPreDiagInterval, &
gwsoilcpl, UDMP_OPT, bucket_loss
gwsoilcpl, UDMP_OPT, bucket_loss, &
lake_shape_option
logical:: GwPreDiag, GwSpinUp
real:: DTRT_TER,DTRT_CH, DTCT, dxrt0, gwChanCondConstIn, gwChanCondConstOut, gwIhShift
character(len=256) :: route_topo_f=""
Expand Down
7 changes: 4 additions & 3 deletions trunk/NDHMS/Data_Rec/rt_include.inc
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@
REAL, allocatable, DIMENSION(:) :: LAKEMAXH !maximum depth (m)
REAL, allocatable, DIMENSION(:) :: WEIRC !coeff of overtop weir
REAL, allocatable, DIMENSION(:) :: WEIRH !depth of Lake coef



REAL, allocatable, DIMENSION(:) :: LAKEMAXDEPTH !max depth (m) based on actual depth
REAL, allocatable, DIMENSION(:) :: LAKEVOL !volume of lake based on bathymetry (km^3)
REAL, allocatable, DIMENSION(:) :: LAKEPOLYA !coefficient a in polynomial function V=a*h^b
REAL, allocatable, DIMENSION(:) :: LAKEPOLYB !coefficient b in polynomial function V=a*h^b

!DJG Modified namelist for routing and agg. variables
real Z_tmp
Expand Down
14 changes: 11 additions & 3 deletions trunk/NDHMS/OrchestratorLayer/config.f90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ module config_base
SUBRTSWCRT,OVRTSWCRT,AGGFACTRT, &
GWBASESWCRT, GW_RESTART,RSTRT_SWC,TERADJ_SOLAR, &
sys_cpl, gwChanCondSw, GwPreCycles, GwSpinCycles, GwPreDiagInterval, &
gwsoilcpl, UDMP_OPT
gwsoilcpl, UDMP_OPT, &
lake_shape_option
logical:: GwPreDiag, GwSpinUp
real:: DTRT_TER,DTRT_CH, DTCT, dxrt0, gwChanCondConstIn, gwChanCondConstOut, gwIhShift
character(len=256) :: route_topo_f=""
Expand Down Expand Up @@ -413,7 +414,9 @@ subroutine rt_nlst_check(self)
if (.not. fileExists) call hydro_stop('hydro.namelist ERROR: reservoir_parameter_file not found.')
endif
end if

if( (self%lake_shape_option .lt. 0 ) .or. (self%lake_shape_option .gt. 3) ) then
call hydro_stop('hydro.namelist ERROR: Invalid lake_shape_option specified')
endif
if(self%reservoir_persistence_usgs) then
if(len(trim(self%reservoir_usgs_timeslice_path)) .eq. 0) then
call hydro_stop('hydro.namelist ERROR: You MUST specify a reservoir_usgs_timeslice_path for &
Expand Down Expand Up @@ -463,6 +466,7 @@ subroutine init_namelist_rt_field(did)
sys_cpl, rst_typ, rst_bi_in, rst_bi_out, &
gwChanCondSw, GwPreCycles, GwSpinCycles, GwPreDiagInterval, gwsoilcpl, &
UDMP_OPT, io_form_outputs, bucket_loss
integer :: lake_shape_option = 0
real:: DTRT_TER,DTRT_CH,dxrt, gwChanCondConstIn, gwChanCondConstOut, gwIhShift
character(len=256) :: route_topo_f=""
character(len=256) :: route_chan_f=""
Expand Down Expand Up @@ -552,7 +556,8 @@ subroutine init_namelist_rt_field(did)
CHRTOUT_DOMAIN,CHANOBS_DOMAIN,CHRTOUT_GRID,LSMOUT_DOMAIN,&
RTOUT_DOMAIN, output_gw, outlake, &
frxst_pts_out, udmap_file, UDMP_OPT, GWBUCKPARM_file, bucket_loss, &
io_config_outputs, io_form_outputs, hydrotbl_f, t0OutputFlag, output_channelBucket_influx
io_config_outputs, io_form_outputs, hydrotbl_f, t0OutputFlag, output_channelBucket_influx, &
lake_shape_option

#ifdef WRF_HYDRO_NUDGING
namelist /NUDGING_nlist/ nudgingParamFile, netwkReExFile, &
Expand Down Expand Up @@ -587,6 +592,7 @@ subroutine init_namelist_rt_field(did)
reservoir_rfc_forecasts = .FALSE.
reservoir_rfc_forecasts_lookback_hours = 24
reservoir_type_specified = .FALSE.
lake_shape_option = 0

#ifdef WRF_HYDRO_NUDGING
! Default values for NUDGING_nlist
Expand Down Expand Up @@ -713,6 +719,7 @@ subroutine init_namelist_rt_field(did)
nlst(did)%DTRT_TER = DTRT_TER
nlst(did)%DTRT_CH = DTRT_CH
nlst(did)%DTCT = DTRT_CH ! small time step for grid based channel routing
nlst(did)%lake_shape_option = lake_shape_option

! Some fields haven't been initialized yet (e.g. DT)

Expand All @@ -735,6 +742,7 @@ subroutine init_namelist_rt_field(did)
call hydro_stop("module_namelist: DT not a multiple of DTRT_CH")
endif


nlst(did)%SUBRTSWCRT = SUBRTSWCRT
nlst(did)%OVRTSWCRT = OVRTSWCRT
nlst(did)%dxrt0 = dxrt
Expand Down
Loading