From b8b57e63bcacfb0fd9a513991fd0758497f44894 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Fri, 17 Mar 2017 16:22:34 -0600 Subject: [PATCH] has_time_coord function should be for a single file only. Updated setup.py to reflect show production status. Set version to 1.0.0. --- setup.py | 5 ++--- src/wrf/util.py | 12 +++++------- src/wrf/version.py | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 63246c6..41d0b6e 100755 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ numpy.distutils.core.setup( "numerical weather prediction", "diagnostic", "science", "numpy"], install_requires = requirements, - classifiers = ["Development Status :: 4 - Beta", + classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "License :: OSI Approved", @@ -71,6 +71,7 @@ numpy.distutils.core.setup( "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Atmospheric Science", "Topic :: Software Development", "Operating System :: POSIX", @@ -85,8 +86,6 @@ numpy.distutils.core.setup( ext_modules = ext_modules, package_dir = {"" : "src"}, download_url = "http://python.org/pypi/wrf-python", - #namespace_packages=["wrf"], - # Note: If this doesn't work, you need to add the file to MANIFEST package_data={"wrf" : ["data/psadilookup.dat"]}, scripts=[] ) diff --git a/src/wrf/util.py b/src/wrf/util.py index f7c0549..9762604 100644 --- a/src/wrf/util.py +++ b/src/wrf/util.py @@ -137,7 +137,7 @@ def is_multi_file(wrfin): return (isinstance(wrfin, Iterable) and not isstr(wrfin)) -def has_time_coord(wrfin): +def has_time_coord(wrfnc): """Return True if the input file or sequence contains the time coordinate variable. @@ -145,18 +145,16 @@ def has_time_coord(wrfin): Args: - wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ - iterable): WRF-ARW NetCDF - data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` - or an iterable sequence of the aforementioned types. + wrfnc (:class:`netCDF4.Dataset` or :class:`Nio.NioFile`): A single + NetCDF file object. Returns: - :obj:`bool`: True if the input contains the time coordinate + :obj:`bool`: True if the netcdf file contains the time coordinate variable, False otherwise. """ - return "XTIME" in wrfin.variables + return "XTIME" in wrfnc.variables def is_mapping(wrfin): diff --git a/src/wrf/version.py b/src/wrf/version.py index 9fad02f..457dc1a 100644 --- a/src/wrf/version.py +++ b/src/wrf/version.py @@ -1,2 +1,2 @@ -__version__ = "1.0b3" +__version__ = "1.0.0"