# Re: [ferret_users] Changed behaviour in regridding one point axes

 Hi Martin, The example you're trying from the Users Guide shows a bug in the "subspan modulo" treatment of longitude axes, which was introduced in Ferret v5.5.  If we change the example to make sure Ferret doesn't try to treat these short longitude axes as modulo axes, then the example works as expected. In the output of SHOW AXIS, note the m under # pts; indicating the axis is treated as a modulo axis. yes? define axis/x=163e/npoints=1 x1pt yes? show axis x1pt  name       axis              # pts   start                end  X1PT      LONGITUDE            1mr   163E                 163E    Axis span (to cell edges) = 1 (modulo length = 360) yes? CANCEL AXIS/MODULO x1pt yes? let var_1pt = randu(x[gx=x1pt]) ! a random value at a single coordinate yes? list var_1pt              VARIABLE : RANDU(X[GX=X1PT])              LONGITUDE: 163E           0.4914 yes? define axis/x=161e:165e:1 x5pt yes? show axis x5pt  name       axis              # pts   start                end  X5PT      LONGITUDE            5mr   161E                 165E    Axis span (to cell edges) = 5 (modulo length = 360) yes? CANCEL AXIS/MODULO x5pt yes? list var_1pt[gx=x5pt@max] ! same value embedded within 5 point axis              VARIABLE : RANDU(X[GX=X1PT])                         regrid: 1 deg on X@MAX              SUBSET   : 5 points (LONGITUDE)  161E   / 1:    ....  162E   / 2:    ....  163E   / 3:  0.4914  164E   / 4:    ....  165E   / 5:    .... So we need to track down what is happening when the axes ARE defined as modulo. Martin, I'll work with you outside the List to see if we can find out what's happening with your regridding @SUM question, and then we can report the result back to the whole List. Ansley   Martin Schmidt wrote: Hi, I am trying to regrid a variable defined at a single point with two dimensions. >From one file I read a 2d-field "wet" that is 1 at ocean points and 0 otherwise. I define a new grid (for short notation) define grid/like=wet[d=1] rgrid Read the river data use "with_coordinates/angola.nc" rivers data are time series with a single latitude and longitude coordinate and a time axis let runoff= RIVER_BENGO[gx=rgrid@sum,gy=rgrid@sum] I would expect, that ferret searches, in which grid cell the river is and sets runoff to the data value. Otherwise runoff should be zero. This does not work, the river appears to be spread over an area. The sum over all grid points is the correct data value. I was playing around with the examples in the manual. For example: yes? define axis/x=163e/npoints=1 x1pt yes? let var_1pt = randu(x[gx=x1pt]) ! a random value at a single coordinate yes? list var_1pt             VARIABLE : RANDU(X[GX=X1PT])             LONGITUDE: 163E           .4914 yes? define axis/x=161e:165e:1 x5pt yes? list var_1pt[gx=x5pt@max] ! same value embedded within 5 point axis             VARIABLE : RANDU(X[GX=X1PT])                        regrid: 1 deg on X@MAX             SUBSET   : 5 points (LONGITUDE) 161E   / 1:     .... 162E   / 2:     .... 163E   / 3:  0.04804 164E   / 4:     .... 165E   / 5:     .... This differes from the example in the manual and is wrong. The number should be .4914. I am using ferret 6.03. An old version (5.41 for AIX gives the correct result, but does not work too for the river example. 5.7 and 5.8 are wrong too. What I am doing wrong with the river example? Seems there is a bug in ferret 6. Version 6.01 gives the same result. Greetings, Martin

• References: