Skip to content

Commit

Permalink
Merge pull request #134 from rcjackson/v202
Browse files Browse the repository at this point in the history
FIX: Errors with pydda's read_from_pyart_grid with origin_latitude
  • Loading branch information
rcjackson authored Oct 14, 2024
2 parents 57ec1fb + a40020c commit bfd60ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pydda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import constraints
from . import io

__version__ = "2.0.2"
__version__ = "2.0.3"

print("Welcome to PyDDA %s" % __version__)
print("If you are using PyDDA in your publications, please cite:")
Expand Down
5 changes: 5 additions & 0 deletions pydda/io/read_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def read_from_pyart_grid(Grid):
origin_latitude = Grid.origin_latitude
origin_longitude = Grid.origin_longitude
origin_altitude = Grid.origin_altitude
# Ensure that origin latitude, longitude are 1-D for .to_xarray()

origin_latitude["data"] = np.atleast_1d(np.squeeze(origin_latitude["data"]))
origin_longitude["data"] = np.atleast_1d(np.squeeze(origin_longitude["data"]))
origin_altitude["data"] = np.atleast_1d(np.squeeze(origin_altitude["data"]))

if len(list(Grid.fields.keys())) > 0:
first_grid_name = list(Grid.fields.keys())[0]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
PLATFORMS = "Linux, Windows, OSX"
MAJOR = 2
MINOR = 0
MICRO = 2
MICRO = 3

# SCRIPTS = glob.glob('scripts/*')
# TEST_SUITE = 'nose.collector'
Expand Down

0 comments on commit bfd60ac

Please sign in to comment.