public class NCdump extends Object
Constructor and Description |
---|
NCdump()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static String |
encodeString(String s)
Deprecated.
Replace special characters '\t', '\n', '\f', '\r'.
|
static void |
main(String[] args)
Deprecated.
Main program.
|
static String |
makeSectionString(VariableIF v,
List<Range> ranges)
Deprecated.
Make section specification String from a range list for a Variable.
|
static boolean |
print(NetcdfFile nc,
OutputStream out,
boolean showAll,
boolean showCoords,
boolean ncml,
boolean strict,
String varNames,
CancelTask ct)
Deprecated.
ncdump-like print of netcdf file.
|
static boolean |
print(NetcdfFile nc,
String command,
OutputStream out,
CancelTask ct)
Deprecated.
ncdump, parsing command string, file already open.
|
static boolean |
print(String command,
OutputStream out)
Deprecated.
NCdump that parses a command string, using default options.
|
static boolean |
print(String fileName,
OutputStream out,
boolean showAll,
boolean showCoords,
boolean ncml,
boolean strict,
String varNames,
CancelTask ct)
Deprecated.
ncdump-like print of netcdf file.
|
static boolean |
print(String command,
OutputStream out,
CancelTask ct)
Deprecated.
ncdump that parses a command string.
|
static void |
printArray(Array array,
String name,
PrintStream out,
CancelTask ct)
Deprecated.
Print the data array.
|
static boolean |
printHeader(String fileName,
OutputStream out)
Deprecated.
Print netcdf "header only" in CDL.
|
static boolean |
printNcML(String fileName,
OutputStream out)
Deprecated.
print NcML representation of this netcdf file, showing coordinate variable data.
|
static void |
printStructureData(PrintStream out,
StructureData sdata)
Deprecated.
Print contents of a StructureData.
|
static String |
printVariableData(VariableIF v,
CancelTask ct)
Deprecated.
Print all the data of the given Variable.
|
static String |
printVariableDataSection(VariableIF v,
String sectionSpec,
CancelTask ct)
Deprecated.
Print a section of the data of the given Variable.
|
static void |
writeNcML(NetcdfFile ncfile,
OutputStream os,
boolean showCoords,
String uri)
Deprecated.
Write the NcML representation for a file.
|
public static boolean printHeader(String fileName, OutputStream out) throws IOException
fileName
- open this fileout
- print to this streamIOException
- on write errorpublic static boolean printNcML(String fileName, OutputStream out) throws IOException
fileName
- open this fileout
- print to this streamIOException
- on write errorpublic static boolean print(String command, OutputStream out) throws IOException
NCdump filename [-ncml] [-c | -vall] [-v varName;...]
command
- command stringout
- send output hereIOException
- on write errorpublic static boolean print(String command, OutputStream out, CancelTask ct) throws IOException
NCdump filename [-ncml] [-c | -vall] [-v varName;...]
command
- command stringout
- send output herect
- allow task to be cancelled; may be null.IOException
- on write errorpublic static boolean print(NetcdfFile nc, String command, OutputStream out, CancelTask ct) throws IOException
nc
- apply command to this filecommand
- : command stringout
- send output herect
- allow task to be cancelled; may be null.IOException
- on write errorpublic static boolean print(String fileName, OutputStream out, boolean showAll, boolean showCoords, boolean ncml, boolean strict, String varNames, CancelTask ct) throws IOException
fileName
- NetcdfFile to openout
- print to this streamshowAll
- dump all variable datashowCoords
- only print header and coordinate variablesncml
- print NcML representation (other arguments are ignored)strict
- print strict CDL representationvarNames
- semicolon delimited list of variables whose data should be printedct
- allow task to be cancelled; may be null.IOException
- on write errorpublic static boolean print(NetcdfFile nc, OutputStream out, boolean showAll, boolean showCoords, boolean ncml, boolean strict, String varNames, CancelTask ct) throws IOException
nc
- already opened NetcdfFileout
- print to this streamshowAll
- dump all variable datashowCoords
- only print header and coordinate variablesncml
- print NcML representation (other arguments are ignored)strict
- print strict CDL representationvarNames
- semicolon delimited list of variables whose data should be printed. May have
Fortran90 like selector: eg varName(1:2,*,2)ct
- allow task to be cancelled; may be null.IOException
- on write errorpublic static String makeSectionString(VariableIF v, List<Range> ranges) throws InvalidRangeException
v
- for this Variable.ranges
- list of Range. Must includes all parent structures. The list be null, meaning use all.
Individual ranges may be null, meaning all for that dimension.InvalidRangeException
- is specified section doesnt match variable shapepublic static String printVariableData(VariableIF v, CancelTask ct) throws IOException
v
- variable to printct
- allow task to be cancelled; may be null.IOException
- on write errorpublic static String printVariableDataSection(VariableIF v, String sectionSpec, CancelTask ct) throws IOException, InvalidRangeException
v
- variable to printsectionSpec
- string specificationct
- allow task to be cancelled; may be null.IOException
- on write errorInvalidRangeException
- is specified section doesnt match variable shapepublic static void printArray(Array array, String name, PrintStream out, CancelTask ct)
array
- data to print.name
- title the output.out
- send output here.ct
- allow task to be cancelled; may be null.public static void printStructureData(PrintStream out, StructureData sdata)
out
- send output here.sdata
- StructureData to print.public static void writeNcML(NetcdfFile ncfile, OutputStream os, boolean showCoords, String uri) throws IOException
ncfile
- write NcML for this fileos
- write to this Output Stream.showCoords
- show coordinate variable values.uri
- use this for the url attribute; if null use getLocation(). // ??IOException
- on write errorpublic static String encodeString(String s)
s
- string to quotepublic static void main(String[] args)
ucar.nc2.NCdump filename [-cdl | -ncml] [-c | -vall] [-v varName1;varName2;..] [-v varName(0:1,:,12)]
where:
args
- argumentsCopyright © 1999–2014 UCAR/Unidata. All rights reserved.