From: <rit...@us...> - 2010-06-22 07:16:42
|
Revision: 19 http://netcdftools.svn.sourceforge.net/netcdftools/?rev=19&view=rev Author: ritacsiro Date: 2010-06-22 07:16:36 +0000 (Tue, 22 Jun 2010) Log Message: ----------- ANDSWRON-678 - Add variable parameter to defineAttributes. Modified Paths: -------------- trunk/USAGE.txt trunk/src/main/java/au/csiro/netcdf/NcDefineAttributes.java Modified: trunk/USAGE.txt =================================================================== --- trunk/USAGE.txt 2010-06-22 06:52:39 UTC (rev 18) +++ trunk/USAGE.txt 2010-06-22 07:16:36 UTC (rev 19) @@ -47,10 +47,8 @@ ------------------------------------- -ncdefineAtt -Define a global attribute in a netCDF file. -If variable is not specified, then a global attribute is defined. -If the value of the attribute is null, then the attribute will be deleted. +usage: ncdefineAtt +Define an attribute in a netCDF file. -o,--outputFileName <file> 1: the filename of the netCDF file to be created. -i,--inputFileName <file> 2. the filename of a text file containing @@ -60,11 +58,12 @@ -s,--standardInput 3: OPTIONAL, read attributes from Stdin, ensure that text containing '=' or ',' characters are delimited by a backslash. --a,--globalAttributes <text> 4: a comma separated list of attribute-value +-a,--attributes <text> 4: a comma separated list of attribute-value pairs, OPTIONAL, e.g. "netCDF Java=4.0,Conventions=CF-1.0", ensure that text containing '=' or ',' characters are delimited - by a backslash. + by a backslash. Set value to null to delete + existing attribute. -l,--largeFileSupport 5: OPTIONAL, set if more than 2 GB of data will need to be stored in this file. -p,--pattern <filename pattern> 6: OPTIONAL, a pattern to match multiple @@ -73,7 +72,7 @@ outptuFilename is expected to be a direcotry containing the files to be processed. -v,--variable <text> 7: OPTIONAL, the variable to assign attribute(s) - to. + to, set to define variable attribute. Example: ncdefineatt -outputFileName ABC.nc -attributes "netCDF-Java=4.0,Conventions=value with a space,toDelete=null" Modified: trunk/src/main/java/au/csiro/netcdf/NcDefineAttributes.java =================================================================== --- trunk/src/main/java/au/csiro/netcdf/NcDefineAttributes.java 2010-06-22 06:52:39 UTC (rev 18) +++ trunk/src/main/java/au/csiro/netcdf/NcDefineAttributes.java 2010-06-22 07:16:36 UTC (rev 19) @@ -379,10 +379,8 @@ */ public String toString() { - // generate the help/usage statement //TODO: - String header = "Define an attribute in a netCDF file. " - + "\nIf variable is not specified, then a global attribute is defined." - + "\nIf the value of the attribute is null, then the attribute will be deleted."; + // generate the help/usage statement + String header = "Define an attribute in a netCDF file."; String footer = "\nExample: ncdefineatt -outputFileName ABC.nc " + "-attributes \"netCDF-Java=4.0,Conventions=value with a space,toDelete=null\"\n" + "Will add the two and delete one listed global attributes to the file ABC.nc. " @@ -424,7 +422,9 @@ .withArgName("text") .hasArg() .withDescription( - "4: a comma separated list of attribute-value pairs, OPTIONAL, e.g. \"netCDF Java=4.0,Conventions=CF-1.0\", ensure that text containing '=' or ',' characters are delimited by a backslash.") + "4: a comma separated list of attribute-value pairs, OPTIONAL, e.g. \"netCDF Java=4.0,Conventions=CF-1.0\", " + + "ensure that text containing '=' or ',' characters are delimited by a backslash. " + + "Set value to null to delete existing attribute.") .isRequired(false).withLongOpt(ATTRIBUTES).create("a"); Option largeFileSupport = OptionBuilder.withDescription( @@ -440,7 +440,8 @@ .withArgName("text") .hasArg() .withDescription( - "7: OPTIONAL, the variable to assign attribute(s) to.") //TODO wording.... + "7: OPTIONAL, the variable to assign attribute(s) to, " + + "set to define variable attribute.") .isRequired(false).withLongOpt(VARIABLE_NAME).create("v"); Options options = new Options(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |