Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] batch convert raster to netCDF

Hello,

Another option might be to use gdal (www.gdal.org) - do you want to bundle multiple rasters into one NetCDF file, or just make one for every raster file you have? For single files I think you can only create separate datasets that are each 2D - so a (sub)dataset for every band.

You can use the command line utility gdal_translate with output format option "-of NetCDF" and use a script to batch the job.

Otherwise I think you could do this with RNetCDF package in R (www.r-project.org).

Cheers, Mike.

Cédric David wrote:
June,

In my experience, I feel that your best bet would be to use a Python script
with ArcGIS.  If you're not familiar with Python, you can always start with
doing a simple model using Model Builder in ArcGIS, and use the export to
Python feature.  Python is somewhat self explanatory and you should be able
to get what's going on in your script.  Adding a "for" loop at the beginning
should help you deal with your 20,000 files...

I hope that helps,

Cedric
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/ ------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.169 / Virus Database: 270.6.21/1669 - Release Date: 9/12/2008 2:18 PM




 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690