|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.csiro.netcdf.wron.ConversionUtils
public class ConversionUtils
A set of common processing used for conversion of MDB SY datasets from CSV to netCDF format. Copyright 2010, CSIRO Australia All rights reserved.
| Field Summary | |
|---|---|
static String |
ENCODING
Encoding used to fill variables. |
| Constructor Summary | |
|---|---|
ConversionUtils()
|
|
| Method Summary | |
|---|---|
List<CellData> |
buildCsvFilenamesForLatitudes(List<String> lats,
List<CellData> triples,
String folderName,
String extension)
|
int |
calcDecadeKey(Integer dateKey,
Date baseDate)
|
Calendar |
getCalendar(Date date)
Returns a suitable GregorianCalendar instance for use in date calculations. |
TimeZone |
getGoodZone()
returns a TimeZone with correct Sydney daylight saving regime - ie correct server timezone. |
List<String> |
getLatitudeBlock(Set<String> sortedLatitudes,
int blockNum,
int blockSize)
Retrieve the block of latitudes to be processed. |
Set<String> |
getLimitedLatitudes(Set<String> allLatitudes,
String startingLatitude,
String endingLatitude)
Retrieve the latitudes within the bounds provided. |
Map<Integer,Map<String,LongitudeRange>> |
readDataByLatitudes(List<CellData> targetCells,
List<String> lats,
int numVariables,
int numTimes,
int numLongitudes,
String[] fillValues,
String startLongitudeRange)
Read in the data from the CSV files. |
void |
writeLatDataByDecade(Map<Integer,Map<String,LongitudeRange>> latData,
Map<Integer,String[]> allFilenames,
String[] variableNames,
Date baseDate)
Write out the data for each variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ENCODING
| Constructor Detail |
|---|
public ConversionUtils()
| Method Detail |
|---|
public Set<String> getLimitedLatitudes(Set<String> allLatitudes,
String startingLatitude,
String endingLatitude)
allLatitudes - The list of latitudes in numerical orderstartingLatitude - The first (numerically -38 < -24) latitude to be includedendingLatitude - The last (numerically -38 < -24) latitude to be included
public List<String> getLatitudeBlock(Set<String> sortedLatitudes,
int blockNum,
int blockSize)
sortedLatitudes - The list of latitudes in numerical orderblockNum - The block of latitudes to be retrievedblockSize - The number of latitudes in a block
public List<CellData> buildCsvFilenamesForLatitudes(List<String> lats,
List<CellData> triples,
String folderName,
String extension)
public Map<Integer,Map<String,LongitudeRange>> readDataByLatitudes(List<CellData> targetCells,
List<String> lats,
int numVariables,
int numTimes,
int numLongitudes,
String[] fillValues,
String startLongitudeRange)
targetCells - The cells to be read. Each cell should have a populated filename (including full path)lats - The latitudes being processed.numVariables - The number of variables held in each csv file (all MUST be read).numTimes - The number of times expected in each CSV file.fillValues - The data any missing entries are to be filled with.
public void writeLatDataByDecade(Map<Integer,Map<String,LongitudeRange>> latData,
Map<Integer,String[]> allFilenames,
String[] variableNames,
Date baseDate)
throws IOException
latData - The data to be outputallFilenames - The filenames for each decade and variablevariableNames - The names of the variables to be writtenbaseDate - The startdate of the data (i.e. the date a date value of 0 is)
IOException - If the data cannot be written.
public int calcDecadeKey(Integer dateKey,
Date baseDate)
public TimeZone getGoodZone()
public Calendar getCalendar(Date date)
date - The date to be set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||