please help me calculate the frequency
Mary Jo Nath
Mary-Jo.Nath at NOAA.GOV
Thu Dec 14 16:53:33 EST 2006
Diana,
I'm not exactly sure what you are trying to do. But maybe this example
will help you figure a solution.
Ex:
Say you have a lat-lon grid, temp, which has 20*365 (=7300) days of
data, and you just want to sum up the number of days over that period at
each grid point when the temperature was > 300. You could do something like:
'define ndays = sum( maskout(temp/temp,temp-300.), t=1,t=7300)'
"sum" is a grads function which sums over the dimensions specified. In
this case, we sum over time. (Please see the grads documentation for
full explanation.)
ndays is a new lat-lon field created by adding the value of one
(="temp/temp") for each grid point and day over the period from t =1 to
t = 7300 whenever "temp-300" > 0.. (At whichever grid point and time
temp < 300, maskout will set "temp/temp" = missing for that grid point
and time and not included it in the sum).
Does this help?
MJ
na na wrote:
> Dear all,
> I am trying to find the frequency of extreme events ( higher than
> normal temperatures and precipitation) from 20 years of daily .nc
> data. I don't know how to calculate the frequency so I thouhgt that if
> I construct a loop through time it would work. So, I tried to
> construct a loop to pull from these 20 years only values of
> temperature higher than a certain value (for example tmax > 300K) but
> it didn't work and I don't know what else to do. Can anyone please
> please help me with an advice?
> Thank you,
>
> Diana Pop
>
> ------------------------------------------------------------------------
> Need a quick answer? Get one in minutes from people who know. Ask your
> question on Yahoo! Answers
> <http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20061214/35ef2d7a/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mary-Jo.Nath.vcf
Type: text/x-vcard
Size: 217 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20061214/35ef2d7a/attachment.vcf
More information about the gradsusr
mailing list