iris: CF variable group not found in netCDF4 file; also not being able to load cube should tell the user why
Hi guys, I have been asked by @ledm why a certain NetCDF_v4 (priority 5)
file can not be loaded by iris
but ncdump
works fine and in actuality it is a netCDF file with metadata and data in it (I am attaching the ncdump -h
output; the results of load_raw
or load
are empty lists and load_cube
returns iris.exceptions.ConstraintMismatchError: no cubes found
). It proves out that the reason iris can not load any cube out of the file is iris.fileformats.netcdf.load_cubes()
returns no cube since it can not find any CF variable ie the dict cf.cf_group.data_variables
is totally empty. Why this is is beyond my paygrade, my two cents is that the attribute :Conventions = "CF-1.7 CMIP-6.2" ;
is wonky. But you know better! Can I suggest one thing and ask anthoer pls:
- in such cases it’d be nice if
iris
actually told the userI can't bloody load the cube because I couldn't find any CF vars
; - why would it not be able to find any CF vars? Many thanks in advance! 🍺 @bjlittle @pelson @lbdreyer problem_file.txt
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 51 (21 by maintainers)
Just a post scriptum on the pyke installation error: This happened to me when I set up an environment first with
conda create -n evt python=3
and then did an update withconda env update -n evt --file environment.yml
. Turns out in my case the reason was that the creation of the environment installed a python 3.8 which was downgraded to python 3.7 in the update step which worked out completely ok, except that pip was somehow confused in looking things up until I deactivated and reactivated the environment (I may even have logged out in between), at which point everything worked smoothly.…and now
volcello
is a data variable:😄
Cheers, Bill! In theory all deps should have been installed by conda in the esmvaltool env, unless iris 3 has new deps vs 2.2.1. Ill try as soon as I get in work. Much thanks to Bill for being so on the ball 🍺
Dr Valeriu Predoi. Computational scientist NCAS-CMS University of Reading Department of Meteorology Reading RG6 6BB United Kingdom
On Wed, 20 Nov 2019, 10:59 Bill Little, notifications@github.com wrote:
reverted to older versions:
still no joy! It doesn’t seem to be a dependency issue 😿
will attempt installing
1.5.3
, just saw it released 🍺Thanks @bjlittle, any help you can give us on this tomorrow would be great. It’s a fairly urgent problem for us. We’ll keep looking at it and post anything we find here - but we understand that you might be see anything until tomorrow. Cheers!
@valeriupredoi Thanks. I’m offline pretty much today (only capable of servicing GitHub), but I’ll spin up on this early tomorrow morning and investigate further.
where
@bjlittle extra extra 😁 Man, I tried
xarray
and the file loads fine in it. I also put one of these volcello up for you to download easily at (it’sweird.nc
, no pun intended) https://github.com/NCAS-CMS/NCAS-Useful-Documentation/tree/master/iris 🍺Hi Bill,
On JASMIN, I’m finding that this problem occurs will all the files that I have looked at matching:
ls /badc/cmip6/data/CMIP6/CMIP///historical/r*/O*/volcello/gr/latest/volcello*:
If you can’t access jasmin, these files are also available on ESGF. MIP era:
CMIP6
, experiment:historical
, variable:volcello
. Thanks!@valeriupredoi Good to hear from you 😃
Looking at the
ncdump
that you provided there’s nothing obviously wrong that I can see. It’s certainly not related to theConventions
attribute.Would it be possible for you to share the actual NetCDF file with me? Or explain how and where I can download it from? That’s the only way that I’m going to easily progress this for you.
Thanks!