<DIV>Thank you very much for your ideas.</DIV> <DIV>What I was trying to do is to make a bar plot for NYC and to show how many days during these 20 years have higher than normal temperatures or precipitation. </DIV> <DIV>I think I can figure out a way to do it based on your sum and mask idea. </DIV> <DIV>Thank you,</DIV> <DIV> </DIV> <DIV> </DIV> <DIV><B><I>Mary Jo Nath <Mary-Jo.Nath@NOAA.GOV></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Diana,<BR><BR>I'm not exactly sure what you are trying to do. But maybe this example will help you figure a solution.<BR>Ex:<BR>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:<BR><BR>'define ndays = sum( maskout(temp/temp,temp-300.), t=1,t=7300)'<BR><BR>"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.)<BR>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). <BR><BR>Does this help?<BR>MJ<BR><BR>na na wrote: <BLOCKQUOTE cite=mid110149.52039.qm@web58908.mail.re1.yahoo.com type="cite"> <DIV>Dear all, </DIV> <DIV>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? </DIV> <DIV>Thank you,</DIV> <DIV> </DIV> <DIV>Diana Pop</DIV> <DIV></DIV> <HR SIZE=1> Need a quick answer? Get one in minutes from people who know. Ask your question on <A href="http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">Yahoo! Answers</A>. </BLOCKQUOTE>begin:vcard<BR>fn:Mary Jo Nath<BR>n:Nath;Mary Jo<BR>org:NOAA / GFDL<BR>adr:;;201 Forrestal Road;Princeton;New Jersey;08542;USA<BR>email;internet:Mary-Jo.Nath@noaa.gov<BR>tel;work:609 452 6648<BR>x-mozilla-html:TRUE<BR>version:2.1<BR>end:vcard<BR><BR></BLOCKQUOTE><BR><BR><BR>Diana Pop <br>research assistant <br>Hunter College, CUNY<p> 
<hr size=1>Access over 1 million songs - <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Yahoo! Music Unlimited.</a>