|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.nc2.iosp.AbstractIOServiceProvider
ucar.nc2.iosp.gempak.GempakStationFileIOSP
public abstract class GempakStationFileIOSP
An IOSP for Gempak Station (SF,SN) data.
| Field Summary | |
|---|---|
protected static Dimension |
DIM_LEN2
static for shared dimension of length 2 |
protected static Dimension |
DIM_LEN4
static for shared dimension of length 4 |
protected static Dimension |
DIM_LEN8
static for shared dimension of length 4 |
protected AbstractGempakStationFileReader |
gemreader
Gempak file reader |
protected static Number |
IMISS
Integer missing attribute |
protected static String |
MISSING_VAR
name for the time variable |
protected NetcdfFile |
ncfile
The netCDF file |
protected StringBuilder |
parseInfo
place to store debug stuff |
protected RandomAccessFile |
raf
the file we are reading |
protected static Number |
RMISS
Float missing attribute |
protected static String |
TIME_VAR
name for the time variable |
| Constructor Summary | |
|---|---|
GempakStationFileIOSP()
|
|
| Method Summary | |
|---|---|
protected void |
addGlobalAttributes()
Add on global attributes for all types |
protected void |
buildNCFile()
Build the netCDF file |
void |
close()
Close this IOSP |
protected abstract void |
fillNCFile()
Fill the contents of the netCDF file. |
String |
getCFFeatureType()
Get the CF feature type, subclasses should override |
String |
getConventions()
Get the netCDF conventions identifier. |
String |
getDetailInfo()
Get the detail information |
protected String |
getStackTrace()
Return the stack trace of this calling thread |
protected int |
getStnVarSize(String name)
Get the size of a particular station variable |
boolean |
isValidFile(RandomAccessFile raf)
Is this a valid file? |
protected Variable |
makeMissingVariable()
Make the missing variable |
protected Variable |
makeParamVariable(GempakParameter param,
List<Dimension> dims)
Make a variable from a GempakParmaeter |
protected abstract AbstractGempakStationFileReader |
makeStationReader()
Make the appropriate station file reader, subclasses need to implement this |
protected Variable |
makeStationVariable(String varname,
Dimension firstDim)
Make a station variable |
protected List<Variable> |
makeStationVars(List<GempakStation> stations,
Dimension dim)
Make the station variables from a representative station |
protected Structure |
makeStructure(String partName,
List dimensions,
boolean includeMissing)
Make a structure for the part |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open the service provider for reading. |
protected void |
printStack(String msg,
int maxLines)
Print the stack trace for a given line of code. |
boolean |
sync()
Sync the file |
boolean |
syncExtend()
Sync and extend |
| Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider |
|---|
createValidNetcdfObjectName, getFileTypeVersion, getStructureIterator, readSection, readToByteChannel, sendIospMessage, toStringDebug |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ucar.nc2.iosp.IOServiceProvider |
|---|
getFileTypeDescription, getFileTypeId, readData |
| Field Detail |
|---|
protected NetcdfFile ncfile
protected RandomAccessFile raf
protected AbstractGempakStationFileReader gemreader
protected StringBuilder parseInfo
protected static final Number RMISS
protected static final Number IMISS
protected static final Dimension DIM_LEN8
protected static final Dimension DIM_LEN4
protected static final Dimension DIM_LEN2
protected static final String TIME_VAR
protected static final String MISSING_VAR
| Constructor Detail |
|---|
public GempakStationFileIOSP()
| Method Detail |
|---|
public boolean isValidFile(RandomAccessFile raf)
throws IOException
raf - RandomAccessFile to check
IOException - problem reading fileprotected abstract AbstractGempakStationFileReader makeStationReader()
public void open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
throws IOException
open in interface IOServiceProvideropen in class AbstractIOServiceProviderraf - file to read fromncfile - netCDF file we are writing to (memory)cancelTask - task for cancelling
IOException - problem reading file
public void close()
throws IOException
close in interface IOServiceProviderclose in class AbstractIOServiceProviderIOException - problem closing filepublic boolean syncExtend()
syncExtend in interface IOServiceProvidersyncExtend in class AbstractIOServiceProviderpublic String getDetailInfo()
getDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProvider
public boolean sync()
throws IOException
sync in interface IOServiceProvidersync in class AbstractIOServiceProviderIOException - problem synching the file
protected void buildNCFile()
throws IOException
IOException - problem reading the file
protected abstract void fillNCFile()
throws IOException
IOException - problem reading the file
protected Structure makeStructure(String partName,
List dimensions,
boolean includeMissing)
partName - partnamedimensions - dimensions for the structureincludeMissing - true to include the missing variable
protected Variable makeMissingVariable()
protected Variable makeParamVariable(GempakParameter param,
List<Dimension> dims)
param - GempakParameterdims - Variable dimensions
protected void addGlobalAttributes()
public String getConventions()
public String getCFFeatureType()
protected int getStnVarSize(String name)
name - name of the variable (key)
protected List<Variable> makeStationVars(List<GempakStation> stations,
Dimension dim)
stations - list of stationsdim - station dimension
protected Variable makeStationVariable(String varname,
Dimension firstDim)
varname - variable namefirstDim - station dimension
protected void printStack(String msg,
int maxLines)
msg - message to printmaxLines - number of lines in the stack to printprotected String getStackTrace()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||