Re: [netcdfgroup] easy/quick way to get attribute value from shell?

On May 20, 2012, at 12:29 PM, Tom Roche wrote:

> 
> Tom Roche Sun, 20 May 2012 12:49:22 -0400
>>>> Ideally we could combine the clarities of R package=ncdf4 and the
>>>> NCO print statement, e.g.
> 
>>>> ncatt_get 'N2O@var_desc' /path/to/file
>>>> or, for global attributes
>>>> ncatt_get '@NVARS' /path/to/file
> 
>>>> that could be used like
> 
>>>> if [[ "$(ncatt_get 'N2O@units' /path/to/file)" == 'kg/ha' ]] ; then
>>>>  # convert kg to mol
>>>>  # convert ha to map-scaled gridcell area
>>>> fi
> 
> Charlie Zender Sat, 19 May 2012 14:05:16 -0700
>>> http://nco.sf.net/nco.html#ncattget
> 
> Interesting! but
> 
> - when I access that link, I only get the top of the document.
>  Furthermore, when I search the page for 'ncattget' I get no hits.
>  Am I missing something?
> 
> - on my (debian) box (which is up-to-date with debian testing), I see


Look at section 4.7.1 "Filters for ncks"

-Roy



> 

**********************
"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.



  • 2012 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: