[gradsusr] cdiff function

Jeffrey Duda jdduda at iastate.edu
Wed Oct 20 11:40:06 EDT 2010


Adrain,
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

'set t t1 t2'
'd tloop(rain-rain(t-1))'

OR

'set t t1 t2'
'define rainvariable = rain-rain(t-1)'
'd rainvariable'

That should work.

Jeff Duda

On Wed, Oct 20, 2010 at 8:18 AM, Adrian Scherzinger <
adrian.scherzinger at meteotest.ch> wrote:

>  Hi
> I am looking for a function similar to cdiff, BUT instead of
> "The result value at each grid point is the value at the grid point plus
> one minus the value at the grid point minus one."
> i need a funktion that calculates:
> "The result value at each grid point is the value at the grid point
> minus the value at the grid point minus one."
>
> This is my problem:
> Each timestep of my mm5 precipitation data set contains the integral of
> the precipitation since t=1. I want to plot a bar graph with the
> precipitation of each hour (not the integral). If I want to get the
> value only at time X, I need to calculate (rain at t=x)-(rain at t=x-1).
> cdiff(rain,t) is not the solution.
>
> Thanks for your help
> Adrian
>
> --
> ___________________________
> Adrian Scherzinger
> Stv. Leiter Wetterprognosen
>
> Genossenschaft METEOTEST
> Fabrikstrasse 14, CH-3012 Bern
> Tel +41 (0)31 307 26 26
> Fax +41 (0)31 307 26 10
> adrian.scherzinger at meteotest.ch
> http://www.meteotest.ch
>
> ********************************************************************
> 0900 57 61 52 (CHF 3.13/Min) im direkten Dialog mit dem Prognostiker
> METEOFON - das persönliche Wettertelefon von METEOTEST (05-18 Uhr)
> ********************************************************************
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



-- 
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101020/1c5d2de0/attachment-0003.html 


More information about the gradsusr mailing list