Thanks Jeff. <br>But i am not able to plot the output. It gives error with the latitudinal command <br><br>ga-&gt; define dy=6.37e6*cdiff(19.5,y)*(3.1416/180)<br>Error from CDIFF:  Specified dimension non varying<br>Operation Error:  Error from cdiff function<br>
  Error ocurred at column 8<br>DEFINE error:  Invalid expression.<br><br>and also tried with the longitudinal command<br><br>ga-&gt; define dx=6.37e6*cos(10*(3.1416/180))*cdiff(30,x)*(3.1416/180)<br>Error from CDIFF:  Specified dimension non varying<br>
Operation Error:  Error from cdiff function<br>  Error ocurred at column 29<br>DEFINE error:  Invalid expression. <br>Segmentation fault<br><br>i think i am have to set dimensions first?<br><br>Thank you<br><br>Sushant<br>
<br><div class="gmail_quote">On Fri, Jun 24, 2011 at 10:14 PM, Jeffrey Duda <span dir="ltr">&lt;<a href="mailto:jdduda@iastate.edu">jdduda@iastate.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sushant,<br>Unfortunately, no.  Getting the longitudinal gradient is not as simple since the distance between longitude lines is a function of the latitude.  However, the formula is<br><br>dx = Re*cos(lat*(pi/180))*cdiff(lon,x)*(pi/180).<br>

<br>The cos(lat*(pi/180)) term is the adjustment for dependence of longitude space on latitude.<br><br>Jeff<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 12:55 AM, sushant puranik <span dir="ltr">&lt;<a href="mailto:sushantpuranik@gmail.com" target="_blank">sushantpuranik@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Jeff<br>Can i use same command for longitudinal gradient computation by replacing lat --&gt; lon in the command <br>

dy = Re*cdiff(lat,y)*(3.14159/180)<br><br>thanks <br><br>Sushant<br><br><br><div class="gmail_quote">On Tue, May 4, 2010 at 2:33 AM, Jeffrey Duda <span dir="ltr">&lt;<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Li,<br>If you want to find a temperature gradient, why not just use cdiff?  Just realize that you&#39;ll have to use the following expression for dy (the incremental change in meridional distance between grid points, in meters):<br>



<br>dy = Re*cdiff(lat,y)*(3.14159/180)<br><br>where Re is the radius of the Earth (about 6.371e6 meters, I believe).   This is to account for the projection Grads uses to display your data.  Hope this helps.<br><br>Jeff Duda<div>


<div></div><div><br>
<br><div class="gmail_quote">On Mon, May 3, 2010 at 3:20 PM, Li Dong <span dir="ltr">&lt;<a href="mailto:ldong@unm.edu" target="_blank">ldong@unm.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Hello list,<br>
<br>
I need to calculate the meridional temperature gradient across 20 degree<br>
latitude belt using global gridded data. Below is what I did:<br>
<br>
&#39;open ta.ctl&#39;<br>
&#39;set t 1&#39;<br>
&#39;set lev 1000&#39;<br>
&#39;set lon 0 360&#39;<br>
&#39;set lat -80 80&#39;<br>
&#39;define Tgrad=ta(lat+10)-ta(lat-10)&#39;<br>
<br>
However, Grads complained &quot;Cannot use an offset value with a varying<br>
dimension&quot;. If I set &#39;lat&#39; at a fixed value, such as &#39;set lat 40&#39;, the<br>
above script did work, but the downside is that this only gives<br>
temperature meridional gradient at the specified latitude instead of<br>
over the entire latitude range. Any inputs would be highly appreciated!<br>
<br>
Best,<br>
<br>
Li<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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></div></div><font color="#888888">-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>




</font><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br><br><br><br>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<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/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a><br>


</div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br><br><br><br>