ucar.nc2.dt.grid
Class NetcdfCFWriter

java.lang.Object
  extended by ucar.nc2.dt.grid.NetcdfCFWriter

public class NetcdfCFWriter
extends java.lang.Object

Write a CF compliant Netcdf-3 file from any gridded dataset. The datasets can optionally be subsetted by a lat/lon bounding box and/or a time range.

Author:
caron

Constructor Summary
NetcdfCFWriter()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void makeFile(java.lang.String location, GridDataset gds, java.util.List<java.lang.String> gridList, LatLonRect llbb, DateRange range, boolean addLatLon, int horizStride, int stride_z, int stride_time)
          Write a CF compliant Netcdf-3 file from any gridded dataset.
 void makeFile(java.lang.String location, GridDataset gds, java.util.List<java.lang.String> gridList, LatLonRect llbb, int horizStride, Range zRange, DateRange range, int stride_time, boolean addLatLon)
           
static void test1()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetcdfCFWriter

public NetcdfCFWriter()
Method Detail

makeFile

public void makeFile(java.lang.String location,
                     GridDataset gds,
                     java.util.List<java.lang.String> gridList,
                     LatLonRect llbb,
                     DateRange range,
                     boolean addLatLon,
                     int horizStride,
                     int stride_z,
                     int stride_time)
              throws java.io.IOException,
                     InvalidRangeException
Write a CF compliant Netcdf-3 file from any gridded dataset.

Parameters:
location - write to this location on disk
gds - A gridded dataset
gridList - the list of grid names to be written, must not be empty. Full name (not short).
llbb - optional lat/lon bounding box
range - optional time range
addLatLon - should 2D lat/lon variables be added, if its a projection coordainte system?
horizStride - x,y stride
stride_z - not implemented yet
stride_time - not implemented yet
Throws:
java.io.IOException - if write or read error
InvalidRangeException - if subset is illegal

makeFile

public void makeFile(java.lang.String location,
                     GridDataset gds,
                     java.util.List<java.lang.String> gridList,
                     LatLonRect llbb,
                     int horizStride,
                     Range zRange,
                     DateRange range,
                     int stride_time,
                     boolean addLatLon)
              throws java.io.IOException,
                     InvalidRangeException
Throws:
java.io.IOException
InvalidRangeException

test1

public static void test1()
                  throws java.io.IOException,
                         InvalidRangeException,
                         java.text.ParseException
Throws:
java.io.IOException
InvalidRangeException
java.text.ParseException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        InvalidRangeException,
                        java.text.ParseException
Throws:
java.io.IOException
InvalidRangeException
java.text.ParseException