[gradsusr] how to compute standard deviation in grads

Hosmay Lopez hlopez at rsmas.miami.edu
Mon Aug 31 15:25:37 EDT 2015


Hi Amina,

The GrADS intrinsic variables (e.g., sqrt, ave, pow) to calculate standard deviation takes undefined values into consideration as long as these values are set to missing values in the control file.

You could check this by executing: q ctlinfo and check the missing value setting in the set undef line.

Hope this helped,
Hosmay,

Hosmay Lopez
UM/CIMAS/RSMAS NOAA/AOML/PHOD
4301 Rickenbacker Causeway,
Miami, FL 33149, USA
Phone: (305) 361-4329

________________________________
From: Amina Khan [k.amina93 at yahoo.com]
Sent: Monday, August 31, 2015 2:07 PM
To: Hosmay Lopez; GrADS Users Forum
Subject: Re: [gradsusr] how to compute standard deviation in grads

Thank you so much Hosmay.
But how can i remove the undefined values from the file.




On Monday, August 31, 2015 10:56 PM, Hosmay Lopez <hlopez at rsmas.miami.edu> wrote:


Hi Amina,

I f your precipitation variable is named precip, then you could do:

Precip_StDev = sqrt(ave(pow(precip , 2), t = 1 , t = nt))

where, sort function is the square root
ave function is average over time dimension in this case.
pow function is the power function to square precip variable.

Hope this helps.

Hosmay Lopez
UM/CIMAS/RSMAS NOAA/AOML/PHOD
4301 Rickenbacker Causeway,
Miami, FL 33149, USA
Phone: (305) 361-4329

________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Amina Khan [k.amina93 at yahoo.com]
Sent: Monday, August 31, 2015 1:35 PM
To: gradsusr at gradsusr.org
Subject: [gradsusr] how to compute standard deviation in grads

Hi all,
I want to compute standard deviation from nc file having precipitation data.
There are also some undefined values in file. How can i do this. Please guide me.


Thanks
Amina



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150831/475a41b1/attachment-0001.html 


More information about the gradsusr mailing list