From 086328fa7bc37121e6c4d10add99f560ea80e394 Mon Sep 17 00:00:00 2001 From: Michaela Sizemore <43652875+michaelavs@users.noreply.github.com> Date: Wed, 16 Mar 2022 12:04:56 -0600 Subject: [PATCH] Merge Develop Into Main (#165) * proj4 formatting update (#146) * units=hPa is used in /def get_slp():/ * Update Mercator projection attributes (#163) * Update Mercator projection attributes * remove empty test_mercator file * CI issues (#164) * CI issues * Add build env path for Linux.yml * other updates to ci file * format more closely to uxarray/comp * Undo some changes, add python version * Revert to previous version for 'Run tests' * Update version in conda recipe Co-authored-by: Piotr Kasprzyk --- .github/workflows/ci.yml | 4 ++-- conda_recipe/meta.yaml | 2 +- src/wrf/g_slp.py | 2 +- src/wrf/projection.py | 9 +++------ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f51670..dc83483 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,11 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-latest", "macos-latest"] - python-version: [ "3.6", "3.7", "3.8", "3.9" ] + python-version: [ "3.7", "3.8", "3.9", "3.10" ] steps: - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.0 + uses: styfle/cancel-workflow-action@0.9.1 with: access_token: ${{ github.token }} - name: Checkout diff --git a/conda_recipe/meta.yaml b/conda_recipe/meta.yaml index 060b824..6ed2455 100644 --- a/conda_recipe/meta.yaml +++ b/conda_recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "1.3.2.6" %} +{% set version = "1.3.3" %} package: name: wrf-python diff --git a/src/wrf/g_slp.py b/src/wrf/g_slp.py index f422bed..695b62d 100755 --- a/src/wrf/g_slp.py +++ b/src/wrf/g_slp.py @@ -63,7 +63,7 @@ def get_slp(wrfin, timeidx=0, method="cat", squeeze=True, units (:obj:`str`): The desired units. Refer to the :meth:`getvar` product table for a list of available units for 'slp'. Default - is 'Pa'. + is 'hPa'. Returns: diff --git a/src/wrf/projection.py b/src/wrf/projection.py index 670e67a..e169341 100644 --- a/src/wrf/projection.py +++ b/src/wrf/projection.py @@ -76,12 +76,9 @@ if cartopy_enabled(): else: xlimits[0] = -xlimits[0] - self._xlimits = tuple(xlimits) - self._ylimits = tuple(limits[..., 1]) - # Compatibility with cartopy >= 0.17 - self._x_limits = self._xlimits - self._y_limits = self._ylimits + self._x_limits = tuple(xlimits) + self._y_limits = tuple(limits[..., 1]) self._threshold = np.diff(self.x_limits)[0] / 720 @@ -824,7 +821,7 @@ class PolarStereographic(WrfProj): def _proj4(self): _proj4 = ("+proj=stere +units=m +a={} +b={} " - "+lat0={} +lon_0={} +lat_ts={} +nadgrids=@null".format( + "+lat_0={} +lon_0={} +lat_ts={} +nadgrids=@null".format( Constants.WRF_EARTH_RADIUS, Constants.WRF_EARTH_RADIUS, self._hemi,