Re: [netcdfgroup] Segmentation fault on NcFile open

For the opendap access case, drop the .nc suffix.

--
Christopher Lynnes, NASA/GSFC
301-614-5185
________________________________________
From: Taylor Binnington [tbinnington@xxxxxxxxx]
Sent: Tuesday, January 08, 2013 12:46 PM
To: Lynnes, Christopher S. (GSFC-6102); Roy Mendelssohn - NOAA Federal; 
netcdfgroup
Subject: Re: [netcdfgroup] Segmentation fault on NcFile open

Thank you Roy and Christopher.

I am now able to successfully open a local file *.nc, which I generated using 
the FTP subsetter, with the netcdf 4.2.1 C++ libraries via:

NcFile 
dataFile("MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.SUB.nc<http://MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.SUB.nc>",NcFile::ReadOnly);

I can not, however, open a file through OPeNDAP with .nc appended to the .hdf 
file name, via:

NcFile 
dataFile("http://goldsmr3.sci.gsfc.nasa.gov/opendap/MERRA/MAI3CPASM.5.2.0/1979/01/MERRA100.prod.assim.inst3_3d_asm_Cp.19790101.hdf.nc",NcFile::ReadOnly);

since the method

dataFile.is_valid()

returns false. I have not yet attempted to open this file locally (meaning, not 
accessing it through OPeNDAP) since, as you say Chris, it's very large and my 
connection is quite limited.

Roy, I was confused by your comment:
>"If you had gotten it from opendap, then it wouldn't be an hdf file.  
>Moreover, there is the option to access the OpeNDAP server directly from the 
>NetCDF library,  which is what people have been trying to tell you."

Yet looking at an OPeNDAP directory 
(http://goldsmr2.sci.gsfc.nasa.gov/opendap/MERRA/MAT1NXSLV.5.2.0/1979/01/contents.html),
 each file appears to be an HDF file.

At first, I had been attempting to open a sample file, using:

NcFile 
DataFile("http://goldsmr3.sci.gsfc.nasa.gov/opendap/MERRA/MAI3CPASM.5.2.0/2012/01/MERRA300.prod.assim.inst3_3d_asm_Cp.20120101.hdf";,
 NcFile::ReadOnly);

...but now I understand (among many other things) that I should not be able to 
open such a file, since it is really an HDF-EOS, which are not natively 
compatible with NetCDF.

Thank you for all of your help (very appreciated!). I will experiment on my own 
for a bit and post future questions under a more relevant thread title, since I 
consider my segmentation fault issue solved.

--
Taylor Binnington



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: