Skip to content

Commit

Permalink
* Add lake_opt to namelist, reservoirs to own nlist
Browse files Browse the repository at this point in the history
  - 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

* Style guide cleanup
   - Indentation and MPI capitalization
   - Remove unneeded return statements
   - Remove file header
   - Tabs to spaces

* Reach Lakes Update

* NetCDF Update: move to modules and nf90 subroutines
  • Loading branch information
scrasmussen committed Dec 19, 2024
1 parent 75a6ff2 commit 401abcf
Show file tree
Hide file tree
Showing 36 changed files with 2,007 additions and 2,350 deletions.
34 changes: 7 additions & 27 deletions hydro/CPL/WRF_cpl/module_wrf_HYDRO.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
! <brief list of changes to this source file>
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

module module_WRF_HYDRO

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


#ifdef MPP_LAND
call MPI_COMM_DUP(MPI_COMM_WORLD, HYDRO_COMM_WORLD, ierr)
call MPI_Comm_dup(MPI_COMM_WORLD, HYDRO_COMM_WORLD, ierr)
call MPP_LAND_INIT(grid%e_we - grid%s_we - 1, grid%e_sn - grid%s_sn - 1)

call mpp_land_bcast_int1 (nlst(did)%nsoil)
Expand Down Expand Up @@ -214,9 +194,9 @@ subroutine wrf_cpl_HYDRO(HYDRO_dt,grid,its,ite,jts,jte)
#endif
else
do k = 1, nlst(did)%nsoil
RT_DOMAIN(did)%STC(:,:,k) = grid%TSLB(its:ite,k,jts:jte)
RT_DOMAIN(did)%smc(:,:,k) = grid%smois(its:ite,k,jts:jte)
RT_DOMAIN(did)%sh2ox(:,:,k) = grid%sh2o(its:ite,k,jts:jte)
RT_DOMAIN(did)%STC(:,:,k) = grid%TSLB(its:ite,k,jts:jte)
RT_DOMAIN(did)%smc(:,:,k) = grid%smois(its:ite,k,jts:jte)
RT_DOMAIN(did)%sh2ox(:,:,k) = grid%sh2o(its:ite,k,jts:jte)
end do
rt_domain(did)%infxsrt = grid%infxsrt(its:ite,jts:jte)
rt_domain(did)%soldrain = grid%soldrain(its:ite,jts:jte)
Expand All @@ -235,7 +215,7 @@ subroutine wrf_cpl_HYDRO(HYDRO_dt,grid,its,ite,jts,jte)
! update WRF variable after running routing model.
grid%sfcheadrt(its:ite,jts:jte) = rt_domain(did)%overland%control%surface_water_head_lsm

! provide groundwater soil flux to WRF for fully coupled simulations (FERSCH 09/2014)
! provide groundwater soil flux to WRF for fully coupled simulations (FERSCH 09/2014)
if(nlst(did)%GWBASESWCRT .eq. 3 ) then
!Wei Yu: comment the following two lines. Not ready for WRF3.7 release
!yw grid%qsgw(its:ite,jts:jte) = gw2d(did)%qsgw
Expand Down Expand Up @@ -269,7 +249,7 @@ subroutine wrf2lsm (z1,v1,kk1,z,vout,ix,jx,kk,vegtyp)
do j = 1, jx
do i = 1, ix
do k = 1, kk
call interpLayer(Z1,v1(i,1:kk1,j),kk1,Z(k),vout(i,j,k))
call interpLayer(Z1,v1(i,1:kk1,j),kk1,Z(k),vout(i,j,k))
end do
end do
end do
Expand All @@ -291,7 +271,7 @@ subroutine lsm2wrf (z1,v1,kk1,z,vout,ix,jx,kk,vegtyp)
do j = 1, jx
do i = 1, ix
do k = 1, kk
call interpLayer(Z1,v1(i,j,1:kk1),kk1,Z(k),vout(i,k,j))
call interpLayer(Z1,v1(i,j,1:kk1),kk1,Z(k),vout(i,k,j))
end do
end do
end do
Expand Down
20 changes: 0 additions & 20 deletions hydro/CPL/WRF_cpl/module_wrf_HYDRO_downscale.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
! <brief list of changes to this source file>
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

module module_WRF_HYDRO

Expand Down
20 changes: 0 additions & 20 deletions hydro/CPL/WRF_cpl/wrf_drv_HYDRO.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
! <brief list of changes to this source file>
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

!2345678
!ywGW subroutine wrf_drv_HYDRO(HYDRO_dt,grid, config_flags, its,ite,jts,jte)
Expand Down
20 changes: 0 additions & 20 deletions hydro/Data_Rec/module_RT_data.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

Module module_RT_data
use module_rt_inc, only: rt_field
implicit none
Expand Down
20 changes: 0 additions & 20 deletions hydro/Data_Rec/module_gw_gw2d_data.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
! <brief list of changes to this source file>
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

module module_gw_gw2d_data
implicit none
Expand Down
21 changes: 0 additions & 21 deletions hydro/Data_Rec/module_namelist.F90
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
! Program Name:
! Author(s)/Contact(s):
! Abstract:
! History Log:
!
! Usage:
! Parameters: <Specify typical arguments passed>
! Input Files:
! <list file names and briefly describe the data they include>
! Output Files:
! <list file names and briefly describe the information they include>
!
! Condition codes:
! <list exit condition or error codes returned >
! If appropriate, descriptive troubleshooting instructions or
! likely causes for failures could be mentioned here with the
! appropriate error code
!
! User controllable options: <if applicable>

module module_namelist

#ifdef MPP_LAND
Expand Down Expand Up @@ -574,7 +554,6 @@ subroutine read_rt_nlst(nlst)
if(channel_option .eq. 4) nlst%rtFlag = 0
! if(CHANRTSWCRT .eq. 0 .and. SUBRTSWCRT .eq. 0 .and. OVRTSWCRT .eq. 0 .and. GWBASESWCRT .eq. 0) nlst%rtFlag = 0
if(SUBRTSWCRT .eq. 0 .and. OVRTSWCRT .eq. 0 .and. GWBASESWCRT .eq. 0) nlst%rtFlag = 0
return
end subroutine read_rt_nlst

subroutine rt_nlst_check(nlst)
Expand Down
Loading

0 comments on commit 401abcf

Please sign in to comment.