diff --git a/docs/source/concepts/field.rst b/docs/source/concepts/field.rst index 8cbefcad1..001da0f1e 100644 --- a/docs/source/concepts/field.rst +++ b/docs/source/concepts/field.rst @@ -20,4 +20,4 @@ A :py:class:`~earthkit.data.core.fieldlist.FieldList` is a collection of :py:cla How-tos: - :ref:`/how-tos/field/field_overview.ipynb` - - :ref:`/how-tos/grib/grib_overview.ipynb`` + - :ref:`/how-tos/grib/grib_overview.ipynb` diff --git a/docs/source/concepts/misc/grib_metadata.rst b/docs/source/concepts/misc/grib_metadata.rst index 84cf9e346..66264e031 100644 --- a/docs/source/concepts/misc/grib_metadata.rst +++ b/docs/source/concepts/misc/grib_metadata.rst @@ -1,4 +1,4 @@ -.. _grib-metadata-cache +.. _grib-metadata-cache: GRIB field metadata caching ////////////////////////////// diff --git a/docs/source/concepts/xarray/overview.rst b/docs/source/concepts/xarray/overview.rst index 6dc18dd7e..f638eb771 100644 --- a/docs/source/concepts/xarray/overview.rst +++ b/docs/source/concepts/xarray/overview.rst @@ -109,7 +109,7 @@ It is possible to directly write the Xarray dataset created with the earthkit en Using to_fieldlist() ++++++++++++++++++++ -We can also convert the Xarray dataset into a GRIB fieldlist by using :py:meth:`~earthkit.data.xr_engine.engine.XarrayEarthkit.to_fieldlist` on the ``earthkit`` accessor of the Xarray object. Please note that this will generate a fieldlist entirely stored in memory. This method only works if the Xarray dataset was generated with the earthkit engine from GRIB data.\ +We can also convert the Xarray dataset into a GRIB fieldlist by using :py:meth:`~earthkit.data.xr_engine.engine.XarrayEarthkit.to_fieldlist` on the ``earthkit`` accessor of the Xarray object. Please note that this will generate a fieldlist entirely stored in memory. This method only works if the Xarray dataset was generated with the earthkit engine from GRIB data. .. code-block:: python diff --git a/docs/source/experimental/grib_tensor.ipynb b/docs/source/experimental/grib_tensor.ipynb index f19a258a6..2aa450acf 100644 --- a/docs/source/experimental/grib_tensor.ipynb +++ b/docs/source/experimental/grib_tensor.ipynb @@ -692,7 +692,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Repetaed sel()" + "#### Repeated sel()" ] }, { diff --git a/docs/source/how-tos/grib/grib_contents.ipynb b/docs/source/how-tos/grib/grib_contents.ipynb index 0ee23a55a..ed0408861 100644 --- a/docs/source/how-tos/grib/grib_contents.ipynb +++ b/docs/source/how-tos/grib/grib_contents.ipynb @@ -110,7 +110,7 @@ "tags": [] }, "source": [ - "py:meth:`~earthkit.data.core.fieldlist.FieldList.ls`) lists all the fields:" + ":py:meth:`~earthkit.data.core.fieldlist.FieldList.ls`) lists all the fields:" ] }, { diff --git a/docs/source/how-tos/misc/config.ipynb b/docs/source/how-tos/misc/config.ipynb index 9145a056a..2e14d3081 100644 --- a/docs/source/how-tos/misc/config.ipynb +++ b/docs/source/how-tos/misc/config.ipynb @@ -48,10 +48,13 @@ "slideshow": { "slide_type": "" }, - "tags": [] + "tags": [], + "vscode": { + "languageId": "raw" + } }, "source": [ - "The :ref:`config` object is loaded from the ``~/.config/earthkit/data/config.yaml`` file. Changes are immediately saved back into this file unless we explicitly disable it with ``config.autosave` or use a :ref:`temporary configuration `." + " \"The :ref:`config` object is loaded from the ``~/.config/earthkit/data/config.yaml`` file. Changes are immediately saved back into this file unless we explicitly disable it with ``config.autosave`` or use a :ref:`temporary configuration `.\"" ] }, { diff --git a/docs/source/how-tos/source/files.ipynb b/docs/source/how-tos/source/files.ipynb index 6588d8d42..10f38d628 100644 --- a/docs/source/how-tos/source/files.ipynb +++ b/docs/source/how-tos/source/files.ipynb @@ -41,7 +41,7 @@ "tags": [] }, "source": [ - "First, we ensure the example files used for this notebook are avaliable." + "First, we ensure the example files used for this notebook are available." ] }, { diff --git a/docs/source/how-tos/source/url_stream.ipynb b/docs/source/how-tos/source/url_stream.ipynb index ec292fc07..812969b24 100644 --- a/docs/source/how-tos/source/url_stream.ipynb +++ b/docs/source/how-tos/source/url_stream.ipynb @@ -75,7 +75,7 @@ "tags": [] }, "source": [ - "The resulting object only supports one iteration. Having finsihed the iteration the stream is consumed and no more data is available." + " \"The resulting object only supports one iteration. Having finished the iteration the stream is consumed and no more data is available.\"" ] }, { diff --git a/src/earthkit/data/core/field.py b/src/earthkit/data/core/field.py index 6f34e1ccb..ce8995281 100644 --- a/src/earthkit/data/core/field.py +++ b/src/earthkit/data/core/field.py @@ -166,7 +166,7 @@ def __init__( labels=None, ): """ - Cretae a Field object. + Create a Field object. Do not use this constructor directly, but use the factory methods such as :meth:`from_dict` diff --git a/src/earthkit/data/data/grib.py b/src/earthkit/data/data/grib.py index 3301f5f48..db5afa355 100644 --- a/src/earthkit/data/data/grib.py +++ b/src/earthkit/data/data/grib.py @@ -161,7 +161,7 @@ def to_numpy(self, *args, **kwargs) -> "numpy.ndarray": def to_array(self, *args, **kwargs) -> ArrayLike: """Convert into an array of a given array-like type. - It is done by fist converting the GRIB data into a fieldlist and calling the fieldlist's + It is done by first converting the GRIB data into a fieldlist and calling the fieldlist's :py:func:`to_array ` method. Parameters diff --git a/src/earthkit/data/data/stream.py b/src/earthkit/data/data/stream.py index 7a2e8ccf1..64d6b9177 100644 --- a/src/earthkit/data/data/stream.py +++ b/src/earthkit/data/data/stream.py @@ -20,7 +20,7 @@ class StreamFeatureListData(SourceData): - either by providing iteration through the stream of features once, which is more efficient for larger datasets and allows for processing data in chunks without consuming - large amounts of memory. This is the default behavior when calling :py:func:`to_featurelist` + large amounts of memory. This is the default behaviour when calling :py:func:`to_featurelist` without any arguments, or with ``read_all=False``. - or by reading all features into memory, which may be suitable for smaller datasets or when random access is needed. This can be achieved by calling :py:func:`to_featurelist` @@ -110,7 +110,7 @@ class StreamFieldListData(SourceData): - either by providing iteration through the stream of fields once, which is more efficient for larger datasets and allows for processing data in chunks without consuming - large amounts of memory. This is the default behavior when calling :py:func:`to_fieldlist` + large amounts of memory. This is the default behaviour when calling :py:func:`to_fieldlist` without any arguments, or with ``read_all=False``. - or by reading all fields into memory, which may be suitable for smaller datasets or when random access is needed. This can be achieved by calling :py:func:`to_fieldlist` diff --git a/src/earthkit/data/readers/xarray/grid.py b/src/earthkit/data/readers/xarray/grid.py index 28de28b57..c20bf07e1 100644 --- a/src/earthkit/data/readers/xarray/grid.py +++ b/src/earthkit/data/readers/xarray/grid.py @@ -144,7 +144,7 @@ def latlons(self) -> Tuple[Any, Any]: ) else: - raise NotImplementedError(f"MeshedGrid.grid_points: unrecognized variable_dims {self.variable_dims}") + raise NotImplementedError(f"MeshedGrid.grid_points: unrecognised variable_dims {self.variable_dims}") return lat.flatten(), lon.flatten() @@ -236,7 +236,7 @@ def xys(self) -> Tuple[Any, Any]: ) else: - raise NotImplementedError(f"MeshedGrid.grid_points: unrecognized variable_dims {self.variable_dims}") + raise NotImplementedError(f"MeshedGrid.grid_points: unrecognised variable_dims {self.variable_dims}") return x.flatten(), y.flatten() diff --git a/src/earthkit/data/readers/xarray/patch.py b/src/earthkit/data/readers/xarray/patch.py index 39360c25b..89ea10e77 100644 --- a/src/earthkit/data/readers/xarray/patch.py +++ b/src/earthkit/data/readers/xarray/patch.py @@ -137,7 +137,7 @@ def patch_analysis_lead_to_valid_time( """Convert analysis time and lead time coordinates to valid time. This function creates a new valid time coordinate by adding the analysis time - and lead time coordinates, then stacks and reorganizes the dataset to use + and lead time coordinates, then stacks and reorganises the dataset to use valid time as the primary time dimension. Parameters @@ -148,7 +148,7 @@ def patch_analysis_lead_to_valid_time( Dictionary mapping required keys to coordinate names in the dataset: - 'analysis_time_coordinate' : str - Name of the analysis/initialization time coordinate. + Name of the analysis/initialisation time coordinate. - 'lead_time_coordinate' : str Name of the forecast lead time coordinate. - 'valid_time_coordinate' : str diff --git a/src/earthkit/data/sources/gribjump.py b/src/earthkit/data/sources/gribjump.py index cad3222ef..7fb0378e3 100644 --- a/src/earthkit/data/sources/gribjump.py +++ b/src/earthkit/data/sources/gribjump.py @@ -237,8 +237,8 @@ def from_mars_requests( mask = None if indices is not None: - # We do the same small optimization for indices. Optimally, we - # would do similar optimizations in pygribjump and remove this. + # We do the same small optimisation for indices. Optimally, we + # would do similar optimisations in pygribjump and remove this. ranges = [(i, i + 1) for i in indices] indices = None @@ -251,7 +251,7 @@ class FieldExtractList(SimpleFieldListBase): .. warning:: This implementation is **not thread-safe**. Concurrent access from multiple threads - may result in race conditions during lazy loading. Use appropriate synchronization + may result in race conditions during lazy loading. Use appropriate synchronisation if accessing from multiple threads. .. note:: diff --git a/src/earthkit/data/utils/patterns.py b/src/earthkit/data/utils/patterns.py index 00d890378..46fe0fc98 100644 --- a/src/earthkit/data/utils/patterns.py +++ b/src/earthkit/data/utils/patterns.py @@ -716,7 +716,7 @@ def __init__(self, pattern: str, values: Optional[Dict[str, TypingAny]] = None) pattern = pattern._subpattern(self.fixed_single_params) - # analyze path structure and turn each file path part into a + # analyse path structure and turn each file path part into a # pattern path = Path(pattern) self.root = ""