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




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