[Thread Prev][Thread Next][Index]

Re: [ferret_users] regriding from discontinuous time axis



Hi Bruno,

If you define a continuous grid which contains the original points as a
subset you can use the @XACT remapping. In your example this would
require a time grid with intervals of half a day.

Def Axis/T=01-JAN-2000:13-JAN-2000:0.5/Units=days/T0=1-JAN-2000
my_axis_1dAV_half

Plot /Over /Line /Sym=20 /Co=2 var_regrid[ GT=my_axis_1dAV_half@XACT ]

To go to a daily grid I think remapping in 2 steps may be what you want

! Data at half day intervals. Missing vals if we don't match.
let tempvar_half = var_regrid[ GT=my_axis_1dAV_half@XACT ]
! Average onto a daily grid.
let tempvar_full = tempvar_half [ GT=my_axis_1dAV@AVE ] 

Russ


On Fri, 2012-09-07 at 18:39 +1000, Bruno Levier wrote:
> Hi Ferreters
> 
> I would like to regrid a variable on a new time axis. The problem is 
> that the source grid is discontinuous (with gaps of several days) ; the 
> tranformation fills the gap with interpolated or averaged values 
> (depending of the transformation used). Is it possible to avoid this 
> behaviour (I mean fill the gap with missing values) ?
> 
> Here is an example :
> ! Discontinuous time axis from January 1 to January 12 (no values from 3 
> to 10)
> Let time = {0,0.5,1.0,1.5,2.0,10.0,10.5,11.0,11.5,12.0}
> Define Axis /T /From /T0=1-JAN-2000 /Units=days my_axis = time
> 
> Let var = TSEQUENCE( RANDU( time ) )
> Let fake_var = T[GT=my_axis]
> Let var_regrid = RESHAPE( var, fake_var )
> 
> ! New time axis
> Define Axis /T=01-JAN-2000:13-JAN-2000:1 /Units=days /T0=1-JAN-2000 
> my_axis_1dAV
> 
> Plot /Line /Sym=18 var_regrid
> ! Now each day has a good value
> Plot /Over /Line /Sym=20 /Co=2 var_regrid[ GT=my_axis_1dAV@AVE ]
> 
> Thanks !
> 
> Bruno
> 




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

Privacy Policy | Disclaimer | Accessibility Statement