Skip to content

Commit

Permalink
NEP 29 changes - py39 minimum (#339)
Browse files Browse the repository at this point in the history
* NEP 29 changes - py3.9/10/11
* Updated CML files, from SciTools/iris#5235
  • Loading branch information
trexfeathers committed Jul 6, 2023
1 parent e10442b commit 93eb3a2
Show file tree
Hide file tree
Showing 54 changed files with 1,149 additions and 674 deletions.
26 changes: 17 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Global defaults.
#
container:
image: python:3.8
image: python:3.11
cpu: 2
memory: 4G

Expand All @@ -33,7 +33,7 @@ env:

#
# Linting
# [2021-03-01] jamesp: Currently not black compliant.
# [2021-03-01] jamesp: Currently not black compliant.
# GitHub issue open #251
lint_task:
auto_cancellation: true
Expand Down Expand Up @@ -62,7 +62,7 @@ linux_task_template: &LINUX_TASK_TEMPLATE
container:
image: gcc:latest
cpu: 6
memory: 8G
memory: 8G
conda_cache:
folder: ${HOME}/miniconda
fingerprint_script:
Expand Down Expand Up @@ -93,17 +93,25 @@ linux_task_template: &LINUX_TASK_TEMPLATE
- wget --quiet https://github.com/SciTools/iris-test-data/archive/v${IRIS_TEST_DATA_REF}.zip -O iris-test-data.zip
- unzip -q iris-test-data.zip
- mv iris-test-data-$(echo "${IRIS_TEST_DATA_REF}" | sed "s/^v//") ${IRIS_TEST_DATA_DIR}

tests_task:
matrix:
- name: "${CIRRUS_OS} tests: iris=repo-main python=3.8"
- name: "${CIRRUS_OS} tests: iris=conda-release python=3.9"
env:
PY_VER: 3.8
IRIS_SOURCE: "source"
- name: "${CIRRUS_OS} tests: iris=conda-release python=3.8"
PY_VER: 3.9
IRIS_SOURCE: "conda-forge"
- name: "${CIRRUS_OS} tests: iris=conda-release python=3.10"
env:
PY_VER: 3.8
PY_VER: 3.10
IRIS_SOURCE: "conda-forge"
- name: "${CIRRUS_OS} tests: iris=conda-release python=3.11"
env:
PY_VER: 3.11
IRIS_SOURCE: "conda-forge"
- name: "${CIRRUS_OS} tests: iris=repo-main python=3.11"
env:
PY_VER: 3.11
IRIS_SOURCE: "source"

<< : *LINUX_TASK_TEMPLATE
tests_script:
Expand Down
40 changes: 22 additions & 18 deletions docs/ref/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ What's new in iris-grib v0.19.0

Bugs Fixed
^^^^^^^^^^
* `@lbdreyer <https://github.com/lbdreyer>`_ and
`@pp-mo <https://github.com/pp-mo>`_ (reviewer) modified the GRIB1 loading
code so that it no longer assumes a spherical Earth with radius of 6371229 m
* `@lbdreyer <https://github.com/lbdreyer>`_ and
`@pp-mo <https://github.com/pp-mo>`_ (reviewer) modified the GRIB1 loading
code so that it no longer assumes a spherical Earth with radius of 6371229 m
and instead uses the resolutionAndComponentFlag to determine the shape of the
Earth. This can either be a spherical Earth with radius of 6367470 m or an
Earth. This can either be a spherical Earth with radius of 6367470 m or an
oblate spheroid, the latter of which is not supported. Note that this change
in Earth's radius will result in a different coordinate system and may also
in Earth's radius will result in a different coordinate system and may also
affect the coordinate values.
`(PR#316) <https://github.com/SciTools/iris-grib/pull/316>`_


Dependencies
^^^^^^^^^^^^
* now requires Python version >= 3.9


What's new in iris-grib v0.18.0
-------------------------------
Expand All @@ -30,11 +34,11 @@ What's new in iris-grib v0.18.0

Bugs Fixed
^^^^^^^^^^
* `@lbdreyer <https://github.com/lbdreyer>`_ made various updates to allow
iris-grib to work with the latest versions of
* `@lbdreyer <https://github.com/lbdreyer>`_ made various updates to allow
iris-grib to work with the latest versions of
`iris <https://scitools-iris.readthedocs.io/en/stable/>`_,
`cf-units <https://cf-units.readthedocs.io/en/latest/>`_,
`ecCodes <https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home>`_ and
`ecCodes <https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home>`_ and
`cartopy <https://scitools.org.uk/cartopy/docs/latest/>`_, including casting
the usage of :meth:`cf_units.Unit.date2num` as float. setting and setting the
values of some missing keys using ``gribapi.GRIB_MISSING_LONG``.
Expand All @@ -49,7 +53,7 @@ Dependencies
Internal
^^^^^^^^
* `@TomDufall <https://github.com/TomDufall>`_ updated the code so that it was
`flake8 <https://flake8.pycqa.org/en/stable/>`_ compliant and enabled flake8
`flake8 <https://flake8.pycqa.org/en/stable/>`_ compliant and enabled flake8
checks to the CI.
`(PR#271) <https://github.com/SciTools/iris-grib/pull/271>`_

Expand All @@ -64,7 +68,7 @@ Bugs Fixed
^^^^^^^^^^

* `@TomDufall <https://github.com/TomDufall>`_ removed the empty slice
handling (originally added in v0.15.1) as this used
handling (originally added in v0.15.1) as this used
iris.util._array_slice_ifempty which was removed in Iris v3.0.2 and is no
longer necessary.
`(PR#270) <https://github.com/SciTools/iris-grib/pull/270>`_
Expand All @@ -88,12 +92,12 @@ What's new in iris-grib v0.17
Features
^^^^^^^^

* `@m1dr <https://github.com/m1dr>`_ added support for GRIB regulation 92.1.8
* `@m1dr <https://github.com/m1dr>`_ added support for GRIB regulation 92.1.8
for loading GRIB files where the longitude increment is not given.
`(PR#261) <https://github.com/SciTools/iris-grib/pull/261>`_

* `@lbdreyer <https://github.com/lbdreyer>`_ added support for loading grid
point and spectral data with CCSDS recommended lossless compression, i.e.
* `@lbdreyer <https://github.com/lbdreyer>`_ added support for loading grid
point and spectral data with CCSDS recommended lossless compression, i.e.
data representation template 42.
`(PR#264) <https://github.com/SciTools/iris-grib/pull/264>`_

Expand Down Expand Up @@ -153,15 +157,15 @@ Bugs Fixed
* `@pp-mo <https://github.com/pp-mo>`_ fixed loading of grid definition
template 3.90, "Space view perspective or orthographic grid", which was
**broken since Iris 2.3**. This now produces data with an iris
`Geostationary <https://scitools-iris.readthedocs.io/en/latest/generated/api/iris/coord_systems.html#iris.coord_systems.Geostationary>`_
`Geostationary <https://scitools-iris.readthedocs.io/en/latest/generated/api/iris/coord_systems.html#iris.coord_systems.Geostationary>`_
coordinate system. Prior to Iris 2.3, what is now the Iris 'Geostationary'
class was (incorrectly) named "VerticalPerspective" : When that was
`corrected in Iris 2.3 <https://github.com/SciTools/iris/pull/3406>`_ , it
broke the iris-grib loading, since the data was now incorrectly
assigned the "new-style" Iris
`VerticalPerspective <https://scitools-iris.readthedocs.io/en/latest/generated/api/iris/coord_systems.html#iris.coord_systems.VerticalPerspective>`_
coordinate system, equivalent to the Cartopy
`NearsidePerspective <https://scitools.org.uk/cartopy/docs/latest/crs/projections.html#nearsideperspective>`_
`NearsidePerspective <https://scitools.org.uk/cartopy/docs/latest/crs/projections.html#nearsideperspective>`_
and Proj
`"nsper" <https://proj.org/operations/projections/nsper.html>`_ .
The plotting behaviour of this is now **the same again as before Iris 2.3** :
Expand Down Expand Up @@ -270,8 +274,8 @@ Features
Bug Fixes
^^^^^^^^^

* Reverted a bug that was fixed in v0.13 related to loading hybrid pressure
levels. It was agreed that the initial behaviour was correct
* Reverted a bug that was fixed in v0.13 related to loading hybrid pressure
levels. It was agreed that the initial behaviour was correct

Dependencies
^^^^^^^^^^^^
Expand Down Expand Up @@ -338,7 +342,7 @@ Bug Fixes
^^^^^^^^^

* Fixed a bug with loading data on Hybrid Pressure levels (surface types 105
and 119 in code table 4.5).
and 119 in code table 4.5).
Previously, *all* hybrid coordinate values, in both 'level_pressure' and
'sigma' coordinates, were loaded from the next level up,
i.e. (model_level_number + 1).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,51 @@
<dimCoord id="507906da" long_name="extra_year_number_coord" points="[1998]" shape="(1,)" units="Unit('no_unit')" value_type="int64"/>
</coord>
<coord>
<dimCoord bounds="[[-28587.0, 6477.0]]" id="1d45e087" points="[-11055.0]" shape="(1,)" standard_name="forecast_period" units="Unit('hours')" value_type="float64"/>
<dimCoord bounds="[[-28587., 6477.]]" id="1d45e087" points="[-11055.]" shape="(1,)" standard_name="forecast_period" units="Unit('hours')" value_type="float64"/>
</coord>
<coord>
<dimCoord id="9c8bdf81" points="[246987.0]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord id="9c8bdf81" points="[246987.]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
<coord datadims="[0]">
<dimCoord id="98bcd589" points="[89.999983, 87.499984, 84.999985, 82.499986,
79.999987, 77.499988, 74.999989, 72.49999,
69.999991, 67.499992, 64.999993, 62.499994,
59.999995, 57.499996, 54.999997, 52.499998,
49.999999, 47.5, 45.000001, 42.500002,
40.000003, 37.500004, 35.000005, 32.500006,
30.000007, 27.500008, 25.000009, 22.50001,
20.000011, 17.500012, 15.000013, 12.500014,
10.000015, 7.500016, 5.000017, 2.500018,
1.90000000089e-05, -2.49998, -4.999979,
-7.499978, -9.999977, -12.499976, -14.999975,
-17.499974, -19.999973, -22.499972, -24.999971,
-27.49997, -29.999969, -32.499968, -34.999967,
-37.499966, -39.999965, -42.499964, -44.999963,
-47.499962, -49.999961, -52.49996, -54.999959,
-57.499958, -59.999957, -62.499956, -64.999955,
-67.499954, -69.999953, -72.499952, -74.999951,
-77.49995, -79.999949, -82.499948, -84.999947,
-87.499946, -89.999945]" shape="(73,)" standard_name="latitude" units="Unit('degrees')" value_type="float64">
<dimCoord id="98bcd589" points="[ 8.9999983e+01, 8.7499984e+01, 8.4999985e+01,
8.2499986e+01, 7.9999987e+01, 7.7499988e+01,
7.4999989e+01, 7.2499990e+01, 6.9999991e+01,
6.7499992e+01, 6.4999993e+01, 6.2499994e+01,
5.9999995e+01, 5.7499996e+01, 5.4999997e+01,
5.2499998e+01, 4.9999999e+01, 4.7500000e+01,
4.5000001e+01, 4.2500002e+01, 4.0000003e+01,
3.7500004e+01, 3.5000005e+01, 3.2500006e+01,
3.0000007e+01, 2.7500008e+01, 2.5000009e+01,
2.2500010e+01, 2.0000011e+01, 1.7500012e+01,
1.5000013e+01, 1.2500014e+01, 1.0000015e+01,
7.5000160e+00, 5.0000170e+00, 2.5000180e+00,
1.9000000e-05, -2.4999800e+00, -4.9999790e+00,
-7.4999780e+00, -9.9999770e+00, -1.2499976e+01,
-1.4999975e+01, -1.7499974e+01, -1.9999973e+01,
-2.2499972e+01, -2.4999971e+01, -2.7499970e+01,
-2.9999969e+01, -3.2499968e+01, -3.4999967e+01,
-3.7499966e+01, -3.9999965e+01, -4.2499964e+01,
-4.4999963e+01, -4.7499962e+01, -4.9999961e+01,
-5.2499960e+01, -5.4999959e+01, -5.7499958e+01,
-5.9999957e+01, -6.2499956e+01, -6.4999955e+01,
-6.7499954e+01, -6.9999953e+01, -7.2499952e+01,
-7.4999951e+01, -7.7499950e+01, -7.9999949e+01,
-8.2499948e+01, -8.4999947e+01, -8.7499946e+01,
-8.9999945e+01]" shape="(73,)" standard_name="latitude" units="Unit('degrees')" value_type="float64">
<geogCS earth_radius="6367470.0"/>
</dimCoord>
</coord>
<coord datadims="[1]">
<dimCoord circular="True" id="160a738f" points="[0.0, 3.749998, 7.499996, ..., 348.749814,
352.499812, 356.24981]" shape="(96,)" standard_name="longitude" units="Unit('degrees')" value_type="float64">
<dimCoord circular="True" id="160a738f" points="[ 0. , 3.749998, 7.499996, ...,
348.749814, 352.499812, 356.24981 ]" shape="(96,)" standard_name="longitude" units="Unit('degrees')" value_type="float64">
<geogCS earth_radius="6367470.0"/>
</dimCoord>
</coord>
<coord>
<dimCoord id="302bf438" long_name="pressure" points="[100000.0]" shape="(1,)" units="Unit('Pa')" value_type="float64"/>
<dimCoord id="302bf438" long_name="pressure" points="[100000.]" shape="(1,)" units="Unit('Pa')" value_type="float64"/>
</coord>
<coord>
<dimCoord bounds="[[218400.0, 253464.0]]" id="cb784457" points="[235932.0]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord bounds="[[218400., 253464.]]" id="cb784457" points="[235932.]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
</coords>
<cellMethods>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,30 @@
<dimCoord id="1d45e087" points="[0]" shape="(1,)" standard_name="forecast_period" units="Unit('hours')" value_type="int64"/>
</coord>
<coord>
<dimCoord id="9c8bdf81" points="[380304.0]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord id="9c8bdf81" points="[380304.]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
<coord datadims="[0]">
<dimCoord id="77a50eb5" points="[90.0, 87.5, 85.0, 82.5, 80.0, 77.5, 75.0, 72.5,
70.0, 67.5, 65.0, 62.5, 60.0, 57.5, 55.0, 52.5,
50.0, 47.5, 45.0, 42.5, 40.0, 37.5, 35.0, 32.5,
30.0, 27.5, 25.0, 22.5, 20.0, 17.5, 15.0, 12.5,
10.0, 7.5, 5.0, 2.5, 0.0, -2.5, -5.0, -7.5,
-10.0, -12.5, -15.0, -17.5, -20.0, -22.5, -25.0,
-27.5, -30.0, -32.5, -35.0, -37.5, -40.0, -42.5,
-45.0, -47.5, -50.0, -52.5, -55.0, -57.5, -60.0,
-62.5, -65.0, -67.5, -70.0, -72.5, -75.0, -77.5,
-80.0, -82.5, -85.0, -87.5, -90.0]" shape="(73,)" standard_name="latitude" units="Unit('degrees')" value_type="float64">
<dimCoord id="77a50eb5" points="[ 90. , 87.5, 85. , 82.5, 80. , 77.5, 75. ,
72.5, 70. , 67.5, 65. , 62.5, 60. , 57.5,
55. , 52.5, 50. , 47.5, 45. , 42.5, 40. ,
37.5, 35. , 32.5, 30. , 27.5, 25. , 22.5,
20. , 17.5, 15. , 12.5, 10. , 7.5, 5. ,
2.5, 0. , -2.5, -5. , -7.5, -10. , -12.5,
-15. , -17.5, -20. , -22.5, -25. , -27.5, -30. ,
-32.5, -35. , -37.5, -40. , -42.5, -45. , -47.5,
-50. , -52.5, -55. , -57.5, -60. , -62.5, -65. ,
-67.5, -70. , -72.5, -75. , -77.5, -80. , -82.5,
-85. , -87.5, -90. ]" shape="(73,)" standard_name="latitude" units="Unit('degrees')" value_type="float64">
<geogCS earth_radius="6371229.0"/>
</dimCoord>
</coord>
<coord datadims="[1]">
<dimCoord circular="True" id="f913a8b3" points="[0.0, 2.5, 5.0, ..., 352.5, 355.0, 357.5]" shape="(144,)" standard_name="longitude" units="Unit('degrees')" value_type="float64">
<dimCoord circular="True" id="f913a8b3" points="[ 0. , 2.5, 5. , ..., 352.5, 355. , 357.5]" shape="(144,)" standard_name="longitude" units="Unit('degrees')" value_type="float64">
<geogCS earth_radius="6371229.0"/>
</dimCoord>
</coord>
<coord>
<dimCoord id="cb784457" points="[380304.0]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord id="cb784457" points="[380304.]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
</coords>
<cellMethods/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@
<dimCoord id="1d45e087" points="[2]" shape="(1,)" standard_name="forecast_period" units="Unit('hours')" value_type="int64"/>
</coord>
<coord>
<dimCoord id="9c8bdf81" points="[379980.0]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord id="9c8bdf81" points="[379980.]" shape="(1,)" standard_name="forecast_reference_time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
<coord>
<dimCoord id="ecc4ad5a" long_name="height" points="[2.0]" shape="(1,)" units="Unit('m')" value_type="float64"/>
<dimCoord id="ecc4ad5a" long_name="height" points="[2.]" shape="(1,)" units="Unit('m')" value_type="float64"/>
</coord>
<coord datadims="[1]">
<dimCoord id="f429d179" points="[-2396487.0124, -2392487.0124, -2388487.0124,
..., 2387512.9876, 2391512.9876, 2395512.9876]" shape="(1199,)" standard_name="projection_x_coordinate" units="Unit('m')" value_type="float64">
<dimCoord id="f429d179" points="[-2396487.01239774, -2392487.01239774,
-2388487.01239774, ..., 2387512.98760226,
2391512.98760226, 2395512.98760226]" shape="(1199,)" standard_name="projection_x_coordinate" units="Unit('m')" value_type="float64">
<lambertConformal central_lat="60.0" central_lon="262.0" ellipsoid="GeogCS(6371229.0)" false_easting="0.0" false_northing="0.0" secant_latitudes="(60.0, 30.0)"/>
</dimCoord>
</coord>
<coord datadims="[0]">
<dimCoord id="51f2bb31" points="[-3870311.24926, -3866311.24926, -3862311.24926,
..., -686311.249256, -682311.249256,
-678311.249256]" shape="(799,)" standard_name="projection_y_coordinate" units="Unit('m')" value_type="float64">
<dimCoord id="51f2bb31" points="[-3870311.24925566, -3866311.24925566,
-3862311.24925566, ..., -686311.24925566,
-682311.24925566, -678311.24925566]" shape="(799,)" standard_name="projection_y_coordinate" units="Unit('m')" value_type="float64">
<lambertConformal central_lat="60.0" central_lon="262.0" ellipsoid="GeogCS(6371229.0)" false_easting="0.0" false_northing="0.0" secant_latitudes="(60.0, 30.0)"/>
</dimCoord>
</coord>
<coord>
<dimCoord id="cb784457" points="[379982.0]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
<dimCoord id="cb784457" points="[379982.]" shape="(1,)" standard_name="time" units="Unit('hours since 1970-01-01 00:00:00', calendar='standard')" value_type="float64"/>
</coord>
</coords>
<cellMethods/>
Expand Down

0 comments on commit 93eb3a2

Please sign in to comment.