[Thread Prev][Thread Next][Index]

Re: strange thing about the grid



Hi Muyin,

The problem that you have noted is a bug in V5.22 -- already fixed in V5.3.

The bug is for the special case that
  1) multiple, differing strides on the same parent axis are requested
and
  2) the "parent" axis of the strides is irregularly spaced

Then Ferret V5.22 will erroneously re-use the first stride specification for
subsequent stride requests

The work-arounds are either

a) only define a single strided variable at a time (Use "cancel variable var1"
   before defining var2)

OR

b)  Use explicit axis definitions
    DEFINE AXIS/unit=days/T ax_mar = T[l=3:624:12]
    DEFINE AXIS/unit=days/T ax_apr = T[l=4:624:12]
    LET mar = tnew[gt=ax_mar]
    LET apr = tnew[gt=ax_apr]

Note that when a single variable definition combines these irregular strides with
the use of a modulo axis, then CANCEL VARIABLE will not eliminate the problem.

The "good" news (if you want to call it that) is that Ferret correctly documents
the result it has actually computed. (It just happens not to be the requested
result!)

Thanks for the bug report.  So important to get these.

    - steve

=====================

Muyin Wang wrote:

> Hello, there: I have this weird thing with my underlying grid, and could not
> figure out why. Here is what happened:
> I have a 52 year monthly mean data from NCEP reanalysis. The underlying t axis
> is irregular and centered on the 15/16th of each month. I was trying to extract
> a particular month from that long time series by doing
> let mar = temp[l=3:624:12]
> let apr = temp[l=4:624:12]
> ....
>
> But, the problem is that I can only do ONE MONTH per time. If I had more than
> one definition, the ferret would give me the same value/grid of apr as mar. Here
> is an example:
>
> yes? show grid mar
>     GRID (G002)
>  name       axis              # pts   start                end
>  LON       LONGITUDE          144mr   0E                   2.5W
>  LAT37_73  LATITUDE            37 r   0                    90N
>  LEVEL     HEIGHT (millib      17 i-  10                   1000
>  (AX006)   TIME                52 i   16-MAR-1948 12:00    16-MAR-1999 12:00
> yes? show grid apr
>     GRID (G002)
>  name       axis              # pts   start                end
>  LON       LONGITUDE          144mr   0E                   2.5W
>  LAT37_73  LATITUDE            37 r   0                    90N
>  LEVEL     HEIGHT (millib      17 i-  10                   1000
>  (AX006)   TIME                52 i   16-MAR-1948 12:00    16-MAR-1999 12:00
> yes?
>
> But if I do
> yes? can var mar
> yes? show grid apr
>     GRID (G002)
>  name       axis              # pts   start                end
>  LON       LONGITUDE          144mr   0E                   2.5W
>  LAT37_73  LATITUDE            37 r   0                    90N
>  LEVEL     HEIGHT (millib      17 i-  10                   1000
>  (AX005)   TIME                52 i   16-APR-1948 00:00    16-APR-1999 00:00
>
> Now the definition for apr is correct, and values are fine, too. It seems that
> ferret only can recognize one definition like that, the first one.
>
> However, if I define a  regular monthly grid like
> yes? define axis/t=15-jan-1948:15-dec-1999:30.44/units=days treg
> yes? define grid/t=treg grdnew
>
> and then regrid the data to this new evenly spaced grid
>
> yes? let tnew = temp[g=grdnew]
> yes? let mar = tnew[l=3:624:12]
> yes? let apr = tnew[l=4:624:12]
>
> Now it works fine:
>
> yes? show grid mar,apr
>     GRID (G002)
>  name       axis              # pts   start                end
>  LON       LONGITUDE          144mr   0E                   2.5W
>  LAT37_73  LATITUDE            37 r   0                    90N
>  LEVEL     HEIGHT (millib      17 i-  10                   1000
>  (AX005)   TIME                52 r   15-MAR-1948 21:07    18-MAR-1999 03:50
>     GRID (G004)
>  name       axis              # pts   start                end
>  LON       LONGITUDE          144mr   0E                   2.5W
>  LAT37_73  LATITUDE            37 r   0                    90N
>  LEVEL     HEIGHT (millib      17 i-  10                   1000
>  (AX007)   TIME                52 r   15-APR-1948 07:40    17-APR-1999 14:24
> yes?
>
> Any idea on what's going on?
> Thanks for your thought.
> Muyin

--

                |  NOAA/PMEL               |  ph. (206) 526-6080
Steve Hankin    |  7600 Sand Point Way NE  |  FAX (206) 526-6744
                |  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement