[Thread Prev][Thread Next][Index]
[ferret_users] spatial regridding
Hi,
Could anybody help me to understand how exactly Ferret computes a
spatial average?
I have a regular horizontal grid, its resolution is 40 km and I am
trying to reduce the resolution to 80, 160 and 320 km. The initial x
axis ranges from -2880 to 2440 km and the y axis from -2560 to 2760
km. The coordinates of each grid box correspond to the centre of the
box: for example, the grid box centred in (-2880, -2560) covers the
area x=-2900:-2860 and y=-2580:-2540, i.e. a square of 1600 km2.
The computation works fine and the resolution is reduced nicely—I get
the same using @SBX:2 or @SBX:4 or @SBX:8, with the difference that
in the latter case the plot resolution is still 40 km.
The problems arises when I try to check how Ferret did the
computation, I get totally lost and I assume there is probably a
trick I don't know.
I know how work the time axis and that the time step must correspond
to the middle of the average period in order to take into account the
correct time steps. Is there something similar with the spatial axes?
Here is what I do to go from the 40-km resolution to the 80-km
resolution (initially in a script) :
yes? define axis/x=-2840:2360:80/unit=km xax
yes? define axis/y=-2520:2680:80/unit=km yax
yes? define grid/x=xax/y=yax grd
yes? let var80km = var40km[g=grd@ave]
The new x and y axis are slightly shorter so that no missing points
are found at the boundaries.
What I want Ferret to do is the following. Let's zoom on 9 grid boxes:
A B C
D E F
G H I
In order to get the 80-km resolution, E should be replaced by: ( E +
(D+B+F+H)/2 + (A+C+G+I)/4 ) / 4, meaning that D, B, F and H
contributes for half of their surface, A, C, G and I for a quarter.
When I check the values of var80km, it is not what I get. Why?
Thanks very much for any idea on this!
Emilie V.
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement