See et al,<br><br> One of the main issues with the fish() extension is that it requires globally defined vorticity/divergence fields and the GrADS intrinsic functions (hcurl, hdivg) tend to place undefined values at the boundaries. I just realized that B.-J. Tsuang's function collection includes a set of "advection functions" which can be used as a replacement for hcurl/hdivg. B.-J.'s functions are documented here:<br>
<br>
<a href="http://opengrads.org/doc/udxt/libbjt/">http://opengrads.org/doc/udxt/libbjt/</a><br><br>(This extension library includes over 30 very useful new functions besides the advection ones used here).<br><br> The attached example script, which should be run under gradsdods, demonstrates how you can use B.-J.'s functions to compute psi, chi as well as the rotational and divergent wind. Please notice the restrictions:<br>
<br> - global and uniform grid; use re() if grid is not uniform<br> - first and last latitudinal grid points cannot be at the poles<br><br> Of course, you must have GrADS v1.9.0-rc1 and the OpenGrADS extensions installed; these extensions do not yet work with GrADS v2. More information here:<br>
<br> <a href="http://opengrads.org/wiki/index.php?title=User_Defined_Extensions">http://opengrads.org/wiki/index.php?title=User_Defined_Extensions</a><br><br> Good Luck,<br><br> Arlindo<br><br>-- <br>Arlindo da Silva<br>
<a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>