org.wdssii.ncingest
Class NetcdfIngest
java.lang.Object
org.wdssii.core.WDSSIIProgram
org.wdssii.core.Ingestor
org.wdssii.ncingest.NetcdfIngest
public class NetcdfIngest
- extends Ingestor
A general-purpose ingestor for netcdf files. Reads netcdf files and writes
out WDSS-II format files and notification records.
- Author:
- lakshman
Method Summary |
protected void |
doIngest(File path)
Read the file, do the conversion, write the output and notify the index. |
String |
getCornerLatGlobalAttribute()
|
String |
getCornerLonGlobalAttribute()
|
double |
getDefaultCornerLat()
|
double |
getDefaultCornerLon()
|
double |
getDefaultHeight()
|
double |
getDefaultLatSpacing()
|
double |
getDefaultLonSpacing()
|
String |
getDefaultSubType()
|
String |
getDefaultTypeName()
|
String |
getDefaultUnit()
|
String |
getDefaultVariableName()
|
String |
getHeightGlobalAttribute()
|
String |
getJulianDateVariable()
|
String |
getLatSpacingGlobalAttribute()
|
String |
getLonSpacingGlobalAttribute()
|
String |
getSubTypeGlobalAttribute()
|
String |
getTimeGlobalAttribute()
|
String |
getTimeOfDayVariable()
|
String |
getTypeNameGlobalAttribute()
|
private long |
getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName)
|
private double |
getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName,
double value)
|
private String |
getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName,
String value)
|
String |
getVariableGlobalAttribute()
|
boolean |
isCornerIsNorthwest()
|
static void |
main(String[] args)
|
private float[][] |
readData2D(ucar.nc2.NetcdfFile ncfile)
|
void |
setCornerIsNorthwest(boolean cornerIsNorthwest)
|
void |
setCornerLatGlobalAttribute(String cornerLatGlobalAttribute)
|
void |
setCornerLonGlobalAttribute(String cornerLonGlobalAttribute)
|
void |
setDefaultCornerLat(double defaultCornerLat)
|
void |
setDefaultCornerLon(double defaultCornerLon)
|
void |
setDefaultHeight(double defaultHeight)
|
void |
setDefaultLatSpacing(double defaultLatSpacing)
|
void |
setDefaultLonSpacing(double defaultLonSpacing)
|
void |
setDefaultSubType(String defaultSubType)
|
void |
setDefaultTypeName(String defaultTypeName)
|
void |
setDefaultUnit(String defaultUnit)
|
void |
setDefaultVariableName(String defaultVariableName)
|
void |
setHeightGlobalAttribute(String heightGlobalAttribute)
|
void |
setJulianDateVariable(String julianDateVariable)
|
void |
setLatSpacingGlobalAttribute(String latSpacingGlobalAttribute)
|
void |
setLonSpacingGlobalAttribute(String lonSpacingGlobalAttribute)
|
void |
setSubTypeGlobalAttribute(String subTypeGlobalAttribute)
|
void |
setTimeGlobalAttribute(String timeGlobalAttribute)
|
void |
setTimeOfDayVariable(String timeOfDayVariable)
|
void |
setTypeNameGlobalAttribute(String typeNameGlobalAttribute)
|
void |
setVariableGlobalAttribute(String variableGlobalAttribute)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
typeNameGlobalAttribute
private String typeNameGlobalAttribute
defaultTypeName
private String defaultTypeName
cornerLatGlobalAttribute
private String cornerLatGlobalAttribute
defaultCornerLat
private double defaultCornerLat
cornerLonGlobalAttribute
private String cornerLonGlobalAttribute
defaultCornerLon
private double defaultCornerLon
heightGlobalAttribute
private String heightGlobalAttribute
defaultHeight
private double defaultHeight
timeGlobalAttribute
private String timeGlobalAttribute
julianDateVariable
private String julianDateVariable
timeOfDayVariable
private String timeOfDayVariable
variableGlobalAttribute
private String variableGlobalAttribute
defaultVariableName
private String defaultVariableName
latSpacingGlobalAttribute
private String latSpacingGlobalAttribute
defaultLatSpacing
private double defaultLatSpacing
lonSpacingGlobalAttribute
private String lonSpacingGlobalAttribute
defaultLonSpacing
private double defaultLonSpacing
cornerIsNorthwest
private boolean cornerIsNorthwest
subTypeGlobalAttribute
private String subTypeGlobalAttribute
defaultSubType
private String defaultSubType
defaultUnit
private String defaultUnit
NetcdfIngest
public NetcdfIngest()
getTypeNameGlobalAttribute
public String getTypeNameGlobalAttribute()
setTypeNameGlobalAttribute
public void setTypeNameGlobalAttribute(String typeNameGlobalAttribute)
getDefaultTypeName
public String getDefaultTypeName()
setDefaultTypeName
public void setDefaultTypeName(String defaultTypeName)
getCornerLatGlobalAttribute
public String getCornerLatGlobalAttribute()
setCornerLatGlobalAttribute
public void setCornerLatGlobalAttribute(String cornerLatGlobalAttribute)
getDefaultCornerLat
public double getDefaultCornerLat()
setDefaultCornerLat
public void setDefaultCornerLat(double defaultCornerLat)
getCornerLonGlobalAttribute
public String getCornerLonGlobalAttribute()
setCornerLonGlobalAttribute
public void setCornerLonGlobalAttribute(String cornerLonGlobalAttribute)
getDefaultCornerLon
public double getDefaultCornerLon()
setDefaultCornerLon
public void setDefaultCornerLon(double defaultCornerLon)
getHeightGlobalAttribute
public String getHeightGlobalAttribute()
setHeightGlobalAttribute
public void setHeightGlobalAttribute(String heightGlobalAttribute)
getDefaultHeight
public double getDefaultHeight()
setDefaultHeight
public void setDefaultHeight(double defaultHeight)
getTimeGlobalAttribute
public String getTimeGlobalAttribute()
setTimeGlobalAttribute
public void setTimeGlobalAttribute(String timeGlobalAttribute)
getVariableGlobalAttribute
public String getVariableGlobalAttribute()
setVariableGlobalAttribute
public void setVariableGlobalAttribute(String variableGlobalAttribute)
getDefaultVariableName
public String getDefaultVariableName()
setDefaultVariableName
public void setDefaultVariableName(String defaultVariableName)
getLatSpacingGlobalAttribute
public String getLatSpacingGlobalAttribute()
setLatSpacingGlobalAttribute
public void setLatSpacingGlobalAttribute(String latSpacingGlobalAttribute)
getDefaultLatSpacing
public double getDefaultLatSpacing()
setDefaultLatSpacing
public void setDefaultLatSpacing(double defaultLatSpacing)
getLonSpacingGlobalAttribute
public String getLonSpacingGlobalAttribute()
setLonSpacingGlobalAttribute
public void setLonSpacingGlobalAttribute(String lonSpacingGlobalAttribute)
getDefaultLonSpacing
public double getDefaultLonSpacing()
setDefaultLonSpacing
public void setDefaultLonSpacing(double defaultLonSpacing)
isCornerIsNorthwest
public boolean isCornerIsNorthwest()
setCornerIsNorthwest
public void setCornerIsNorthwest(boolean cornerIsNorthwest)
getSubTypeGlobalAttribute
public String getSubTypeGlobalAttribute()
setSubTypeGlobalAttribute
public void setSubTypeGlobalAttribute(String subTypeGlobalAttribute)
getDefaultSubType
public String getDefaultSubType()
setDefaultSubType
public void setDefaultSubType(String defaultSubType)
getJulianDateVariable
public String getJulianDateVariable()
setJulianDateVariable
public void setJulianDateVariable(String julianDateVariable)
getTimeOfDayVariable
public String getTimeOfDayVariable()
setTimeOfDayVariable
public void setTimeOfDayVariable(String timeOfDayVariable)
getDefaultUnit
public String getDefaultUnit()
setDefaultUnit
public void setDefaultUnit(String defaultUnit)
getValue
private String getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName,
String value)
getValue
private long getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName)
getValue
private double getValue(ucar.nc2.NetcdfFile ncfile,
String what,
String attrName,
double value)
readData2D
private float[][] readData2D(ucar.nc2.NetcdfFile ncfile)
throws IOException
- Throws:
IOException
doIngest
protected void doIngest(File path)
- Description copied from class:
Ingestor
- Read the file, do the conversion, write the output and notify the index.
- Specified by:
doIngest
in class Ingestor
main
public static void main(String[] args)