<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi Andrew,<br><br></div>Thanks for your guidance, it worked wonderfully.<br><br></div>Just a quick question, though.<br><br></div>'sdfopen <a href="http://precipitation.nc">precipitation.nc</a>'<br></div>'set lon 0 360'<br></div>'set lat -90 -75'<br></div>'set mproj sps'<br></div>'set t 1 last'<br></div><br>'d precipitation'<br></div>'ltrend precipitation precl slope error'<br></div>'c'<br><br></div>'set t 1'<br></div>'d precl'<br></div>'define trend1=precl'<br><br></div><div>'c'<br></div><div>'set t last'<br></div><div>'d precl'<br></div><div>'define trendlast=precl'<br></div><div>'c'<br><br></div><div>'d trendlast-trendl'<br><br></div><div>*a spatial map comes out*<br><br></div><div>Is this the correct way to display the fluctuation of precipitation trend?<br><br></div><div>Regards,<br></div><div>Malcolm<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 18, 2015 at 4:59 AM, Andrew Friedman <span dir="ltr"><<a href="mailto:andfried@gmail.com" target="_blank">andfried@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Malcolm,<br>
<br>
If you are looking for the slope (the rate of change per time step) you need to add another term when you call trend<br>
<br>
For example:<br>
'ltrend prec precl precslope'<br>
<br>
>From the <a href="http://ltrend.gs" rel="noreferrer" target="_blank">ltrend.gs</a>”<br>
<br>
ga-> ltrend<br>
Calculate linear trend over time (based on least-squares fitting).<br>
<br>
USAGE: ltrend <input> [<output> [<slope> [<rmse>]]]<br>
<input>: input field. Can be any GrADS expression.<br>
<output>: output field, i.e., fitted trend line. Default=<input>.<br>
<slope>: slope of fitted trend line, i.e., change of <input> per time step.<br>
<rmse>: root mean square error.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andrew<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Dec 17, 2015, at 1:28 PM, Malcolm Tang <<a href="mailto:malct32@gmail.com">malct32@gmail.com</a>> wrote:<br>
><br>
> Hi Andrew,<br>
> Yes I've set it as<br>
><br>
> "set t 1 last"<br>
><br>
> For your info, I tried this and a spatial map came out:<br>
><br>
> 'set lon 0 360'<br>
> 'set lat -90 -75'<br>
> 'set mproj sps'<br>
> 'set t 1 last'<br>
><br>
> 'd prec'<br>
><br>
> 'ltrend prec precl'<br>
><br>
> 'd precl'<br>
><br>
> I'm not sure if it's the spatial trend map that I'm looking for though....<br>
><br>
> But since the time is set from 1 to last, I can observe that the map actually changes from 1 to the last time step.<br>
><br>
> Any idea or suggestion?<br>
><br>
> Thanks.<br>
> Malcolm<br>
><br>
><br>
> On Thu, Dec 17, 2015 at 5:32 PM, Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@gmail.com</a>> wrote:<br>
> Hi Malcolm,<br>
><br>
> In your text earlier, it looks like your time is set to 1. Can you try setting time to varying?<br>
><br>
> Andrew<br>
><br>
> > On Dec 17, 2015, at 3:38 AM, Malcolm Tang <<a href="mailto:malct32@gmail.com">malct32@gmail.com</a>> wrote:<br>
> ><br>
> > Hi Andrew,<br>
> ><br>
> > I removed the bracket and ....... nothing came out?<br>
> ><br>
> > I typed:<br>
> ><br>
> > "ltrend prec fitted trend line" nothing came out.<br>
> ><br>
> > "ltrend prec fitted trend line 0.2 0.025" nothing came out.<br>
> ><br>
> > Should I be expecting a result or something? Because I'm expecting a spatial map to come up.<br>
> ><br>
> > Thanks!<br>
> > Malcolm<br>
> ><br>
> > On Wed, Dec 16, 2015 at 4:05 PM, Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@gmail.com</a>> wrote:<br>
> > HI Malcolm,<br>
> ><br>
> > You shouldn’t type the brackets - they’re placeholders to indicate optional values.<br>
> ><br>
> > Andrew<br>
> ><br>
> > > On Dec 16, 2015, at 4:55 AM, Malcolm Tang <<a href="mailto:malct32@gmail.com">malct32@gmail.com</a>> wrote:<br>
> > ><br>
> > > Hi all,<br>
> > ><br>
> > > I want to plot the trend map of precipitation in antarctica (75s-90s) from 1999-2015.<br>
> > ><br>
> > > I have done some searching and saw someone suggested using BinGuan's script <a href="http://ltrend.gs" rel="noreferrer" target="_blank">ltrend.gs</a><br>
> > > I have copied the script and the dependencies qdims.gsf.<br>
> > ><br>
> > > So these are what I type in grads:<br>
> > ><br>
> > > 'set lon 0 360'<br>
> > > 'set lat -90 -75'<br>
> > > 'set mproj sps'<br>
> > > 'set t 1'<br>
> > ><br>
> > > 'd prec'<br>
> > > 'ltrend prec [fitted trend line [0.2[0.025]]]'<br>
> > ><br>
> > > and there will be error coming out: DEFINE error: Name too long; missing '='<br>
> > ><br>
> > > Anyone who has experience with <a href="http://ltrend.gs" rel="noreferrer" target="_blank">ltrend.gs</a> PLEASEEEEEEE help!!!<br>
> > ><br>
> > > Thanks<br>
> > > Malcolm<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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><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" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br></div>