[gradsusr] CDIFF Versus HDIVG?

LeeJoice, Robert N rnleejoi at nps.edu
Tue Oct 19 15:27:26 EDT 2010


I was wondering if there is a difference in the differencing scheme between
CDIFF and HDIVG.  I ask because I did a modified example from the
documentation, i.e., divergence vice vorticity.  The documentation states
that CDIFF uses centered differencing.  HDIVG says the same.  The images
suggest something else unless I¹m missing something.

CDIFF file
if(var='DIV')
          'run bluewhitered.gs -2.0 .5 10'
          'define dv = cdiff(vgrdprs,x)'
          'define dx = cdiff(lon,x)*3.1416/180'
          'define du = cdiff(ugrdprs*cos(lat*3.1416/180),y)'
          'define dy = cdiff(lat,y)*3.1416/180'
          'display (du/dx+dv/dy)*1e5/(6.37e6*cos(lat*3.1416/180))'
          'run cbarn.gs 0.8 1 10.4 4.7'
endif

HDIVG file
if(var='DIV')
        'run bluewhitered.gs -2.0 .5 10'
        'd 1e5*hdivg(ugrdprs,vgrdprs)'
        'run cbarn.gs 0.8 1 10.4 4.7'
Endif

Here are the images in order...

Thank you for any comments,

Robert LeeJoice
PhD Candidate, Naval Postgraduate School

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101019/47d7cefc/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sinlaku.DIV-gfsfnl.2008090806a129.gif
Type: video/x-flv
Size: 141194 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101019/47d7cefc/attachment-0006.flv 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sinlaku.DIV-gfsfnl.2008090806a129a.gif
Type: video/x-flv
Size: 123488 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101019/47d7cefc/attachment-0007.flv 


More information about the gradsusr mailing list