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

hydro: reservoir, reach lakes, style guide cleanup #2146

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

scrasmussen
Copy link
Contributor

@scrasmussen scrasmussen commented Dec 19, 2024

PR is in draft until fully tested.

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.

  - 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
@scrasmussen scrasmussen requested a review from a team as a code owner December 19, 2024 16:49
@scrasmussen scrasmussen marked this pull request as draft December 19, 2024 16:49
@weiwangncar
Copy link
Collaborator

The regression test results:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants