Browse Source

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 <ciri@ciri.pl>
main 1.3.3
Michaela Sizemore 3 years ago committed by GitHub
parent
commit
086328fa7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/ci.yml
  2. 2
      conda_recipe/meta.yaml
  3. 2
      src/wrf/g_slp.py
  4. 9
      src/wrf/projection.py

4
.github/workflows/ci.yml

@ -20,11 +20,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ "ubuntu-latest", "macos-latest"] 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: steps:
- name: Cancel previous runs - name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.0 uses: styfle/cancel-workflow-action@0.9.1
with: with:
access_token: ${{ github.token }} access_token: ${{ github.token }}
- name: Checkout - name: Checkout

2
conda_recipe/meta.yaml

@ -1,4 +1,4 @@
{% set version = "1.3.2.6" %} {% set version = "1.3.3" %}
package: package:
name: wrf-python name: wrf-python

2
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` units (:obj:`str`): The desired units. Refer to the :meth:`getvar`
product table for a list of available units for 'slp'. Default product table for a list of available units for 'slp'. Default
is 'Pa'. is 'hPa'.
Returns: Returns:

9
src/wrf/projection.py

@ -76,12 +76,9 @@ if cartopy_enabled():
else: else:
xlimits[0] = -xlimits[0] xlimits[0] = -xlimits[0]
self._xlimits = tuple(xlimits)
self._ylimits = tuple(limits[..., 1])
# Compatibility with cartopy >= 0.17 # Compatibility with cartopy >= 0.17
self._x_limits = self._xlimits self._x_limits = tuple(xlimits)
self._y_limits = self._ylimits self._y_limits = tuple(limits[..., 1])
self._threshold = np.diff(self.x_limits)[0] / 720 self._threshold = np.diff(self.x_limits)[0] / 720
@ -824,7 +821,7 @@ class PolarStereographic(WrfProj):
def _proj4(self): def _proj4(self):
_proj4 = ("+proj=stere +units=m +a={} +b={} " _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,
Constants.WRF_EARTH_RADIUS, Constants.WRF_EARTH_RADIUS,
self._hemi, self._hemi,

Loading…
Cancel
Save