From 7e57688a34a306cbe64183449dc4b0c72246e050 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 19:23:24 +0000 Subject: [PATCH 1/6] Add reference & link to training materials in setup/intro files --- README.md | 8 ++++++++ docs/source/introduction.rst | 10 ++++++++++ setup.py | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/README.md b/README.md index 7addafdcd4..8829d96f6a 100644 --- a/README.md +++ b/README.md @@ -148,3 +148,11 @@ Tests Tests are run from within the ``cf/test`` directory: python run_tests.py + +Training +======= + +Training material on cf-python and cf-plot i.e. the CF Data Tools, + in the form of Jupyter Notebooks, is openly-accessible and available + (with instructions for set-up provided) at: + https://github.com/NCAS-CMS/cf-tools-training. diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 5381ad7997..f71b31fe62 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -148,6 +148,16 @@ of plotting possibilities with example code. ---- +**Training** +------------ + +Training material on cf-python and cf-plot i.e. the CF Data Tools, +in the form of Jupyter Notebooks, is openly-accessible and available +(with instructions for set-up provided) at: +https://github.com/NCAS-CMS/cf-tools-training. + +---- + **Performance** --------------- diff --git a/setup.py b/setup.py index c8391464ea..f5ddbed1f7 100755 --- a/setup.py +++ b/setup.py @@ -160,6 +160,11 @@ def compile(): `_ package, that needs to be installed separately to the ``cf`` package. +Training +======== + +https://github.com/NCAS-CMS/cf-tools-training + Functionality ============= From f4afdb6b8aaded3365d01492a13e1d2a719f8be1 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 19:28:15 +0000 Subject: [PATCH 2/6] Remove duplicate words found in docs tutorial --- docs/source/tutorial.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index c9423d0c17..d7aa1e87a6 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -1153,7 +1153,7 @@ Manipulating dimensions ^^^^^^^^^^^^^^^^^^^^^^^ The dimensions of a field construct's data may be reordered, have size -one dimensions removed and have new new size one dimensions included +one dimensions removed and have new size one dimensions included by using the following field construct methods: ========================= =========================================== @@ -1223,7 +1223,7 @@ Data mask There is always a data mask, which may be thought of as a separate data array of Booleans with the same shape as the original data. The -data mask is `False` where the the data has values, and `True` where +data mask is `False` where the data has values, and `True` where the data is missing. The data mask may be inspected with the `~Field.mask` attribute of the field construct, which returns the data mask in a field construct with the same metadata constructs as the From 78d52c4c1c2b3d2c74e7094459e6e229d126258e Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 19:43:33 +0000 Subject: [PATCH 3/6] Remove further duplicate 'the' words found in docs tutorial --- docs/source/tutorial.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index d7aa1e87a6..f744494b52 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -1594,7 +1594,7 @@ Masked values ^^^^^^^^^^^^^ Data array elements may be set to masked values by assigning them to -the `cf.masked` constant, thereby updating the the :ref:`data mask +the `cf.masked` constant, thereby updating the :ref:`data mask `. .. code-block:: python @@ -2327,7 +2327,7 @@ date-time objects of the `cftime package attribute of the construct, or its `cf.Data` instance. .. code-block:: python - :caption: *Inspect the the values of a "time" construct as elapsed + :caption: *Inspect the values of a "time" construct as elapsed times and as date-times.* >>> time = q.construct('time') @@ -6902,7 +6902,7 @@ their contents into field constructs. 32-bit and 64-bit PP and UM fields files of any endian-ness can be read. In nearly all cases the file format is auto-detectable from the first 64 bits in the file, but for the few occasions when this is not possible [#um]_, the *um* -keyword of `cf.read` allows the format to be specified. The the UM +keyword of `cf.read` allows the format to be specified. The UM version (if not inferrable from the PP or lookup header information) and the height of the upper bound of the top model level may also be set with the *um* keyword. From ac9bc8675332c1b6332abe8b3539c7d598e8c15d Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 20:04:23 +0000 Subject: [PATCH 4/6] Remove further duplicate 'the' words in docstrings --- cf/data/data.py | 6 +++--- cf/mixin/fielddomain.py | 2 +- cf/mixin/propertiesdata.py | 6 +++--- cf/mixin/propertiesdatabounds.py | 6 +++--- cf/read_write/read.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cf/data/data.py b/cf/data/data.py index 1bbc5db614..c8c062b68e 100644 --- a/cf/data/data.py +++ b/cf/data/data.py @@ -7099,7 +7099,7 @@ def sinh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic sine of 90 + they were radians. For example, the hyperbolic sine of 90 degrees_north is 2.30129890, as is the hyperbolic sine of 1.57079632 radians. @@ -7159,7 +7159,7 @@ def cosh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic cosine of 0 + they were radians. For example, the hyperbolic cosine of 0 degrees_east is 1.0, as is the hyperbolic cosine of 1.57079632 radians. The output units are changed to '1' (nondimensional). @@ -7219,7 +7219,7 @@ def tanh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic tangent of 90 + they were radians. For example, the hyperbolic tangent of 90 degrees_east is 0.91715234, as is the hyperbolic tangent of 1.57079632 radians. diff --git a/cf/mixin/fielddomain.py b/cf/mixin/fielddomain.py index 56f55b8755..4393d2d07a 100644 --- a/cf/mixin/fielddomain.py +++ b/cf/mixin/fielddomain.py @@ -247,7 +247,7 @@ def _indices(self, config, data_axes, ancillary_mask, kwargs): tuples of domain axis identifier combinations, each of which has of a `Data` object containing the ancillary mask to apply to those domain axes - immediately after the the subspace has been created + immediately after the subspace has been created by the ``'indices'``. This dictionary will always be empty if the *ancillary_mask* parameter is False. diff --git a/cf/mixin/propertiesdata.py b/cf/mixin/propertiesdata.py index 4570e28252..2ac8e1ab2c 100644 --- a/cf/mixin/propertiesdata.py +++ b/cf/mixin/propertiesdata.py @@ -4165,7 +4165,7 @@ def tanh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are - treated as if they were radians. For example, the the + treated as if they were radians. For example, the hyperbolic tangent of 90 degrees_east is 0.91715234, as is the hyperbolic tangent of 1.57079632 radians. @@ -4227,7 +4227,7 @@ def sinh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are - treated as if they were radians. For example, the the + treated as if they were radians. For example, the hyperbolic sine of 90 degrees_north is 2.30129890, as is the hyperbolic sine of 1.57079632 radians. @@ -4288,7 +4288,7 @@ def cosh(self, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are - treated as if they were radians. For example, the the + treated as if they were radians. For example, the hyperbolic cosine of 0 degrees_east is 1.0, as is the hyperbolic cosine of 1.57079632 radians. diff --git a/cf/mixin/propertiesdatabounds.py b/cf/mixin/propertiesdatabounds.py index 8e103173bf..1150449a56 100644 --- a/cf/mixin/propertiesdatabounds.py +++ b/cf/mixin/propertiesdatabounds.py @@ -3009,7 +3009,7 @@ def tanh(self, bounds=True, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic tangent of 90 + they were radians. For example, the hyperbolic tangent of 90 degrees_east is 0.91715234, as is the hyperbolic tangent of 1.57079632 radians. @@ -3069,7 +3069,7 @@ def sinh(self, bounds=True, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic sine of 90 + they were radians. For example, the hyperbolic sine of 90 degrees_north is 2.30129890, as is the hyperbolic sine of 1.57079632 radians. @@ -3128,7 +3128,7 @@ def cosh(self, bounds=True, inplace=False): Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if - they were radians. For example, the the hyperbolic cosine of 0 + they were radians. For example, the hyperbolic cosine of 0 degrees_east is 1.0, as is the hyperbolic cosine of 1.57079632 radians. The output units are changed to '1' (nondimensional). diff --git a/cf/read_write/read.py b/cf/read_write/read.py index 082b0dde95..684f473979 100644 --- a/cf/read_write/read.py +++ b/cf/read_write/read.py @@ -88,7 +88,7 @@ class read(cfdm.read): the end of the Python session, at which time it is automatically deleted. The CDL file may omit data array values (as would be the case, for example, if the file was created with the ``-h`` or - ``-c`` option to ``ncdump``), in which case the the relevant + ``-c`` option to ``ncdump``), in which case the relevant constructs in memory will be created with data with all missing values. From 06653ade3561de6145ea1c691de8b9936bc429bd Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 20:26:47 +0000 Subject: [PATCH 5/6] Remove (final) duplicate 'the' words across docs --- docs/source/field_analysis.rst | 4 ++-- docs/source/introduction.rst | 2 +- docs/source/tutorial.rst | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/field_analysis.rst b/docs/source/field_analysis.rst index 638ee2d073..32018df19c 100644 --- a/docs/source/field_analysis.rst +++ b/docs/source/field_analysis.rst @@ -2221,7 +2221,7 @@ cell sizes (or custom weights) may applied to the calculation. .. code-block:: python :caption: *Calculate a 3-point weighted mean of the 'X' axis. Since - the the 'X' axis is cyclic, the mean wraps by default.* + the 'X' axis is cyclic, the mean wraps by default.* >>> q, t = cf.read('file.nc') >>> print(q) @@ -2292,7 +2292,7 @@ filter. Convolution filters are carried with the .. code-block:: python :caption: *Calculate a 5-point mean of the 'X' axis with a - non-uniform window function. Since the the 'X' axis is + non-uniform window function. Since the 'X' axis is cyclic, the convolution wraps by default.* >>> print(q) diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index f71b31fe62..30514a0e5c 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -271,7 +271,7 @@ all of its metadata. It is defined in CF-|version| as follows: .. figure:: images/cfdm_field.svg - *The constructs of the CF data model described using UML. The field construct corresponds to a CF-netCDF data variable. The domain construct provides the linkage between the field construct and the constructs which describe measurement locations and cell properties. It is useful to define an abstract generic coordinate construct that can be used to refer to coordinates when the their type (dimension or auxiliary coordinate construct) is not an issue.* + *The constructs of the CF data model described using UML. The field construct corresponds to a CF-netCDF data variable. The domain construct provides the linkage between the field construct and the constructs which describe measurement locations and cell properties. It is useful to define an abstract generic coordinate construct that can be used to refer to coordinates when their type (dimension or auxiliary coordinate construct) is not an issue.* ---- diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index f744494b52..bc3b6671c6 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -2545,7 +2545,7 @@ grid point location for each cell. The cell bounds are stored in a `~Coordinate.bounds` attribute, or `~Coordinate.get_bounds` method, of the coordinate construct. -A `cf.Bounds` instance shares the :ref:`the same API as the field +A `cf.Bounds` instance shares :ref:`the same API as the field construct ` for accessing its data. .. code-block:: python @@ -7064,7 +7064,7 @@ adding new ones, is straight forward with the Note that some STASH codes have multiple standard name mappings. This could be due to the standard name being a function of other parts of the header (as is the case for ``(1, 2)``) and ``(1, 152)``), or the -the STASH code only being valid for particular UM versions (as is the +STASH code only being valid for particular UM versions (as is the case for ``(1, 152)``). ---- From 3e3ad11daacf2381cdaca63f1c827485ab80f929 Mon Sep 17 00:00:00 2001 From: "Sadie L. Bartholomew" Date: Wed, 29 Oct 2025 20:30:20 +0000 Subject: [PATCH 6/6] Re-build docs & commit only updated pages to cover typos --- docs/analysis.html | 31 ++++++++++++++++--------------- docs/field_analysis.html | 27 ++++++++++++++------------- docs/introduction.html | 29 +++++++++++++++++++---------- docs/tutorial.html | 22 +++++++++++----------- 4 files changed, 60 insertions(+), 49 deletions(-) diff --git a/docs/analysis.html b/docs/analysis.html index e1c9b959cd..35a98534a4 100644 --- a/docs/analysis.html +++ b/docs/analysis.html @@ -6,13 +6,13 @@ Analysis — Documentation - - + + - - - + + + @@ -28,16 +28,17 @@ + + -
-