Package ucar.nc2.iosp.misc
Class Uspln
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.iosp.misc.AbstractLightningIOSP
-
- ucar.nc2.iosp.misc.Uspln
-
- All Implemented Interfaces:
Comparable<ucar.nc2.iosp.IOServiceProvider>,ucar.nc2.iosp.IOServiceProvider
public class Uspln extends AbstractLightningIOSP
IOSP for the USPLN/NAPLN original and extended formats.- See Also:
- "https://www.unidata.ucar.edu/data/lightning.html"
-
-
Field Summary
-
Fields inherited from class ucar.nc2.iosp.misc.AbstractLightningIOSP
ECCENTRICITY, ELLIPSE_ANGLE, LAT, LON, MAJOR_AXIS, MINOR_AXIS, MULTIPLICITY, RECORD, secondsSince1970, SIGNAL, TIME
-
-
Constructor Summary
Constructors Constructor Description Uspln()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLightningGlobalAttributes(ucar.nc2.NetcdfFile ncfile)Add the global attributes.StringgetFileTypeDescription()Get a human-readable description for this file type.StringgetFileTypeId()Get a unique id for this file type.StringgetFileTypeVersion()Get the version of this file type.ucar.ma2.StructureDataIteratorgetStructureIterator(ucar.nc2.Structure s, int bufferSize)Get the structure iteratorbooleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Check if this is a valid file for this IOServiceProvider.protected ucar.nc2.SequencemakeSequence(ucar.nc2.NetcdfFile ncfile)voidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)Open existing file, and populate ncfile with it.ucar.ma2.ArrayreadData(ucar.nc2.Variable v2, ucar.ma2.Section section)Read data from a top level Variable and return a memory resident Array.-
Methods inherited from class ucar.nc2.iosp.misc.AbstractLightningIOSP
makeLightningVariable
-
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
build, buildFinish, close, getDetailInfo, getLastModified, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
-
-
-
Method Detail
-
isValidFile
public boolean isValidFile(ucar.unidata.io.RandomAccessFile raf) throws IOExceptionCheck if this is a valid file for this IOServiceProvider.- Parameters:
raf- RandomAccessFile- Returns:
- true if valid.
- Throws:
IOException- if read error
-
open
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOExceptionOpen existing file, and populate ncfile with it. This method is only called by the NetcdfFile constructor on itself. The provided NetcdfFile object will be empty except for the location String and the IOServiceProvider associated with this NetcdfFile object.- Specified by:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classucar.nc2.iosp.AbstractIOServiceProvider- Parameters:
raf- the file to work on, it has already passed the isValidFile() test.ncfile- add objects to this empty NetcdfFilecancelTask- used to monitor user cancellation; may be null.- Throws:
IOException- if read error
-
makeSequence
protected ucar.nc2.Sequence makeSequence(ucar.nc2.NetcdfFile ncfile)
-
addLightningGlobalAttributes
protected void addLightningGlobalAttributes(ucar.nc2.NetcdfFile ncfile)
Add the global attributes.- Overrides:
addLightningGlobalAttributesin classAbstractLightningIOSP- Parameters:
ncfile- the file to add to
-
readData
public ucar.ma2.Array readData(ucar.nc2.Variable v2, ucar.ma2.Section section) throws IOExceptionRead data from a top level Variable and return a memory resident Array. This Array has the same element type as the Variable, and the requested shape.- Parameters:
v2- a top-level Variablesection- the section of data to read. There must be a Range for each Dimension in the variable, in order. Note: no nulls allowed. IOSP may not modify.- Returns:
- the requested data in a memory-resident Array
- Throws:
IOException- if read error- See Also:
Range
-
getStructureIterator
public ucar.ma2.StructureDataIterator getStructureIterator(ucar.nc2.Structure s, int bufferSize) throws IOExceptionGet the structure iterator- Specified by:
getStructureIteratorin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
getStructureIteratorin classucar.nc2.iosp.AbstractIOServiceProvider- Parameters:
s- the StructurebufferSize- the buffersize- Returns:
- the data iterator
- Throws:
IOException- if problem reading data
-
getFileTypeId
public String getFileTypeId()
Get a unique id for this file type.- Returns:
- registered id of the file type
- See Also:
- "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
-
getFileTypeDescription
public String getFileTypeDescription()
Get a human-readable description for this file type.- Returns:
- description of the file type
- See Also:
- "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
-
getFileTypeVersion
public String getFileTypeVersion()
Get the version of this file type.- Specified by:
getFileTypeVersionin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
getFileTypeVersionin classucar.nc2.iosp.AbstractIOServiceProvider- Returns:
- version of the file type
- See Also:
- "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
-
-