DESCRIPTION OF CHANGES: Valgrind was producing warnings of an uninitialized variable being used. The executable was outputting correct behavior because it would output todays_date_time with a bad value, then rewrite it later in the subroutine. Presumably this was originally done so that todays_date_time variable showed up in the NetCDF output in a specific order. Moving the todays_date_time initialization before the nf90_put_att call fixes the init issue and allows for removal of the repeat nf90_put_att call.
TESTS CONDUCTED: Builds and runs with correct looking output
Checklist
[ ] Closes issue #xxxx (An issue must exist or be created to be closed. The
issue describes and documents the problem and general solution, the PR
describes the technical details of the solution.)
TYPE: bugfix
KEYWORDS: NetCDF, Valgrind
SOURCE: Soren Rasmussen, NCAR
DESCRIPTION OF CHANGES: Valgrind was producing warnings of an uninitialized variable being used. The executable was outputting correct behavior because it would output
todays_date_time
with a bad value, then rewrite it later in the subroutine. Presumably this was originally done so thattodays_date_time
variable showed up in the NetCDF output in a specific order. Moving thetodays_date_time
initialization before thenf90_put_att
call fixes the init issue and allows for removal of the repeatnf90_put_att
call.TESTS CONDUCTED: Builds and runs with correct looking output
Checklist