public abstract class GempakStationFileIOSP extends AbstractIOServiceProvider
| Modifier and Type | Field and Description |
|---|---|
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 static Number |
RMISS
Float missing attribute
|
protected static String |
TIME_VAR
name for the time variable
|
raf| Constructor and Description |
|---|
GempakStationFileIOSP() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addGlobalAttributes()
Add on global attributes for all types
|
protected void |
buildNCFile()
Build the netCDF file
|
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<Dimension> 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
|
close, getFileTypeVersion, getLastModified, getStructureIterator, readSection, readToByteChannel, readToOutputStream, sendIospMessage, streamToByteChannel, syncExtend, toStringDebugclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFileTypeDescription, getFileTypeId, readDataprotected NetcdfFile ncfile
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
public boolean isValidFile(RandomAccessFile raf) throws IOException
raf - RandomAccessFile to checkIOException - 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 cancellingIOException - problem reading filepublic String getDetailInfo()
getDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProviderpublic boolean sync()
throws IOException
IOException - problem synching the fileprotected void buildNCFile()
throws IOException
IOException - problem reading the fileprotected abstract void fillNCFile()
throws IOException
IOException - problem reading the fileprotected Structure makeStructure(String partName, List<Dimension> dimensions, boolean includeMissing)
partName - partnamedimensions - dimensions for the structureincludeMissing - true to include the missing variableprotected Variable makeMissingVariable()
protected Variable makeParamVariable(GempakParameter param, List<Dimension> dims)
param - GempakParameterdims - Variable dimensionsprotected 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 dimensionprotected Variable makeStationVariable(String varname, Dimension firstDim)
varname - variable namefirstDim - station dimensionprotected void printStack(String msg, int maxLines)
msg - message to printmaxLines - number of lines in the stack to printprotected String getStackTrace()
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.