public abstract class GempakStationFileIOSP
extends ucar.nc2.iosp.AbstractIOServiceProvider
| Modifier and Type | Field and Description |
|---|---|
protected static ucar.nc2.Dimension |
DIM_LEN2
static for shared dimension of length 2
|
protected static ucar.nc2.Dimension |
DIM_LEN4
static for shared dimension of length 4
|
protected static ucar.nc2.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
|
| 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(ucar.unidata.io.RandomAccessFile raf)
Is this a valid file?
|
protected ucar.nc2.Variable |
makeMissingVariable()
Make the missing variable
|
protected ucar.nc2.Variable |
makeParamVariable(GempakParameter param,
java.util.List<ucar.nc2.Dimension> dims)
Make a variable from a GempakParmaeter
|
protected abstract AbstractGempakStationFileReader |
makeStationReader()
Make the appropriate station file reader, subclasses need to implement
this
|
protected ucar.nc2.Variable |
makeStationVariable(java.lang.String varname,
ucar.nc2.Dimension firstDim)
Make a station variable
|
protected java.util.List<ucar.nc2.Variable> |
makeStationVars(java.util.List<GempakStation> stations,
ucar.nc2.Dimension dim)
Make the station variables from a representative station
|
protected ucar.nc2.Structure |
makeStructure(java.lang.String partName,
java.util.List<ucar.nc2.Dimension> dimensions,
boolean includeMissing)
Make a structure for the part
|
void |
open(ucar.unidata.io.RandomAccessFile raf,
ucar.nc2.NetcdfFile ncfile,
ucar.nc2.util.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, toStringDebugprotected AbstractGempakStationFileReader gemreader
protected java.lang.StringBuilder parseInfo
protected static final java.lang.Number RMISS
protected static final java.lang.Number IMISS
protected static final ucar.nc2.Dimension DIM_LEN8
protected static final ucar.nc2.Dimension DIM_LEN4
protected static final ucar.nc2.Dimension DIM_LEN2
protected static final java.lang.String TIME_VAR
protected static final java.lang.String MISSING_VAR
public boolean isValidFile(ucar.unidata.io.RandomAccessFile raf)
throws java.io.IOException
raf - RandomAccessFile to checkjava.io.IOException - problem reading fileprotected abstract AbstractGempakStationFileReader makeStationReader()
public void open(ucar.unidata.io.RandomAccessFile raf,
ucar.nc2.NetcdfFile ncfile,
ucar.nc2.util.CancelTask cancelTask)
throws java.io.IOException
open in interface ucar.nc2.iosp.IOServiceProvideropen in class ucar.nc2.iosp.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 ucar.nc2.iosp.IOServiceProviderclose in class ucar.nc2.iosp.AbstractIOServiceProviderjava.io.IOException - problem reading filepublic void release()
throws java.io.IOException
release in interface ucar.nc2.iosp.IOServiceProviderrelease in class ucar.nc2.iosp.AbstractIOServiceProviderjava.io.IOException - problem reading filepublic void reacquire()
throws java.io.IOException
reacquire in interface ucar.nc2.iosp.IOServiceProviderreacquire in class ucar.nc2.iosp.AbstractIOServiceProviderjava.io.IOException - problem reading filepublic java.lang.String getDetailInfo()
getDetailInfo in interface ucar.nc2.iosp.IOServiceProvidergetDetailInfo in class ucar.nc2.iosp.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 ucar.nc2.Structure makeStructure(java.lang.String partName,
java.util.List<ucar.nc2.Dimension> dimensions,
boolean includeMissing)
partName - partnamedimensions - dimensions for the structureincludeMissing - true to include the missing variableprotected ucar.nc2.Variable makeMissingVariable()
protected ucar.nc2.Variable makeParamVariable(GempakParameter param, java.util.List<ucar.nc2.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<ucar.nc2.Variable> makeStationVars(java.util.List<GempakStation> stations, ucar.nc2.Dimension dim)
stations - list of stationsdim - station dimensionprotected ucar.nc2.Variable makeStationVariable(java.lang.String varname,
ucar.nc2.Dimension firstDim)
varname - variable namefirstDim - station dimension