Package: libpdl-netcdf-perl
Version: 4.03-1
Severity: wishlist
The version of NetCDF currently in Debian Sid supports
retrieving datasets via OpenDAP (see below for an example.) On
the contrary, PDL::NetCDF doesn't:
pdl my $nc = PDL::NetCDF-new
(http://test.opendap.org:8080/dods/dts/test.01;);
new: Cannot create netCDF file -- No such file or directory
pdl
I've traced this issue down to the PDL::NetCDF::nc_open ()
wrapper (newlines added to for readability):
pdl use PDL::NetCDF;
pdl my $ncid;
my $nc_status = PDL::NetCDF::nc_open
(http://test.opendap.org:8080/dods/dts/test.01;, 0, $ncid = -999);
printf (nc_status = %3d;\nncid = 0x%x;\n, $nc_status, $ncid);
nc_status = -68;
ncid = 0x;
pdl
The seemingly equivalent C program apparently succeeds there:
$ cat nc-example.c
#include assert.h
#include netcdf.h
#include stdio.h
int
main (int argc, char *argv[])
{
assert (argc - 1 == 1);
int ncid;
int nc_status
= nc_open (argv[1], NC_NOWRITE, ncid);
printf (nc_status = %3d;\nncid = 0x%x;\n,
nc_status, ncid);
/* . */
return 0;
}
$ gcc nc-example.c -o nc-example -lnetcdf
$ ./nc-example http://test.opendap.org:8080/dods/dts/test.01
nc_status = 0;
ncid = 0x1;
$
Of course, there's an option to use nccopy(1) here, like:
$ nccopy http://test.opendap.org:8080/dods/dts/test.01 test.nc
But it's inconvenient. (And note also Debian Bug#611338.)
PS. I guess that with OpenDAP support in PDL::NetCDF, some very
impressive demos could be made using the OpenDAP service of the
weather data available from the NOMADS project [1].
[1] http://nomads.ncep.noaa.gov/
--
FSF associate member #7257
pgptOJmxWd0na.pgp
Description: PGP signature