Skip to content

Commit 49bd63a

Browse files
authored
Remove PseudoNetCDF (#8446)
1 parent 0c1ad54 commit 49bd63a

19 files changed

+10
-479
lines changed

ci/requirements/all-but-dask.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- pandas
2929
- pint>=0.22
3030
- pip
31-
- pseudonetcdf
3231
- pydap
3332
- pytest
3433
- pytest-cov

ci/requirements/environment-py311.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ dependencies:
3232
- pip
3333
- pooch
3434
- pre-commit
35-
- pseudonetcdf
3635
- pydap
3736
- pytest
3837
- pytest-cov

ci/requirements/environment-windows-py311.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- pint>=0.22
2929
- pip
3030
- pre-commit
31-
- pseudonetcdf
3231
- pydap
3332
- pytest
3433
- pytest-cov

ci/requirements/environment-windows.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies:
2828
- pint>=0.22
2929
- pip
3030
- pre-commit
31-
- pseudonetcdf
3231
- pydap
3332
- pytest
3433
- pytest-cov

ci/requirements/environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dependencies:
3333
- pip
3434
- pooch
3535
- pre-commit
36-
- pseudonetcdf
3736
- pydap
3837
- pytest
3938
- pytest-cov

ci/requirements/min-all-deps.yml

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ dependencies:
3737
- pandas=1.4
3838
- pint=0.22
3939
- pip
40-
- pseudonetcdf=3.2
4140
- pydap=3.3
4241
- pytest
4342
- pytest-cov

doc/api-hidden.rst

-14
Original file line numberDiff line numberDiff line change
@@ -591,20 +591,6 @@
591591
backends.H5netcdfBackendEntrypoint.guess_can_open
592592
backends.H5netcdfBackendEntrypoint.open_dataset
593593

594-
backends.PseudoNetCDFDataStore.close
595-
backends.PseudoNetCDFDataStore.get_attrs
596-
backends.PseudoNetCDFDataStore.get_dimensions
597-
backends.PseudoNetCDFDataStore.get_encoding
598-
backends.PseudoNetCDFDataStore.get_variables
599-
backends.PseudoNetCDFDataStore.open
600-
backends.PseudoNetCDFDataStore.open_store_variable
601-
backends.PseudoNetCDFDataStore.ds
602-
603-
backends.PseudoNetCDFBackendEntrypoint.description
604-
backends.PseudoNetCDFBackendEntrypoint.url
605-
backends.PseudoNetCDFBackendEntrypoint.guess_can_open
606-
backends.PseudoNetCDFBackendEntrypoint.open_dataset
607-
608594
backends.PydapDataStore.close
609595
backends.PydapDataStore.get_attrs
610596
backends.PydapDataStore.get_dimensions

doc/api.rst

-2
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,6 @@ arguments for the ``load_store`` and ``dump_to_store`` Dataset methods:
11171117

11181118
backends.NetCDF4DataStore
11191119
backends.H5NetCDFStore
1120-
backends.PseudoNetCDFDataStore
11211120
backends.PydapDataStore
11221121
backends.ScipyDataStore
11231122
backends.ZarrStore
@@ -1133,7 +1132,6 @@ used filetypes in the xarray universe.
11331132

11341133
backends.NetCDF4BackendEntrypoint
11351134
backends.H5netcdfBackendEntrypoint
1136-
backends.PseudoNetCDFBackendEntrypoint
11371135
backends.PydapBackendEntrypoint
11381136
backends.ScipyBackendEntrypoint
11391137
backends.StoreBackendEntrypoint

doc/getting-started-guide/installing.rst

-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ For netCDF and IO
3838
- `cftime <https://unidata.github.io/cftime>`__: recommended if you
3939
want to encode/decode datetimes for non-standard calendars or dates before
4040
year 1678 or after year 2262.
41-
- `PseudoNetCDF <http://github.com/barronh/pseudonetcdf/>`__: recommended
42-
for accessing CAMx, GEOS-Chem (bpch), NOAA ARL files, ICARTT files
43-
(ffi1001) and many other.
4441
- `iris <https://github.com/scitools/iris>`__: for conversion to and from iris'
4542
Cube objects
4643

doc/user-guide/io.rst

-21
Original file line numberDiff line numberDiff line change
@@ -1308,27 +1308,6 @@ We recommend installing PyNIO via conda::
13081308
.. _PyNIO backend is deprecated: https://github.com/pydata/xarray/issues/4491
13091309
.. _PyNIO is no longer maintained: https://github.com/NCAR/pynio/issues/53
13101310

1311-
.. _io.PseudoNetCDF:
1312-
1313-
Formats supported by PseudoNetCDF
1314-
---------------------------------
1315-
1316-
Xarray can also read CAMx, BPCH, ARL PACKED BIT, and many other file
1317-
formats supported by PseudoNetCDF_, if PseudoNetCDF is installed.
1318-
PseudoNetCDF can also provide Climate Forecasting Conventions to
1319-
CMAQ files. In addition, PseudoNetCDF can automatically register custom
1320-
readers that subclass PseudoNetCDF.PseudoNetCDFFile. PseudoNetCDF can
1321-
identify readers either heuristically, or by a format specified via a key in
1322-
`backend_kwargs`.
1323-
1324-
To use PseudoNetCDF to read such files, supply
1325-
``engine='pseudonetcdf'`` to :py:func:`open_dataset`.
1326-
1327-
Add ``backend_kwargs={'format': '<format name>'}`` where `<format name>`
1328-
options are listed on the PseudoNetCDF page.
1329-
1330-
.. _PseudoNetCDF: https://github.com/barronh/PseudoNetCDF
1331-
13321311

13331312
CSV and other formats supported by pandas
13341313
-----------------------------------------

doc/whats-new.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Breaking changes
3434

3535
Deprecations
3636
~~~~~~~~~~~~
37-
37+
- The PseudoNetCDF backend has been removed. By `Deepak Cherian <https://github.com/dcherian>`_.
3838
- Supplying dimension-ordered sequences to :py:meth:`DataArray.chunk` &
3939
:py:meth:`Dataset.chunk` is deprecated in favor of supplying a dictionary of
4040
dimensions, or a single ``int`` or ``"auto"`` argument covering all
@@ -4530,7 +4530,7 @@ Enhancements
45304530

45314531
- New PseudoNetCDF backend for many Atmospheric data formats including
45324532
GEOS-Chem, CAMx, NOAA arlpacked bit and many others. See
4533-
:ref:`io.PseudoNetCDF` for more details.
4533+
``io.PseudoNetCDF`` for more details.
45344534
By `Barron Henderson <https://github.com/barronh>`_.
45354535

45364536
- The :py:class:`Dataset` constructor now aligns :py:class:`DataArray`

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ module = [
109109
"opt_einsum.*",
110110
"pandas.*",
111111
"pooch.*",
112-
"PseudoNetCDF.*",
113112
"pydap.*",
114113
"pytest.*",
115114
"scipy.*",

xarray/backends/__init__.py

-6
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
from xarray.backends.memory import InMemoryDataStore
1414
from xarray.backends.netCDF4_ import NetCDF4BackendEntrypoint, NetCDF4DataStore
1515
from xarray.backends.plugins import list_engines, refresh_engines
16-
from xarray.backends.pseudonetcdf_ import (
17-
PseudoNetCDFBackendEntrypoint,
18-
PseudoNetCDFDataStore,
19-
)
2016
from xarray.backends.pydap_ import PydapBackendEntrypoint, PydapDataStore
2117
from xarray.backends.pynio_ import NioDataStore
2218
from xarray.backends.scipy_ import ScipyBackendEntrypoint, ScipyDataStore
@@ -37,10 +33,8 @@
3733
"ScipyDataStore",
3834
"H5NetCDFStore",
3935
"ZarrStore",
40-
"PseudoNetCDFDataStore",
4136
"H5netcdfBackendEntrypoint",
4237
"NetCDF4BackendEntrypoint",
43-
"PseudoNetCDFBackendEntrypoint",
4438
"PydapBackendEntrypoint",
4539
"ScipyBackendEntrypoint",
4640
"StoreBackendEntrypoint",

xarray/backends/api.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
T_NetcdfEngine = Literal["netcdf4", "scipy", "h5netcdf"]
6060
T_Engine = Union[
6161
T_NetcdfEngine,
62-
Literal["pydap", "pynio", "pseudonetcdf", "zarr"],
62+
Literal["pydap", "pynio", "zarr"],
6363
type[BackendEntrypoint],
6464
str, # no nice typing support for custom backends
6565
None,
@@ -78,7 +78,6 @@
7878
"pydap": backends.PydapDataStore.open,
7979
"h5netcdf": backends.H5NetCDFStore.open,
8080
"pynio": backends.NioDataStore,
81-
"pseudonetcdf": backends.PseudoNetCDFDataStore.open,
8281
"zarr": backends.ZarrStore.open_group,
8382
}
8483

@@ -420,7 +419,7 @@ def open_dataset(
420419
scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like
421420
objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF).
422421
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
423-
"pseudonetcdf", "zarr", None}, installed backend \
422+
"zarr", None}, installed backend \
424423
or subclass of xarray.backends.BackendEntrypoint, optional
425424
Engine to use when reading files. If not provided, the default engine
426425
is chosen based on available dependencies, with a preference for
@@ -452,8 +451,7 @@ def open_dataset(
452451
taken from variable attributes (if they exist). If the `_FillValue` or
453452
`missing_value` attribute contains multiple values a warning will be
454453
issued and all array values matching one of the multiple values will
455-
be replaced by NA. mask_and_scale defaults to True except for the
456-
pseudonetcdf backend. This keyword may not be supported by all the backends.
454+
be replaced by NA. This keyword may not be supported by all the backends.
457455
decode_times : bool, optional
458456
If True, decode times encoded in the standard NetCDF datetime format
459457
into datetime objects. Otherwise, leave them encoded as numbers.
@@ -523,7 +521,7 @@ def open_dataset(
523521
relevant when using dask or another form of parallelism. By default,
524522
appropriate locks are chosen to safely read and write files with the
525523
currently active dask scheduler. Supported by "netcdf4", "h5netcdf",
526-
"scipy", "pynio", "pseudonetcdf".
524+
"scipy", "pynio".
527525
528526
See engine open function for kwargs accepted by each specific engine.
529527
@@ -628,7 +626,7 @@ def open_dataarray(
628626
scipy.io.netcdf (only netCDF3 supported). Byte-strings or file-like
629627
objects are opened by scipy.io.netcdf (netCDF3) or h5py (netCDF4/HDF).
630628
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
631-
"pseudonetcdf", "zarr", None}, installed backend \
629+
"zarr", None}, installed backend \
632630
or subclass of xarray.backends.BackendEntrypoint, optional
633631
Engine to use when reading files. If not provided, the default engine
634632
is chosen based on available dependencies, with a preference for
@@ -658,8 +656,7 @@ def open_dataarray(
658656
taken from variable attributes (if they exist). If the `_FillValue` or
659657
`missing_value` attribute contains multiple values a warning will be
660658
issued and all array values matching one of the multiple values will
661-
be replaced by NA. mask_and_scale defaults to True except for the
662-
pseudonetcdf backend. This keyword may not be supported by all the backends.
659+
be replaced by NA. This keyword may not be supported by all the backends.
663660
decode_times : bool, optional
664661
If True, decode times encoded in the standard NetCDF datetime format
665662
into datetime objects. Otherwise, leave them encoded as numbers.
@@ -729,7 +726,7 @@ def open_dataarray(
729726
relevant when using dask or another form of parallelism. By default,
730727
appropriate locks are chosen to safely read and write files with the
731728
currently active dask scheduler. Supported by "netcdf4", "h5netcdf",
732-
"scipy", "pynio", "pseudonetcdf".
729+
"scipy", "pynio".
733730
734731
See engine open function for kwargs accepted by each specific engine.
735732
@@ -869,7 +866,7 @@ def open_mfdataset(
869866
You can find the file-name from which each dataset was loaded in
870867
``ds.encoding["source"]``.
871868
engine : {"netcdf4", "scipy", "pydap", "h5netcdf", "pynio", \
872-
"pseudonetcdf", "zarr", None}, installed backend \
869+
"zarr", None}, installed backend \
873870
or subclass of xarray.backends.BackendEntrypoint, optional
874871
Engine to use when reading files. If not provided, the default engine
875872
is chosen based on available dependencies, with a preference for

0 commit comments

Comments
 (0)