From 8fd75f893a26d789412c28304de96d2163bc0e30 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Wed, 14 Jun 2017 12:00:05 -0600 Subject: [PATCH] Fixed and issue with the x limits being the same value when using MercatorWithLatTS. Fixes #24 --- doc/source/new.rst | 7 +++++++ src/wrf/projection.py | 2 +- src/wrf/version.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/source/new.rst b/doc/source/new.rst index b71844c..5583732 100644 --- a/doc/source/new.rst +++ b/doc/source/new.rst @@ -4,6 +4,13 @@ What's New Releases ------------- +v1.0.3 +^^^^^^^^^^^^^^ + +- Relase 1.0.3 +- Fixed an issue with the cartopy Mercator subclass where the xlimits were + being calculated to the same value (or very close), causing blank plots. + v1.0.2 ^^^^^^^^^^^^^^ diff --git a/src/wrf/projection.py b/src/wrf/projection.py index 2485ece..58e8b59 100644 --- a/src/wrf/projection.py +++ b/src/wrf/projection.py @@ -69,7 +69,7 @@ if cartopy_enabled(): # to the same value, so make sure the left one is negative xlimits = limits[..., 0] - if xlimits[0] == xlimits[1]: + if math.fabs(xlimits[0] - xlimits[1]) < 1e-6: if xlimits[0] < 0: xlimits[1] = -xlimits[1] else: diff --git a/src/wrf/version.py b/src/wrf/version.py index 73a2e28..8508c46 100644 --- a/src/wrf/version.py +++ b/src/wrf/version.py @@ -1,2 +1,2 @@ -__version__ = "1.0.2" +__version__ = "1.0.3"