[NARCCAP-discuss] NARCCAP NetCDFs and gdal_translate redux

Hailey Eckstrand haileye at uvic.ca
Mon May 7 09:41:06 MDT 2012


Hello Audrey, 
I think you are getting that error because you need to specify which variable in the netcdf you want to process.. for your example add a :tasmax to the end like this:
gdal_translate -of HFA -b 1 -a_ullr -25000 5425000 6675000 -25000 -a_srs
'+proj=lcc +lat_2=60 +lat_0=47.5 +lat0=-97 +x_0=3325000 +y_0=2700000
+no_defs +a=6378137 +rf=298.257223563 +towgs84=0,0,0,0,0,0,0 +to_meter=1'
NETCDF:"tasmax_WRFG_cgcm3_1968010106.nc":tasmax tasmax_WRFG_cgcm3_1968010106.img

Cheers,
Hailey

-----Original Message-----
From: narccap-discuss-bounces at mailman.ucar.edu [mailto:narccap-discuss-bounces at mailman.ucar.edu] On Behalf Of Audrey Rager
Sent: Friday, May 04, 2012 1:40 PM
To: narccap-discuss at mailman.ucar.edu
Subject: [NARCCAP-discuss] NARCCAP NetCDFs and gdal_translate redux

Hello everyone,

For some reason, my question didn't post. So, I'm trying it again.

I'm new to using the NARCCAP data.  I'm following along with "Downloading
and processing NARCCAP climate data" by P. Delamater and A. Finley to try
to import some data into an *.img format.  I'm working with WRFC, CGCM3
current, table 1 data.

When I try to follow the gdal_translate example on page 5 with the
following command (I had to change some of the command because these data
are in Lamber Conformal Conic):

gdal_translate -of HFA -b 1 -a_ullr -25000 5425000 6675000 -25000 -a_srs
'+proj=lcc +lat_2=60 +lat_0=47.5 +lat0=-97 +x_0=3325000 +y_0=2700000
+no_defs +a=6378137 +rf=298.257223563 +towgs84=0,0,0,0,0,0,0 +to_meter=1'
NETCDF:"tasmax_WRFG_cgcm3_1968010106.nc" tasmax_WRFG_cgcm3_1968010106.img

I get this error message:

ERROR 1: Failed to parse NETCDF: prefix string into expected three fields.
GDALOpen failed - 1
Failed to parse NETCDF: prefix string into expected three fields.


I've tried searching google to get some clues as to what I'm doing wrong,
but I can't find anything.  Any suggestions?

Thanks,
 Audrey
_______________________________________________
narccap-discuss mailing list
narccap-discuss at mailman.ucar.edu
http://mailman.ucar.edu/mailman/listinfo/narccap-discuss


More information about the narccap-discuss mailing list