diff --git a/doc/source/new.rst b/doc/source/new.rst index c222dc4..905a3c3 100644 --- a/doc/source/new.rst +++ b/doc/source/new.rst @@ -10,6 +10,9 @@ v1.0.1 - Release 1.0.1 - Fixed issue with initialization of PolarStereographic and LatLon map projection objects. +- Fixed issue where XTIME could be included in the coordinate list of a + variable, but the actual XTIME variable could be missing. NCL allows this, + so wrf-python should as well. v1.0.0 diff --git a/src/wrf/util.py b/src/wrf/util.py index 9762604..d5985e5 100644 --- a/src/wrf/util.py +++ b/src/wrf/util.py @@ -1135,7 +1135,13 @@ def _get_coord_names(wrfin, varname): time_coord = coord_names[2] except IndexError: time_coord = None - + else: + # Make sure they time variable wasn't removed + try: + _ = wrfnc.variables[time_coord] + except KeyError: + time_coord = None + return lat_coord, lon_coord, time_coord