Adrain,<br>Indeed, the CDIFF function won't help you here, but it sounds like you have answered your own question. All you need to do is (quoted from your message): "(rain at t=x)-(rain at t=x-1)" and almost in that exact syntax. Whatever your "rain" variable is called (I'll call it "rain" in this example), just do 'd rain(t=x) - rain(t=x-1)', or if you want to do this over a range of values, do either<br>
<br>'set t t1 t2'<br>'d tloop(rain-rain(t-1))'<br><br>OR<br><br>'set t t1 t2'<br>'define rainvariable = rain-rain(t-1)'<br>'d rainvariable'<br><br>That should work.<br><br>Jeff Duda<br>
<br><div class="gmail_quote">On Wed, Oct 20, 2010 at 8:18 AM, Adrian Scherzinger <span dir="ltr"><<a href="mailto:adrian.scherzinger@meteotest.ch">adrian.scherzinger@meteotest.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi<br>
I am looking for a function similar to cdiff, BUT instead of<br>
"The result value at each grid point is the value at the grid point plus<br>
one minus the value at the grid point minus one."<br>
i need a funktion that calculates:<br>
"The result value at each grid point is the value at the grid point<br>
minus the value at the grid point minus one."<br>
<br>
This is my problem:<br>
Each timestep of my mm5 precipitation data set contains the integral of<br>
the precipitation since t=1. I want to plot a bar graph with the<br>
precipitation of each hour (not the integral). If I want to get the<br>
value only at time X, I need to calculate (rain at t=x)-(rain at t=x-1).<br>
cdiff(rain,t) is not the solution.<br>
<br>
Thanks for your help<br>
Adrian<br>
<br>
--<br>
___________________________<br>
Adrian Scherzinger<br>
Stv. Leiter Wetterprognosen<br>
<br>
Genossenschaft METEOTEST<br>
Fabrikstrasse 14, CH-3012 Bern<br>
Tel +41 (0)31 307 26 26<br>
Fax +41 (0)31 307 26 10<br>
<a href="mailto:adrian.scherzinger@meteotest.ch">adrian.scherzinger@meteotest.ch</a><br>
<a href="http://www.meteotest.ch" target="_blank">http://www.meteotest.ch</a><br>
<br>
********************************************************************<br>
0900 57 61 52 (CHF 3.13/Min) im direkten Dialog mit dem Prognostiker<br>
METEOFON - das persönliche Wettertelefon von METEOTEST (05-18 Uhr)<br>
********************************************************************<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>