Skip to content

Commit

Permalink
Merge pull request Unidata#3404 from Unidata/dependabot-pip-ci-xarray…
Browse files Browse the repository at this point in the history
…-2024.2.0

CI: (deps): Bump xarray from 2024.1.1 to 2024.2.0 in /ci
  • Loading branch information
dcamron authored Feb 21, 2024
2 parents d9752c8 + 25b1d3b commit d7c8c77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pint==0.23
pyproj==3.6.1
scipy==1.12.0
traitlets==5.14.1
xarray==2024.1.1
xarray==2024.2.0
7 changes: 3 additions & 4 deletions src/metpy/io/gini.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from xarray.backends.common import AbstractDataStore
from xarray.coding.times import CFDatetimeCoder
from xarray.coding.variables import CFMaskCoder
from xarray.core.utils import FrozenDict

from ._tools import Bits, IOBuffer, NamedStruct, open_as_needed, zlib_decompress_all_frames
from ..package_tools import Exporter
Expand Down Expand Up @@ -368,16 +367,16 @@ def get_variables(self):
variables.extend(self._make_coord_vars())
variables.extend(self._make_data_vars())

return FrozenDict(variables)
return dict(variables)

def get_attrs(self):
"""Get the global attributes.
This is used by `xarray.open_dataset`.
"""
return FrozenDict(satellite=self.prod_desc.creating_entity,
sector=self.prod_desc.sector_id)
return {'satellite': self.prod_desc.creating_entity,
'sector': self.prod_desc.sector_id}


class GiniXarrayBackend(BackendEntrypoint):
Expand Down
4 changes: 2 additions & 2 deletions src/metpy/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ class MetPyDataArrayAccessor:
>>> temperature = xr.DataArray([[0, 1], [2, 3]] * units.degC, dims=('lat', 'lon'),
... coords={'lat': [40, 41], 'lon': [-105, -104]})
>>> temperature.metpy.x
<xarray.DataArray 'lon' (lon: 2)>
<xarray.DataArray 'lon' (lon: 2)> Size: 16B
array([-105, -104])
Coordinates:
* lon (lon) int64 -105 -104
* lon (lon) int64 16B -105 -104
Attributes:
_metpy_axis: x,longitude
Expand Down

0 comments on commit d7c8c77

Please sign in to comment.