-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iris=3.8.1 ignores bounds at loading a hybrid height coordinate #5806
Comments
cheers @trexfeathers - I take it this is not solved in any way in 3.9.0 as well? Not pressuring you folk in any way - pure engineering reasons for me, we marked a test as xfailed, and was wondering if we should un-xfail it? 🍻 |
@valeriupredoi What a weird coincidence we were in the middle of writing this reply when you commented that. We have confirmed that this is an intended change in #5746 as suggested above. Obviously the problem in this case is that import iris
from iris import NameConstraint
from ncdata.netcdf4 import from_nc4
from ncdata.iris import to_iris
ncdata = from_nc4("problem-cube.nc")
ncdata.variables["lev_bnds"].attributes["units"] = ncdata.variables["lev"].attributes["units"]
cubes = to_iris(ncdata)
short_name = "cl"
cube = cubes.extract_cube(NameConstraint(var_name=short_name))
print(cube)
height_coord = cube.coord('altitude')
print(height_coord.units)
assert height_coord.bounds is not None |
@HGWright brill, many thanks! We'll do the fix dance then 😁 🍺 |
Hey folks, one from me please:
Problem in a 🥥 shell
New iris=3.8.1 loads a field (
cl
,cloud_area_fraction_in_atmosphere_layer
) but fails to correctly load itsatmosphere_hybrid_height_coordinate
ie its bounds. It spits a few warnings but then proceeds to call it a good day. Attached offending netCDF4 file and minimal test reproducible code, please rename the netCDF4 file with correct extension 😁problem-cube.nc.txt
Working iris
iris=3.7.0
Not working iris
iris=3.8.1
Minimal reproducible code
Expected correct output
Resulting problem output
The text was updated successfully, but these errors were encountered: