Package edu.wisc.ssec.mcidasv.data
Class TropomiIOSP
java.lang.Object
ucar.nc2.iosp.AbstractIOServiceProvider
edu.wisc.ssec.mcidasv.data.TropomiIOSP
- All Implemented Interfaces:
ucar.nc2.iosp.IOServiceProvider
- Author:
- tommyj
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Pattern
SometimesisValidFile(RandomAccessFile)
will need to check Windows paths that look something like/Z:/Users/bob/foo.txt
.private static final String
private static int[]
private static String
private ucar.nc2.NetcdfFile
private static final String
private static final org.slf4j.Logger
private static final String
private static final String
private static final String
static final Pattern
Compiled representation ofTROPOMI_L2_REGEX
.Fields inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
location, ncfile, raf, rafOrder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addVar
(ucar.nc2.NetcdfFile nc, ucar.nc2.Group g, ucar.nc2.Variable vIn) void
close()
private static int[]
getDataShape
(ucar.nc2.NetcdfFile hdf) getDataVars
(ucar.nc2.NetcdfFile hdf, int[] dataShape) boolean
isValidFile
(ucar.unidata.io.RandomAccessFile raf) static void
void
open
(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) private static void
populateDataTree
(ucar.nc2.NetcdfFile ncOut, Map<String, List<ucar.nc2.Variable>> groupsToVars) ucar.ma2.Array
readData
(ucar.nc2.Variable variable, ucar.ma2.Section section) Fulfill data requestsprivate static boolean
validProduct
(ucar.nc2.Variable variable) Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
build, buildFinish, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
Field Details
-
LAT
- See Also:
-
LON
- See Also:
-
logger
-
BASE_GROUP
- See Also:
-
TROPOMI_FIELD_SEPARATOR
- See Also:
-
TROPOMI_L2_REGEX
- See Also:
-
TROPOMI_MATCHER
Compiled representation ofTROPOMI_L2_REGEX
. -
BAD_WIN_PATH
SometimesisValidFile(RandomAccessFile)
will need to check Windows paths that look something like/Z:/Users/bob/foo.txt
.This regular expression is used by
isValidFile(...)
to identity these sorts of paths and fix them. Otherwise we'll generate anInvalidPathException
. -
groupMap
-
dimLen
-
hdfFile
-
filename
-
-
Constructor Details
-
TropomiIOSP
public TropomiIOSP()
-
-
Method Details
-
isValidFile
-
open
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOException - Specified by:
open
in interfaceucar.nc2.iosp.IOServiceProvider
- Overrides:
open
in classucar.nc2.iosp.AbstractIOServiceProvider
- Throws:
IOException
-
getDataVars
private static Map<String,List<ucar.nc2.Variable>> getDataVars(ucar.nc2.NetcdfFile hdf, int[] dataShape) -
populateDataTree
private static void populateDataTree(ucar.nc2.NetcdfFile ncOut, Map<String, List<ucar.nc2.Variable>> groupsToVars) -
readData
public ucar.ma2.Array readData(ucar.nc2.Variable variable, ucar.ma2.Section section) throws IOException, ucar.ma2.InvalidRangeException Fulfill data requests- Returns:
- Array - an array with the requested data subset
- Throws:
IOException
ucar.ma2.InvalidRangeException
-
validProduct
-
getDataShape
-
addVar
-
getFileTypeId
-
getFileTypeDescription
-
close
- Specified by:
close
in interfaceucar.nc2.iosp.IOServiceProvider
- Overrides:
close
in classucar.nc2.iosp.AbstractIOServiceProvider
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException
-