[Thread Prev][Thread Next][Index]

Re: [ferret_users] Assign time to data



Hi Nadia,
A time axis needs several pieces of information, the time coordinates (here, that's just 1, 2, 3, ...), the time units (months), and the time origin - time in time-units since some date.

You need to define a time axis that represents the time information correctly, and then regrid the data to that axis, using the @ASN regridding transformation to just assign each point in the time direction to the new axis.  (For some axes, you could use SET AXIS to give the existing time axis the right units and time origin.  But this is "months", and monthly axes need some special care because months are of different lengths.)

Have a look at this example from the documentation about defining a true monthly calendar.
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/DEFINE#_VPINDEXENTRY_1310

It shows how to define the axis so that the months defined so that the time coordinates fall at the middle of the month, which is what you want.  Once you have defined your time axis, you can

   yes? let var_on_months = variable[gt=monthly_axis@ASN]


Ansley





On 1/21/2015 11:20 PM, nadia rehman wrote:
Dear users,

I have a data in which there is no time assigned to each month and is like below:
1 /    1:  2.021
2 /    2:  0.611
3 /    3:  0.602
4/    4:  0.961
5/    5:  1.688
6 /    6:  1.883
7/    7:  2.379
8/    8:  3.200
9/    9:  5.029
10/   10:  3.289
11 /   11:  1.666
12 /   12:  2.015
13 /   13:  1.712

I want to assign time to data like below:

Time                   #      Variable

16-DEC-1859 /    1:  2.021
16-JAN-1860 /    2:  0.611
 16-FEB-1860 /    3:  0.602
 16-MAR-1860 /    4:  0.961
 16-APR-1860 /    5:  1.688
 16-MAY-1860 /    6:  1.883
 16-JUN-1860 /    7:  2.379
 16-JUL-1860 /    8:  3.200
 16-AUG-1860 /    9:  5.029
 16-SEP-1860 /   10:  3.289
 16-OCT-1860 /   11:  1.666
 16-NOV-1860 /   12:  2.015
 16-DEC-1860 /   13:  1.712
 16-JAN-1861 /   14:  1.417
 16-FEB-1861 /   15:  1.090
 
Please help me for this...

Regards

--
Nadia Rehman
Scientific Officer (Climate Section)
Global Change Impact Studies Centre
National Centre for Physics Complex
Near Quaid-i-Azam University Campus
Shahdra Road
Islamabad, Pakistan
Ph :   92-51-9230226


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

Privacy Policy | Disclaimer | Accessibility Statement