Package ucar.nc2.write
Class Ncdump
java.lang.Object
ucar.nc2.write.Ncdump
Utility to implement ncdump.
A difference with ncdump is that the nesting of multidimensional array data is represented by nested brackets,
so the output is not legal CDL that can be used as input for ncgen. Also, the default is header only (-h).
Moved from ucar.nc2.NCdumpW
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumTell Ncdump if you want values printed. -
Method Summary
Modifier and TypeMethodDescriptionstatic Ncdump.Builderbuilder(NetcdfFile ncfile) static voidMain program.static voidncdump(String command, Writer out, CancelTask ct) ncdump that parses a command string.static voidncdump(NetcdfFile nc, String command, Writer out, CancelTask ct) ncdump, parsing command string, file already open.print()static StringprintArray(Array ma) Print array to returned String.static StringprintArray(Array array, String name, CancelTask ct) Print named array to returned String.static StringprintArrayPlain(Array ma) Print array as undifferentiated sequence of values.static StringprintStructureData(StructureData sdata) Print StructureData to returned String.static StringprintVariableData(Variable v, CancelTask ct) Print all the data of the given Variable.
-
Method Details
-
ncdump
ncdump that parses a command string.- Parameters:
command- command stringout- send output herect- allow task to be cancelled; may be null.- Throws:
IOException- on write error
-
ncdump
public static void ncdump(NetcdfFile nc, String command, Writer out, CancelTask ct) throws IOException ncdump, parsing command string, file already open.- Parameters:
nc- apply command to this filecommand- : command stringout- send output herect- allow task to be cancelled; may be null.- Throws:
IOException
-
builder
-
print
-
printVariableData
Print all the data of the given Variable.- Parameters:
v- variable to printct- allow task to be cancelled; may be null.- Returns:
- String result
- Throws:
IOException- on write error
-
printArrayPlain
Print array as undifferentiated sequence of values.- Parameters:
ma- any Array except ArrayStructure
-
printArray
Print array to returned String. -
printArray
Print named array to returned String. -
printStructureData
Print StructureData to returned String. -
main
Main program.ucar.nc2.NCdumpW filename [-cdl | -ncml] [-c | -vall] [-v varName1;varName2;..] [-v varName(0:1,:,12)]
where:
- filename : path of any CDM readable file
- cdl or ncml: output format is CDL or NcML
- -vall : dump all variable data
- -c : dump coordinate variable data
- -v varName1;varName2; : dump specified variable(s)
- -v varName(0:1,:,12) : dump specified variable section
- Parameters:
args- arguments
-