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 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
|
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.
|
close, getFileTypeVersion, getLastModified, getStructureIterator, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, streamToByteChannel, syncExtend, toStringDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFileTypeDescription, getFileTypeId, readData
protected 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 IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- file to read fromncfile
- netCDF file we are writing to (memory)cancelTask
- task for cancellingjava.io.IOException
- problem reading filepublic java.lang.String getDetailInfo()
getDetailInfo
in interface IOServiceProvider
getDetailInfo
in class AbstractIOServiceProvider
protected 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