Skip to content
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

string attributes in netCDF files written by Iris #29

Open
DamienIrving opened this issue Apr 29, 2016 · 1 comment
Open

string attributes in netCDF files written by Iris #29

DamienIrving opened this issue Apr 29, 2016 · 1 comment

Comments

@DamienIrving
Copy link
Owner

When using iris.save() to write iris cubes out to netCDF, some of the attributes are designated as "string". e.g:

variables:
    double thetao(time, lev, j, i) ;
        thetao:_FillValue = 1.e+20 ;
        string thetao:standard_name = "sea_water_potential_temperature" ;
        string thetao:long_name = "Sea Water Potential Temperature" ;
        thetao:units = "K" ;
        thetao:coordinates = "lat lon" ;
    double time(time) ;
        time:axis = "T" ;
        time:bounds = "time_bnds" ;
        time:units = "days since 0001-01-01" ;
        string time:standard_name = "time" ;
        string time:long_name = "time" ;
        string time:calendar = "proleptic_gregorian" ;

Iris seems to have no problem with these attributes (i.e. I can read the netCDF file with iris), but other applications (e.g. cdo) sometimes do.

@DamienIrving
Copy link
Owner Author

It turns out that this is due to a poor choice made in netCDF4-Python which has now been fixed:
Unidata/netcdf4-python#529

The short answer is that you should either downgrade netCDF4-Python to v1.1.7 or earlier or upgrade to v1.2.3 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant