Problems with netcdf handlers

5 views
Skip to first unread message

Esben

unread,
Nov 13, 2009, 8:52:11 AM11/13/09
to pydap
Hi,

I've encountered a problem with the netcdf handlers in pydap serving
this file: ftp://ftp.dmi.dk/pub/ice/tmp/netcdf/ice_avg_ssmi_conc-prob_nh_ease_125_198707111200_24.nc

Using the pupynere handler i get the expected html-response.

Using netCDF4 I get the following html-response:
Error {
code = -1;
message = "Traceback (most recent call last):
File \"/home/esn/sandbox/lib/python2.5/site-packages/Pydap-3.0.rc.7-
py2.5.egg/pydap/handlers/lib.py\", line 64, in __call__
dataset = self.parse_constraints(environ)
File \"/home/esn/sandbox/lib/python2.5/site-packages/
pydap.handlers.netcdf-0.4.7-py2.5.egg/pydap/handlers/netcdf/__init__.py
\", line 96, in parse_constraints
grid[dim] = get_var(dim, fp, dimslice, buf_size)
File \"/home/esn/sandbox/lib/python2.5/site-packages/
pydap.handlers.netcdf-0.4.7-py2.5.egg/pydap/handlers/netcdf/__init__.py
\", line 123, in get_var
data = numpy.arange(size)[slice_]
TypeError: unsupported operand type(s) for -: 'netCDF4.Dimension' and
'int'
";
}

Using Scientific.IO.NetCDF I get:
Error {
code = -1;
message = "Traceback (most recent call last):
File \"/home/esn/sandbox/lib/python2.5/site-packages/Pydap-3.0.rc.7-
py2.5.egg/pydap/handlers/lib.py\", line 64, in __call__
dataset = self.parse_constraints(environ)
File \"/usr/lib/python2.5/site-packages/pydap.handlers.netcdf-0.4.7-
py2.5.egg/pydap/handlers/netcdf/__init__.py\", line 93, in
parse_constraints
grid[name] = get_var(name, fp, slice_, buf_size)
File \"/usr/lib/python2.5/site-packages/pydap.handlers.netcdf-0.4.7-
py2.5.egg/pydap/handlers/netcdf/__init__.py\", line 129, in get_var
attributes=attrs)
File \"/home/esn/sandbox/lib/python2.5/site-packages/Pydap-3.0.rc.7-
py2.5.egg/pydap/model.py\", line 178, in __init__
self.type = type in basetypes and type or typemap[type]
KeyError: 's'
";
}

The file is a NetCDF3 file and is readable with both
Scientific.IO.NetCDF and netCDF4. The sample file coads.nc has the
correct html-response with all three handlers.

Best regards
Esben Nielsen
Danish Meteorological Institute

Roberto De Almeida

unread,
Nov 19, 2009, 6:20:36 AM11/19/09
to py...@googlegroups.com
Hi, Esben!

This should be fixed on the new handler, 0.4.8.

Thanks,
--Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "pydap" group.
To post to this group, send email to py...@googlegroups.com
To unsubscribe from this group, send email to pydap+un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/pydap?hl=en
-~----------~----~----~----~------~----~------~--~---




--
Dr. Roberto De Almeida
http://dealmeida.net/
http://lattes.cnpq.br/1858859813771449
:wq

Reply all
Reply to author
Forward
0 new messages