public abstract class GempakStationFileIOSP extends AbstractIOServiceProvider
IOServiceProvider.SortGroup| 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 java.lang.Number |
IMISS
Integer missing attribute
|
protected static java.lang.String |
MISSING_VAR
name for the time variable
|
protected java.lang.StringBuilder |
parseInfo
place to store debug stuff
|
protected static java.lang.Number |
RMISS
Float missing attribute
|
protected static java.lang.String |
TIME_VAR
name for the time variable
|
location, ncfile, raf, rafOrder| 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
|
void |
close()
Close any resources like file handles
|
protected abstract void |
fillNCFile()
Fill the contents of the netCDF file.
|
java.lang.String |
getCFFeatureType()
Get the CF feature type, subclasses should override
|
java.lang.String |
getConventions()
Get the netCDF conventions identifier.
|
java.lang.String |
getDetailInfo()
Get the detail information
|
protected int |
getStnVarSize(java.lang.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,
java.util.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(java.lang.String varname,
Dimension firstDim)
Make a station variable
|
protected java.util.List<Variable> |
makeStationVars(java.util.List<GempakStation> stations,
Dimension dim)
Make the station variables from a representative station
|
protected Structure |
makeStructure(java.lang.String partName,
java.util.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.
|
void |
reacquire()
Reacquire any resources like file handles
|
void |
release()
Release any resources like file handles
|
build, buildFinish, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebugclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareTo, getFileTypeDescription, getFileTypeId, getSortGroup, readDataprotected AbstractGempakStationFileReader gemreader
protected java.lang.StringBuilder parseInfo
protected static final java.lang.Number RMISS
protected static final java.lang.Number IMISS
protected static final Dimension DIM_LEN8
protected static final Dimension DIM_LEN4
protected static final Dimension DIM_LEN2
protected static final java.lang.String TIME_VAR
protected static final java.lang.String MISSING_VAR
public boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
raf - RandomAccessFile to checkjava.io.IOException - problem reading fileprotected abstract AbstractGempakStationFileReader makeStationReader()
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
open in interface IOServiceProvideropen in class AbstractIOServiceProviderraf - file to read fromncfile - netCDF file we are writing to (memory)cancelTask - task for cancellingjava.io.IOException - problem reading filepublic void close()
throws java.io.IOException
close in interface IOServiceProviderclose in class AbstractIOServiceProviderjava.io.IOException - problem reading filepublic void release()
throws java.io.IOException
release in interface IOServiceProviderrelease in class AbstractIOServiceProviderjava.io.IOException - problem reading filepublic void reacquire()
throws java.io.IOException
reacquire in interface IOServiceProviderreacquire in class AbstractIOServiceProviderjava.io.IOException - problem reading filepublic java.lang.String getDetailInfo()
getDetailInfo in interface IOServiceProvidergetDetailInfo in class AbstractIOServiceProviderprotected void buildNCFile()
throws java.io.IOException
java.io.IOException - problem reading the fileprotected abstract void fillNCFile()
throws java.io.IOException
java.io.IOException - problem reading the fileprotected Structure makeStructure(java.lang.String partName, java.util.List<Dimension> dimensions, boolean includeMissing)
partName - partnamedimensions - dimensions for the structureincludeMissing - true to include the missing variableprotected Variable makeMissingVariable()
protected Variable makeParamVariable(GempakParameter param, java.util.List<Dimension> dims)
param - GempakParameterdims - Variable dimensionsprotected void addGlobalAttributes()
public java.lang.String getConventions()
public java.lang.String getCFFeatureType()
protected int getStnVarSize(java.lang.String name)
name - name of the variable (key)protected java.util.List<Variable> makeStationVars(java.util.List<GempakStation> stations, Dimension dim)
stations - list of stationsdim - station dimension