Closed GoogleCodeExporter closed 8 years ago
The attribute is stored as a variable length string in the netcdf file, which
the python interface cannot handle. I will put supporting this on my to-do
list. I bet this file will break a lot of clients though - variable length
strings are a recent addition to the netcdf format, and are not often seen in
the wild.
Original comment by whitaker.jeffrey@gmail.com
on 2 Jan 2013 at 11:39
a tentative fix for this is now in SVN....
I imagine since you are on Windows, you won't be able to build from source so
you may have to wait till the next release.
Original comment by whitaker.jeffrey@gmail.com
on 3 Jan 2013 at 12:34
Hi Jeff,
Thank you so much for the fast responses! Thank you also for putting this on
your to-do list. I will pass your information about use of variable length
strings to the dataset developer.
Sincerely,
Kyle.
Original comment by kylehilb...@gmail.com
on 3 Jan 2013 at 5:27
Kyle: Any chance you can test my fix?
Original comment by whitaker.jeffrey@gmail.com
on 3 Jan 2013 at 6:34
Only if I can do that on Windows.
Original comment by kylehilb...@gmail.com
on 3 Jan 2013 at 7:13
I'm unable to cythonize netCDF4.pyx. Probably the nc_get_att_string function
needs to be added to netCDF4.pxi?
Error compiling Cython file:
------------------------------------------------------------
...
pstring =\
value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
return pstring
elif att_type == NC_STRING:
if att_len == 1:
ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
^
------------------------------------------------------------
netCDF4.pyx:925:36: undeclared name not builtin: nc_get_att_string
Error compiling Cython file:
------------------------------------------------------------
...
pstring =\
value_arr.tostring().decode(default_encoding,unicode_error).replace('\x00','')
return pstring
elif att_type == NC_STRING:
if att_len == 1:
ierr = nc_get_att_string(grp._grpid, varid, attname, &stratt)
^
------------------------------------------------------------
netCDF4.pyx:925:65: Cannot convert 'char **' to Python object
Original comment by cjgoh...@gmail.com
on 9 Jan 2013 at 4:19
RIght = fixed now in SVN.
Original comment by whitaker.jeffrey@gmail.com
on 9 Jan 2013 at 7:34
Original comment by whitaker.jeffrey@gmail.com
on 7 Mar 2013 at 11:38
Original issue reported on code.google.com by
kylehilb...@gmail.com
on 2 Jan 2013 at 10:38Attachments: