|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.nc2.iosp.AbstractIOServiceProvider
ucar.nc2.iosp.noaa.Ghcnm
public class Ghcnm
Nomads GLOBAL HISTORICAL CLIMATOLOGY NETWORK MONTHLY (GHCNM) v3 Beta.
Ascii file. Write index into .ncsx using protobug (experimental)
IOSP can then recognize the ncsx file, so it can be passed into NetdfFile.open() instead of the ascii file.
Otherwise you have to explicitly specify the iosp, eg:
Protobuf generation: cd c:/dev/tds4.2/thredds/cdm/src/main/java protoc --proto_path=. --java_out=. ucar/nc2/iosp/noaa/GhcnmIndex.proto
Field Summary |
---|
Fields inherited from class ucar.nc2.iosp.AbstractIOServiceProvider |
---|
raf |
Constructor Summary | |
---|---|
Ghcnm()
|
Method Summary | |
---|---|
void |
close()
Close the file. |
String |
getFileTypeDescription()
Get a human-readable description for this file type. |
String |
getFileTypeId()
Get a unique stnId for this file type. |
StructureDataIterator |
getStructureIterator(Structure s,
int bufferSize)
Get the structure iterator |
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid file for this IOServiceProvider. |
static void |
main(String[] args)
|
static void |
main2(String[] args)
|
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it. |
Array |
readData(Variable v2,
Section section)
Returns an ArraySequence, no subsetting is allowed. |
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider |
---|
getDetailInfo, getFileTypeVersion, readSection, readToByteChannel, sendIospMessage, sync, syncExtend, toStringDebug |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Ghcnm()
Method Detail |
---|
public boolean isValidFile(RandomAccessFile raf) throws IOException
IOServiceProvider
raf
- RandomAccessFile
IOException
- if read errorpublic void close() throws IOException
IOServiceProvider
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
IOException
- if read errorpublic void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException
IOServiceProvider
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
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.
IOException
- if read errorpublic String getFileTypeId()
public String getFileTypeDescription()
public Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
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.
IOException
InvalidRangeException
Range
public StructureDataIterator getStructureIterator(Structure s, int bufferSize) throws IOException
getStructureIterator
in interface IOServiceProvider
getStructureIterator
in class AbstractIOServiceProvider
s
- the StructurebufferSize
- the buffersize
IOException
- if problem reading datapublic static void main2(String[] args) throws IOException
IOException
public static void main(String[] args) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |