[Thread Prev][Thread Next][Index]
Re: change T-axis
Hi Gao Rongzhen,
You need to assign a new time axis for that variable.
You can assign a new time axis in two ways: 1) define a new time axis
and use regridding utilities (like @ASN), 2) use RESHAPE function to
change the grid of a the variable to that of a second variable. I think
the second method will be more flexible. Please refer user manual ( @ASN:
Ch4 Sec2.4.1. Regridding transformations , RESHAPE:Ch3 Sec2.3.23.
RESHAPE )
for details. Here is an example using monthly_navy_winds dataset with
neccessary details. If you need any mode clarification please let me know.
With Regards
Jaison
!--------example.jnl---------------------
set data monthly_navy_winds ! dataset available with Ferret
let l_lo = 13 ! low value for L
let l_hi = 120 ! high value for L
let u = uwnd[d=1,l=`l_lo`:`l_hi`] ! extract the subset data
! now extract the time values corresponding to the subset; needed
! only if the original variable is on a calendar time axis
let t_data = T[gt=uwnd,l=`l_lo`:`l_hi`]
! get other details about the original time axis
define symbol t_units = `u,r=TUNITS` ! time units (days/hours...)
define symbol t_zero = `u,r=T0` ! Ref. time
define symbol t_cal = `u,r=CALENDAR` ! calendar type
! define a destination time axis with these details
define axis/t/T0="($t_zero)"/units=($t_units)/CALENDAR=($t_cal)/\
from_data tsub=t_data
! suppose your original variable is not on a "CALENDAR" time
! axis, then just after extracting the subset, define an abstract "T"
! axis like
! yes? define axis/t=1:`l_hi-l_lo+1`:1 tsub
! and use this in the following sequence of commands
! create a new variable "t_stamp" on the destination grid with XYT grid
! put + Z[gz=u]*0 if needed
let t_stamp = X[gx=u]*0 + Y[gy=u]*0 + T[gt=tsub] ! destination grid
let u_t = RESHAPE(u,t_stamp) ! put variable on the destination grid
! comparison
list/x=60/y=10/l=1:20 u
list/x=60/y=10/l=1:20 u_t
plot/x=60/y=10 u_t, u
! now you can use u_t ; for u_t "/L=1" ==> first point on time axis
!---------end of example.jnl----------------------------
On Wed, 5 Jan 2005, [gb2312] ������ wrote:
> Hi, all
>
> I have a time series with length N=191.
> And now, i want to select part of the data from N=13 to 191 to form a new variable.
> By, let ccoral=coral[d=1,l=13:191]
> Now, list/l=1:20 ccoral
> The information shown on the screen is as below:
> ------------------------------------------------------------
> VARIABLE : CORAL[D=sst4503-9211s.asc,L=13:191]
> SUBSET : 8 points (TIME)
> 13: 0.4100
> 14: -0.0900
> 15: -0.8500
> 16: -0.2800
> 17: -0.2700
> 18: 0.0500
> 19: -0.2800
> 20: 0.3300
> ------------------------------------------------------------
> My problem is the defination of T-axis of the new variable.
> What i wanted is the first value of ccoral starts from L=1 not from L=13, and the last value ends with L=179 not with L=191. Is there a way by Ferret to change the T-axis of the new variable ccoral?
>
> Thanks in advance.
>
> Gao Rongzhen
>
--
___________________________________________________
Jaison Kurian
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3942505
+91-80-3600450
Fax:+91-80-3600865
___________________________________________________
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement