Jason,<br>That's not exactly what I'm asking about. The exact formulation and computations I'm trying to make are:<br><br>'OMEGA = 7.2722e-5'<br>'pi = 3.14159265358988'<br>'f = 2*sin(OMEGA*(pi/180))'<br>
'dx = 6.371e6*cos(lat*(pi/180))*cdiff(lon,x)*(pi/180)'<br>'dy = 6.371e6*cdiff(lat,y)*(pi/180)'<br>'dz = cdiff((ph+phb)/9.81,z)'<br><br><b><i>'icomp = (cdiff(w,y)/dy - cdiff(v,z)/dz + f)*(cdiff(thetae,x)/dx)'<br>
'jcomp = (cdiff(u,z)/dz - cdiff(w,x)/dx + f)*(cdiff(thetae,y)/dy)'<br>'kcomp = (cdiff(v,x)/dx - cdiff(u,y)/dy + f)*(cdiff(thetae,z)/dz)'</i></b><br>'EPV = icomp + jcomp + kcomp'<br><br>Jeff<br><br>
<div class="gmail_quote">On Tue, Feb 9, 2010 at 4:43 PM, Jason Snyder <span dir="ltr"><<a href="mailto:jmssnyder@ucdavis.edu">jmssnyder@ucdavis.edu</a>></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>'sdfopen <a href="http://uwnd.2001.nc" target="_blank">uwnd.2001.nc</a>'</div>
<div>'define dx=cdiff(uwnd,x)'</div>
<div>'define dxdy=cdiff(dx,y)'</div>
<div>'define dxdydz=cdiff(dxdy,z)'</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"><<a href="mailto:jdduda@iastate.edu" target="_blank">jdduda@iastate.edu</a>></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't really know how it works.<br>
<br>2) Can the cdiff command work when three environment dimensions are varying? I'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>