STAT is a command that displays its result to standard output. It's
not a function, so "LIST STAT varname" is not valid syntax.
You can get the information from STAT into variables by using the
set of symbols that are automatically defined when you issue the
yes? stat sst
so you could write
SEA SURFACE TEMPERATURE
LONGITUDE: 20E to 20E(380)
LATITUDE: 90S to 90N
TIME: 01-JAN 00:45 to 31-DEC 06:34
Total # of data points: 194400 (180*90*1*12*1*1)
# flagged as bad data: 89622
Minimum value: -2.6
Maximum value: 33.15
Mean value: 18.095 (unweighted average)
Standard deviation: 9.4023
yes? sh sym stat*
STAT_MIN = "-2.6"
STAT_MAX = "33.15"
STAT_MEAN = "18.095"
STAT_STD = "9.4023"
STAT_NGOOD = "104778"
STAT_NBAD = "89622"
let varmean = ($stat_mean)
and then list those to your file. It would be best to add /TITLE=
and /UNITS= to the LET commands so the information is documented.
let varstd = ($stat_var)
There are also functions and transformations that return the same
information; the @AVE, @VAR, @NGD, @NBD, @MIN and @MAX
transformations could be used to set up variables containing that
information, or this function to return both the min and max.
yes? show func minmax
On 8/6/2014 11:06 PM, Nitin Patil
My script is as follows:
list/file=GP2002.txt stat mean !!! NOT WORKING
I want to write the stat mean output in a txt file, any idea.