NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
From the html manual pages: > ‘-m’ > Print variable metadata to screen (similar to ncdump -h). This displays all > metadata pertaining to each variable, one variable at a time. This includes > information on the storage properties of the variable, such as whether it > employs chunking, compression, or packing. Also activated using ‘--mtd’ and > ‘--metadata’. The ncks default behavior is to print variable metadata to > screen if no netCDF output file is specified. Use ‘-m’ to print variable > metadata to screen if a netCDF output is specified. and > ‘-P’ > Print data, metadata, and units to screen. The ‘-P’ switch is a convenience > abbreviation for ‘-C -H -M -m -u’. Also activated using ‘--print’ or ‘--prn’. > This set of switches is useful for exploring file contents. There are examples of using shell scripts to make the output more precise, and to get global attributes. -Roy On May 18, 2012, at 6:18 PM, Tom Roche wrote: > > Tom Roche May 18, 2012 2:25 PM >>> Is there an easy and quick way to *get* the value of an attribute > > I guess I should have said, "any attribute, by name" > >>> (whether global or variable) from a (bash) shell commandline or >>> script? > > Roy Mendelssohn Fri, 18 May 2012 14:32:12 -0700 >> Have you looked at ncks in NCO > > I have. Correct me if wrong, but the only *attribute* `ncks` allows > one to query directly is "units". One can query *variable* values by > variable name, but not attribute values by attribute name. (One can > `cut`, `grep`, and `sed` output ... but I can do with that `ncdump`.) > > Am I missing something? > > your assistance is appreciated, Tom Roche <Tom_Roche@xxxxxxxxx> > > _______________________________________________ > netcdfgroup mailing list > netcdfgroup@xxxxxxxxxxxxxxxx > For list information or to unsubscribe, visit: > http://www.unidata.ucar.edu/mailing_lists/ ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
netcdfgroup
archives: