Hi Jaci -The right way to do this is to test (part of) the result after doing the calculation! One good test, as you suggest, is that dp/dx is zero at the reference level. Another is to list the results of a @iin and the down-index operation on single profile and check it directly to be sure that it is doing what you expect.
I think the resolution of the discussion you link to is that @iin is correct in reverse but @rsum may not be as expected. Steve and Ryo hashed this around in that thread. Also see my comment about how to make @rsum more consistent at the end of the thread, in:
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/ msg00482.html
Of course, if you just need the pressures at a particular level, you don't need to do the down-index integration, just @din within whatever limits.
Billy K On 1Aug 2007, at 2:46 PM, Jaclyn Brown wrote:
Hi,I need to calculate some horizontal pressure gradients. To do this I’ve been calculating pressure by integrating density from a particular reference depth. I’m not sure I’m doing it correctly because of the problems with doing @iin in reverse – seehttp:// www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/msg00478.html .Has anyone figured out the right way to do this so that dp/dx is 0 at the reference depth?Thanks for your help, Jaci Dr Jaclyn Brown Postdoctoral Associate Dept Geology and Geophysics Yale University Ph. 203 432 1959 PO Box 208109 New Haven CT 06520 USA