NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

bugfix: unallocated variables #700

Closed scrasmussen closed 1 year ago

scrasmussen commented 1 year ago

TYPE: bugfix

KEYWORDS: runtime checks, allocatable variables

SOURCE: Soren Rasmussen, NCAR

DESCRIPTION OF CHANGES: Running after compiling with -fcheck=all leads to errors of the following variables not being allocated: gw_buck_loss, RT_DOMAIN(did)%LLINKID, gw2d, qgw_chanrt, and vis_icealb. This was because they were unallocated but being passed to a subroutine that didn't have them labeled as allocatable. This normally doesn't cause problems but could possibly cause issues during debugging so it is good to fix. Also switched crocus variable from optional to allocatable to better represent their functionality and for the above reasons. Also the RT_DOMAIN(did)%LLINKID variable wasn't being used so I removed it from the subroutine argument list.

TESTS CONDUCTED: Compiled and ran Croton test to completion with -fcheck=all GNU compile flag.

Checklist