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 Number |
IMISS
Integer missing attribute
|
protected static String |
MISSING_VAR
name for the time variable
|
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
|
| 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 int |
getStnVarSize(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,
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(String varname,
ucar.nc2.Dimension firstDim)
Make a station variable
|
protected List<ucar.nc2.Variable> |
makeStationVars(List<GempakStation> stations,
ucar.nc2.Dimension dim)
Make the station variables from a representative station
|
protected ucar.nc2.Structure |
makeStructure(String partName,
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.
|
build, buildFinish, close, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebugprotected AbstractGempakStationFileReader gemreader
protected StringBuilder parseInfo
protected static final Number RMISS
protected static final 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 String TIME_VAR
protected static final String MISSING_VAR
public boolean isValidFile(ucar.unidata.io.RandomAccessFile raf)
throws IOException
raf - RandomAccessFile to checkIOException - problem reading fileprotected abstract AbstractGempakStationFileReader makeStationReader()
public void open(ucar.unidata.io.RandomAccessFile raf,
ucar.nc2.NetcdfFile ncfile,
ucar.nc2.util.CancelTask cancelTask)
throws 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 cancellingIOException - problem reading filepublic String getDetailInfo()
getDetailInfo in interface ucar.nc2.iosp.IOServiceProvidergetDetailInfo in class ucar.nc2.iosp.AbstractIOServiceProviderprotected void buildNCFile()
throws IOException
IOException - problem reading the fileprotected abstract void fillNCFile()
throws IOException
IOException - problem reading the fileprotected ucar.nc2.Structure makeStructure(String partName, 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, List<ucar.nc2.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<ucar.nc2.Variable> makeStationVars(List<GempakStation> stations, ucar.nc2.Dimension dim)
stations - list of stationsdim - station dimensionprotected ucar.nc2.Variable makeStationVariable(String varname, ucar.nc2.Dimension firstDim)
varname - variable namefirstDim - station dimension