NCAR / wrf_hydro_nwm_public

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

Fix crashes with newer versions of netCDF #459

Closed rcabell closed 4 years ago

rcabell commented 4 years ago

TYPE: bug fix

KEYWORDS: netCDF

SOURCE: internal (Ryan @ NCAR)

DESCRIPTION OF CHANGES: netCDF file metadata for scale/offset output types specified 32-bit integers (nf90_int) but the IO code was using integer(kind=8) values. Older versions of netCDF allowed an implicit cast from a 64 bit integer to a 32 bit integer, but starting somewhere around 4.6.x it's now an error. This fix changes the data type components in module_NWM_io_dict.F to be integer(kind=4) to explicitly match with the netCDF variable.

ISSUE:

Closes  #382 

TESTS CONDUCTED: Croton tests were performed with io_form_outputs set to 1,2,3, and 4 and output is consistent.