DaniSb170 / nctoolbox

Automatically exported from code.google.com/p/nctoolbox
0 stars 0 forks source link

cannot read nc4 files #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install nctoolbox on Windows 7, 64 bits, Matlab 2010b 64 bits
2. Java version 1.6
3. 
ncdataset('ftp://gmao_ops@ftp.nccs.nasa.gov/fp/das/Y2011/M07/D01/e572_fp.inst1_2
d_hwl_Nx.20110701_0000z.nc4')
??? Error using ==> ncdataset>ncdataset.ncdataset at 91
Failed to open
ftp://gmao_ops@ftp.nccs.nasa.gov/fp/das/Y2011/M07/D01/e572_fp.inst1_2d_hwl_Nx.20
110701_0000z.nc4

Caused by:
    Java exception occurred:
    java.io.FileNotFoundException:
    ftp:\gmao_ops@ftp.nccs.nasa.gov\fp\das\Y2011\M07\D01\e572_fp.inst1_2d_hwl_Nx.20110701_0000z.nc4
    (The filename, directory name, or volume label syntax is incorrect)

        at java.io.RandomAccessFile.open(Native Method)

        at java.io.RandomAccessFile.<init>(Unknown Source)

        at java.io.RandomAccessFile.<init>(Unknown Source)

        at
        ucar.unidata.io.RandomAccessFile.<init>(RandomAccessFile.java:267)

        at ucar.nc2.NetcdfFile.getRaf(NetcdfFile.java:520)

        at ucar.nc2.NetcdfFile.open(NetcdfFile.java:391)

        at
        ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:687)

        at
        ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:424)

        at
        ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:407)

        at
        ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:392)

        at
        ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:379)

What is the expected output? What do you see instead?
The files I want to read are at:
ftp://ftp.nccs.nasa.gov/fp/das/Y2011/M07/D01/

What version of the product are you using? On what operating system?
Told!

Please provide any additional information below.
Any reason? Thanks! Liviu

Original issue reported on code.google.com by gru...@gmail.com on 26 Jul 2011 at 4:13

GoogleCodeExporter commented 8 years ago
BTW, I tried with both nctoolbox-20100223 and NCTOOLBOX - 20100305

Original comment by gru...@gmail.com on 26 Jul 2011 at 4:16

GoogleCodeExporter commented 8 years ago
If you are not using OpenDAP, you need a link that starts with HTTP to access 
files remotely.  FTP will not work, since NetCDF-Java uses the "byte-range 
request" feature of HTTP to access just certain variables (or information) from 
a remote NetCDF or Grib file.

Original comment by bschlin...@gmail.com on 26 Jul 2011 at 4:20

GoogleCodeExporter commented 8 years ago
p.s. Matlab has an FTP function. If you can't put your files on an HTTP server, 
You could use the ftp function to pull files to a local directory and then use 
nctoolbox. See http://www.mathworks.com/help/techdoc/ref/ftpclass.html

Original comment by bschlin...@gmail.com on 26 Jul 2011 at 4:27