metoppv / improver

IMPROVER is a library of algorithms for meteorological post-processing.
http://improver.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
105 stars 85 forks source link

AttributeError: module 'iris' has no attribute 'fileformats' #1795

Closed NMC-DAVE closed 2 years ago

NMC-DAVE commented 2 years ago

Hi guys: When I call IMPROVER cli command to output nc file. I got the following errors. I think this would be iris (V3.2.1) Incompatible error. Because I can use import iris.fileformats; iris.fileformats.netcdf.save, but the import iris; iris.fileformats.netcdf.save may cause problem.

refer to https://github.com/SciTools/iris/issues/4683

` improver/improver/utilities/save.py

iris.fileformats.netcdf.save(
AttributeError: module 'iris' has no attribute 'fileformats'

`

gavinevans commented 2 years ago

Hi Dave,

Thanks for raising this issue.

We haven't yet upgraded to use Iris 3.1. The environments that we're currently using to test our PRs (i.e. #1, #2, #3) are currently pinned to versions of iris >= 3.0 and <3.1. This is largely because of the breaking change in Iris 3.1 as noted in https://github.com/SciTools/iris/issues/4683. We are planning to upgrade to use Iris 3.1 at some point, although probably not in the short-term, which as you highlight, will likely affect quite a lot of import statements within the code.

Hopefully that helps.

NMC-DAVE commented 2 years ago

Thanks very much!