Writing out to a file and cdiff

Jeffrey Duda jdduda at IASTATE.EDU
Tue Feb 9 17:50:37 EST 2010


Jason,
That's not exactly what I'm asking about.  The exact formulation and
computations I'm trying to make are:

'OMEGA = 7.2722e-5'
'pi = 3.14159265358988'
'f = 2*sin(OMEGA*(pi/180))'
'dx = 6.371e6*cos(lat*(pi/180))*cdiff(lon,x)*(pi/180)'
'dy = 6.371e6*cdiff(lat,y)*(pi/180)'
'dz = cdiff((ph+phb)/9.81,z)'

*'icomp = (cdiff(w,y)/dy - cdiff(v,z)/dz + f)*(cdiff(thetae,x)/dx)'
'jcomp = (cdiff(u,z)/dz - cdiff(w,x)/dx + f)*(cdiff(thetae,y)/dy)'
'kcomp = (cdiff(v,x)/dx - cdiff(u,y)/dy + f)*(cdiff(thetae,z)/dz)'*
'EPV = icomp + jcomp + kcomp'

Jeff

On Tue, Feb 9, 2010 at 4:43 PM, Jason Snyder <jmssnyder at ucdavis.edu> wrote:

> In regards to your second question would this work?
>
> 'sdfopen uwnd.2001.nc'
> 'define dx=cdiff(uwnd,x)'
> 'define dxdy=cdiff(dx,y)'
> 'define dxdydz=cdiff(dxdy,z)'
>
>
> or something like this.
>
> -Jason
>
> On Tue, Feb 9, 2010 at 1:55 PM, Jeffrey Duda <jdduda at iastate.edu> wrote:
>
>> I have two questions.
>>
>> 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.
>>
>> 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.
>>
>> Jeff Duda
>>
>> --
>> Jeff Duda
>> Iowa State University
>> Meteorology Graduate Student
>> 3134 Agronomy Hall
>> www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
>>
>
>


-- 
Jeff Duda
Iowa State University
Meteorology Graduate Student
3134 Agronomy Hall
www.meteor.iastate.edu/~jdduda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100209/44aec2ca/attachment.html 


More information about the gradsusr mailing list