Jason,<br>That&#39;s not exactly what I&#39;m asking about.  The exact formulation and computations I&#39;m trying to make are:<br><br>&#39;OMEGA = 7.2722e-5&#39;<br>&#39;pi = 3.14159265358988&#39;<br>&#39;f = 2*sin(OMEGA*(pi/180))&#39;<br>
&#39;dx = 6.371e6*cos(lat*(pi/180))*cdiff(lon,x)*(pi/180)&#39;<br>&#39;dy = 6.371e6*cdiff(lat,y)*(pi/180)&#39;<br>&#39;dz = cdiff((ph+phb)/9.81,z)&#39;<br><br><b><i>&#39;icomp = (cdiff(w,y)/dy - cdiff(v,z)/dz + f)*(cdiff(thetae,x)/dx)&#39;<br>
&#39;jcomp = (cdiff(u,z)/dz - cdiff(w,x)/dx + f)*(cdiff(thetae,y)/dy)&#39;<br>&#39;kcomp = (cdiff(v,x)/dx - cdiff(u,y)/dy + f)*(cdiff(thetae,z)/dz)&#39;</i></b><br>&#39;EPV = icomp + jcomp + kcomp&#39;<br><br>Jeff<br><br>
<div class="gmail_quote">On Tue, Feb 9, 2010 at 4:43 PM, Jason Snyder <span dir="ltr">&lt;<a href="mailto:jmssnyder@ucdavis.edu">jmssnyder@ucdavis.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;">
<div>In regards to your second question would this work?</div>
<div> </div>
<div>&#39;sdfopen <a href="http://uwnd.2001.nc" target="_blank">uwnd.2001.nc</a>&#39;</div>
<div>&#39;define dx=cdiff(uwnd,x)&#39;</div>
<div>&#39;define dxdy=cdiff(dx,y)&#39;</div>
<div>&#39;define dxdydz=cdiff(dxdy,z)&#39;</div>
<div> </div>
<div> </div>
<div>or something like this.</div>
<div> </div><font color="#888888">
<div>-Jason<br><br></div></font><div><div></div><div class="h5">
<div class="gmail_quote">On Tue, Feb 9, 2010 at 1:55 PM, Jeffrey Duda <span dir="ltr">&lt;<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>&gt;</span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;" class="gmail_quote">I have two questions.<br><br>1) How do you write data out to a file in text format?  I know there is an fwrite command, but I don&#39;t really know how it works.<br>

<br>2) Can the cdiff command work when three environment dimensions are varying?  I&#39;m trying to compute EPV, but to do so, I need to do a cdiff command in the x, y, and z dimensions, but I always get an error and usually Grads crashes when I do it.<br>

<br>Jeff Duda<br clear="all"><font color="#888888"><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>

</font></blockquote></div><br>
</div></div></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>