Skip to content

Commit 3b60e77

Browse files
committed
Explain why certain variables are not loaded in in docstring of all open_...()
1 parent 028d6b5 commit 3b60e77

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/sdf_xarray/__init__.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ def open_dataset(
202202
keep_particles: bool = False,
203203
probe_names: list[str] | None = None,
204204
) -> xr.Dataset:
205-
"""Open an EPOCH SDF file as a `xarray.Dataset`.
205+
"""Open an SDF file as a `xarray.Dataset`. Variables related to ``boundaries``,
206+
``cpu`` and ``output`` file are excluded as they are problematic. If you wish
207+
to load these variables in see :ref:`loading-raw-files`.
206208
207209
Parameters
208210
----------
@@ -238,7 +240,10 @@ def open_mfdataset(
238240
data_vars: list[str] | None = None,
239241
chunks: T_Chunks = "auto",
240242
) -> xr.Dataset:
241-
"""Open a set of EPOCH SDF files as one `xarray.Dataset`.
243+
"""Open a set of EPOCH SDF files as one `xarray.Dataset`. Variables
244+
related to ``boundaries``, ``cpu`` and ``output`` file are excluded
245+
as they are problematic. If you wish to load these variables in see
246+
:ref:`loading-raw-files`.
242247
243248
EPOCH can output variables at different periods, so each individal
244249
SDF file from one EPOCH run may have different variables in it. In
@@ -339,6 +344,10 @@ def open_datatree(
339344
probe_names: list[str] | None = None,
340345
) -> xr.DataTree:
341346
"""
347+
Open an SDF file as a `xarray.DataTree`. Variables related to ``boundaries``,
348+
``cpu`` and ``output`` file are excluded as they are problematic. If you wish
349+
to load these variables in see :ref:`loading-raw-files`.
350+
342351
An `xarray.DataTree` is constructed utilising the original names in the SDF
343352
file. This is due to the fact that these names include slashes which `xarray`
344353
can use to automatically build up a datatree. We do additionally replace
@@ -398,7 +407,10 @@ def open_mfdatatree(
398407
probe_names: list[str] | None = None,
399408
data_vars: list[str] | None = None,
400409
) -> xr.DataTree:
401-
"""Open a set of EPOCH SDF files as one `xarray.DataTree`
410+
"""Open a set of EPOCH SDF files as one `xarray.DataTree`. Variables
411+
related to ``boundaries``, ``cpu`` and ``output`` file are excluded
412+
as they are problematic. If you wish to load these variables in see
413+
:ref:`loading-raw-files`.
402414
403415
EPOCH can output variables at different periods, so each individal
404416
SDF file from one EPOCH run may have different variables in it. In

0 commit comments

Comments
 (0)