[Thread Prev][Thread Next][Index]

Re: [ferret_users] Nearest coordinate regridding NRST



Hi Patrick,
The issue is not regridding to a 1-year axis versus 2-year time axis. Instead the trouble is when regridding the variable with a single point to a multi-point axis. The code has an unintended assumption that the source grid has more than one point. You'll find that you can put the 2-point variable from var_2years.nc onto the 1-year monthly axis.

yes? use var_1year.nc
yes? use var_2years.nc

yes? show axis monthly  ! the 12-month axis from the first dataset
 name       axis              # pts   start                end
MONTHLY TIME 12 i 16-JAN-2006 12:00 16-DEC-2006 12:00
T0 = 01-JAN-2006 00:00:00
   Axis span (to cell edges) = 365

yes? ! we can regrid the variable with 2 points from dataset var_2years.nc to the 1-year axis.
yes? list gpp_year[d=2,gt=monthly@nrst]
             VARIABLE : GPP[GT=YEARLY@AVE]
                        regrid: on T@NRST
             FILENAME : var_2years.nc
             SUBSET   : 12 points (TIME)
             LONGITUDE: 56.3E
             LATITUDE : 51.7N
                         56.3E
                           1
 16-JAN-2006 12 /  1:  0.009994
 15-FEB-2006 00 /  2:  0.009994
 16-MAR-2006 12 /  3:  0.009994
 16-APR-2006 00 /  4:  0.009994
 16-MAY-2006 12 /  5:  0.009994
 16-JUN-2006 00 /  6:  0.009994
 16-JUL-2006 12 /  7:  0.009994
 16-AUG-2006 12 /  8:  0.009994
 16-SEP-2006 00 /  9:  0.009994
 16-OCT-2006 12 / 10:  0.009994
 16-NOV-2006 00 / 11:  0.009994
 16-DEC-2006 12 / 12:  0.009994

Doing something like this might be a workaround for you, but we should also be able to fix this quite easily.

Ansley


On 7/28/2011 8:04 AM, Brockmann Patrick wrote:
Hi all,

I have a problem using the dynamic regidding NRST.
It works with a variable with a 2 year time axis but not
with a variable that has a 1 year time axis.

The goal is to extend yearly values to a variable defined monthly.

Here are the tests made.

$ ferret -script nrst.jnl var_2years.nc
use ($01)
!-> SET DAT/FORM=CDF var_2years.nc

list GPP_YEAR[gt=MONTHLY@NRST]
            VARIABLE : GPP[GT=YEARLY@AVE]
                       regrid: on T@NRST
            FILENAME : var_2years.nc
            SUBSET   : 24 points (TIME)
            LONGITUDE: 56.3E
            LATITUDE : 51.7N
                        56.3E                          1
16-JAN-2005 12 /  1:  0.09577
15-FEB-2005 00 /  2:  0.09577
16-MAR-2005 12 /  3:  0.09577
16-APR-2005 00 /  4:  0.09577
16-MAY-2005 12 /  5:  0.09577
16-JUN-2005 00 /  6:  0.09577
16-JUL-2005 12 /  7:  0.09577
16-AUG-2005 12 /  8:  0.09577
16-SEP-2005 00 /  9:  0.09577
16-OCT-2005 12 / 10:  0.09577
16-NOV-2005 00 / 11:  0.09577
16-DEC-2005 12 / 12:  0.09577
16-JAN-2006 12 / 13:  0.00999
15-FEB-2006 00 / 14:  0.00999
16-MAR-2006 12 / 15:  0.00999
16-APR-2006 00 / 16:  0.00999
16-MAY-2006 12 / 17:  0.00999
16-JUN-2006 00 / 18:  0.00999
16-JUL-2006 12 / 19:  0.00999
16-AUG-2006 12 / 20:  0.00999
16-SEP-2006 00 / 21:  0.00999
16-OCT-2006 12 / 22:  0.00999
16-NOV-2006 00 / 23:  0.00999
16-DEC-2006 12 / 24:  0.00999


$ ferret -script nrst.jnl var_1year.nc
use ($01)
!-> SET DAT/FORM=CDF var_1year.nc

list GPP_YEAR[gt=MONTHLY@NRST]
            VARIABLE : GPP[GT=YEARLY@AVE]
                       regrid: on T@NRST
            FILENAME : var_1year.nc
            SUBSET   : 12 points (TIME)
            LONGITUDE: 59.8E(59.8)
            LATITUDE : 53.4N
                      60E
                       1
16-JAN-2006 12 /  1:....
15-FEB-2006 00 /  2:....
16-MAR-2006 12 /  3:....
16-APR-2006 00 /  4:....
16-MAY-2006 12 /  5:....
16-JUN-2006 00 /  6:....
16-JUL-2006 12 /  7:....
16-AUG-2006 12 /  8:....
16-SEP-2006 00 /  9:....
16-OCT-2006 12 / 10:....
16-NOV-2006 00 / 11:....
16-DEC-2006 12 / 12:....

As you see, all values are set to missing
whereas I expect a variable filled by the yearly value.
Time axis seems to be correct and are defined the same ways.
Tested with ferret 6.67

Patrick



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement