Re: replace integration by summation [message #84922 is a reply to message #84913] |
Tue, 18 June 2013 11:47  |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
On Tuesday, June 18, 2013 11:42:58 AM UTC-5, Fabien wrote:
> Hi everyone,
>
>
> I will ruthlessly use this thread to ask my question to the atmospheric
>
> modellers in the IDL community out here. I am also secretly asking
>
> myself how many atmospheric modellers are reading this group ;-)
>
>
>
> I am vertically integrating a quantity from an atmospheric model output
>
> (in this case: moisture flux) over the atmospheric column. I made some
>
> searches and it came out that some people use trapezoidal rule for this,
>
> some use the midpoint approximation rectangle rule
>
> (http://en.wikipedia.org/wiki/Rectangle_method). There aren't many more
>
> options because the data is tabulated (z-coordinates=pressure,
>
> values=flux).
>
> To me, the rectangle rule makes more sense from the "gridded point of
>
> view" of atmospheric models. Does anyone have a hint or a good reference
>
> explaining how this should be "correctly done" in this case? Thanks!
>
>
>
> Fab
Well, I wouldn't really consider myself an atmospheric modeler, but I would think it depends on how much the data varies within the grid points. In the link I posted, the implicit underlying function describing the data varies quite a bit in between grid points, so the rectangle method doesn't work very well. If I had a finer grid (which in calculus is equivalent to letting deltaX->dx, an infinitesimal differential), then the rectangle method should work better. On the other hand, the trapezoidal method works fine since it's a pretty good approximation to the underlying function. INT_TABULATED works better since it's the fifth order Netwon-Cotes method. I believe the trapezoid method is the first order Newton-Cotes.
There are likely other folks better suited to give a more "formal" answer....
|
|
|