Re: [netcdfgroup] simple commandline query of data-variable statistics to stdout? (Tom Roche)

  • To: netcdfgroup@xxxxxxxxxxxxxxxx
  • Subject: Re: [netcdfgroup] simple commandline query of data-variable statistics to stdout? (Tom Roche)
  • From: Charlie Zender <zender@xxxxxxx>
  • Date: Mon, 10 Sep 2012 14:44:55 -0700
Hi Tom,

> # median not currently available?

NCO can use GSL for most common statistical calculations ranging from
relatively simple stuff like medians and quantiles to more
sophisticated stuff like lag autocorrelations. Filters for these kinds
of statistics will look like:

# Invoke with ncmdn $var_nm $fl_nm
function ncmdn { ncap2 -O -C -v -s
"foo=gsl_stats_median_from_sorted_data(${1}.sort());print(foo)" ${2}
~/foo.nc | cut -f 3- -d ' ' ; }

The currently available GSL functions may be listed by typing

ncap2 -f | grep gsl_stats

and GSL examples are given in the manual

http://nco.sf.net/nco.html#gsl

Followups on NCO stuff should go to

https://sourceforge.net/projects/nco/forums/forum/9830

to avoid clogging the netCDF list.

cz
-- 
Charlie Zender, Earth System Sci. & Computer Sci.
University of California, Irvine 949-891-2429 )'(



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