[Thread Prev][Thread Next][Index]

Re: [ferret_users] writing stat output in txt file



Hi,
I see this question was never answered. STAT is a command, not a function, so you can't list it directly.  You can put any results that ordinarily into a file using  SET REDRIECT
yes? use file.nc
yes? set redirect/file=stat.txt/clobber
yes? stat var
yes? cancel redirect
You can also send the output to the journal file - see the command reference above for the details.

Ferret also sets symbols with the results of the STAT command, so  (even without SET REDIRECT) you can get and use any of the results
yes? stat var
yes? show symbols stat*
STAT_MIN = "-7473.2"
STAT_MAX = "5731.1"
STAT_MEAN = "-1896"
STAT_STD = "2639.1"
STAT_NGOOD = "64800"
STAT_NBAD = "0"

yes? list/file=myfile.out/clobber ($stat_mean), ($stat_std)

On 8/6/2014 9:55 PM, Nitin Patil wrote:
Dear All,

My script to calculate stat i.d standard deviation from daily data.

let A1=Optical_Depth_Land_And_Ocean_Mean[d=1,x=73:81@ave,y=30:33@ave,l=1:122]
let B1=Optical_Depth_Land_And_Ocean_Mean[d=1,x=73:85@ave,y=25:29@ave,l=1:122]
let daily=(A1+B1)/2
list/file=GP2002.txt stat(daily)

I want to write the output of stat function to a txt file, but above step give error, Any idea where I am doing mistake to take stat output to a txt file.


--
Regards,
Nitin Patil


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement