|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.csiro.netcdf.wron.MdbsyNetCDF2CSVConverter
public class MdbsyNetCDF2CSVConverter
The class is a converter control class to convert Murray Darling Basin Sustainable Yields netCDF files into CSV files. Copyright 2010, CSIRO Australia
Field Summary | |
---|---|
static String |
FILENAME_PATTERN
The pattern for accepted file names where multiple files are accepted. |
static String |
INPUT_DIR
The name of the command line option used for specifying the input directory containing the netCDF files. |
static String |
OUTPUT_DIR
The name of the command line option used for specifying the directory to create the csv files in. |
Constructor Summary | |
---|---|
MdbsyNetCDF2CSVConverter()
|
Method Summary | |
---|---|
void |
execute(String inputDir,
String outputDir)
Performs the conversion. |
static void |
main(String[] args)
Command line entry point for the MdbsyNetCDF2CSVConverter class. |
static String[][] |
readLookupFile(File file)
Parses a csv file into an row-by-column string matrix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INPUT_DIR
public static final String OUTPUT_DIR
public static final String FILENAME_PATTERN
Constructor Detail |
---|
public MdbsyNetCDF2CSVConverter()
Method Detail |
---|
public static void main(String[] args) throws org.apache.commons.cli.ParseException, IOException, InvalidRangeException
args
- The command line arguments
org.apache.commons.cli.ParseException
- If an error occurs when parsing the arguments.
IOException
- If the files cannot be read or written to.
InvalidRangeException
- if an invalid range is attempted to be read from a netCDf variablepublic void execute(String inputDir, String outputDir) throws IOException, InvalidRangeException
inputDir
- the directory containing the Scenario A or C netCDF files.outputDir
- the directory in which the csv file will be placed.
InvalidRangeException
- thrown if an invalid range is attempted to be read from a netCDf variable.
IOException
- If the files cannot be read or written to.public static String[][] readLookupFile(File file) throws IOException
file
- a csv file.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |