[gradsusr] Subtract previous value

Chorley Weather weatherstu at chorleyweather.com
Sat Dec 5 06:12:23 EST 2015


 

On 05-12-2015 10:09, raymond ordinario wrote: 

> Hi Stuart, 
> 
> yes it is easy you can play around with the time element as example below 
> 
> n=2 
> while (n <=96) 
> precip(t=n) - precip(t=n-1) 
> n=n+1 
> endwhile 
> 
> you can put this on a script. 
> 
> Thanks, 
> 
> Raymond 
> 
> On Sat, Dec 5, 2015 at 6:03 PM, Chorley Weather <weatherstu at chorleyweather.com> wrote:
> 
>> Hi all, 
>> 
>> This is probably an easy solution but if I have 96 hours worth of precipitation data but I need to subtract the previous value for an hourly output how would I go about this? For example hour 2 would need to subtract hour 1, then hour 3 would need to subtract hour 2 and so on...... 
>> 
>> Thanks in advance!!! 
>> -- 
>> 
>> Stuart Markham 
>> 
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr [1]
> 
> HI Raymond, 
> 
> Thank you for the reply. I have tried the function but it just produces one image then ends the script. I have attached the script and control file. Can you advise why it does this or even maybe there is a better solution. 
> 
> -- 
> Many Thanks, 
> Stuart.
> 
> ------------------------------------------------------------------------------------------------------------------------------- Raymond C. Ordinario
> MS Atmospheric Science
> Ateneo De Manila University
> Quezon City, Philippines
> 
> Weather Specialist I
> 
> Technique Application and Meteorological Satellite Section
> Weather DIvision
> Philippine Atmospheric, Geophysical and Astronomical Services Admistration
> Quezon City, Philippines 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr [1]

-- 

Stuart Markham 

 

Links:
------
[1] http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151205/961c6b17/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Auk1.gs
Type: text/x-c
Size: 26157 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20151205/961c6b17/attachment-0001.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gfs_grib.ctl
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20151205/961c6b17/attachment-0001.pl 


More information about the gradsusr mailing list