[Thread Prev][Thread Next][Index]

Re: [ferret_users] time axis in seconds

Hello Ansley
                    Is there any way we can simply plot just the variable as such,without making an _expression_. My time axis got 120points. I made a plot in GMT using the same data,actually i would like to draw the plot like that.

On Tue, Mar 31, 2015 at 10:47 PM, Ansley Manke <ansley.b.manke@xxxxxxxx> wrote:
How many time points are in your input data?  If there are 121, then you will need to make sure the length of the axis that you define is the same as what what is in the ascii file.

For DEFINE AXIS, use either the qualifier /NPOINT=, or a delta-time on the /T=start:end:delta, but not both. The /NPOINTS=120 qualifier takes precedence over the delta-time on the /T=start:end:delta qualifier,  but the axis using those endpoints and a 30-second interval does not have 120 points but 119.
yes? define axis/t="01-jul-2014:05:30:16":"01-jul-2014:06:29:16":30/units=seconds taxis
yes? list/l=1:10 t[gt=taxis
             VARIABLE : T
                        axis TAXIS
             SUBSET   : 10 points (TIME)
 01-JUL-2014 05:30:16 /  1:  3.580E+09
 01-JUL-2014 05:30:46 /  2:  3.580E+09
 01-JUL-2014 05:31:16 /  3:  3.580E+09
 01-JUL-2014 05:31:46 /  4:  3.580E+09
 01-JUL-2014 05:32:16 /  5:  3.580E+09
 01-JUL-2014 05:32:46 /  6:  3.580E+09
 01-JUL-2014 05:33:16 /  7:  3.580E+09
 01-JUL-2014 05:33:46 /  8:  3.580E+09
 01-JUL-2014 05:34:16 /  9:  3.580E+09
 01-JUL-2014 05:34:46 / 10:  3.580E+09

yes? show axis taxis
 name       axis              # pts   start                end
 TAXIS     TIME               119 r   01-JUL-2014 05:30    01-JUL-2014 06:29
T0 = 15-JAN-1901
   Axis span (to cell edges) = 3570
and finally, make the time origin more recent than the default. The graphics package seems to have some trouble with the precision needed to represent seconds since the default start date in 1901.

I can make this plot, just defining an _expression_ for the variable.

yes? define axis/t="01-jul-2014:05:30:16":"01-jul-2014:06:29:16":30/units=seconds/t0="1-jul-2014:00:00:00" taxis
yes? define axis/z=0.269813:24.9727:0.0299428934/units=km zaxis
yes? let zt = L[gt=taxis] + z[gz=zaxis]
yes? shade zt

On 3/31/2015 5:10 AM, chinnu sachi wrote:
Dear ferret users
                    I had an ascii data file with time ranging from 01-july-2014 05:30:16 to 01-july-2014 06:29:16, with a 30seconds interval. I want to make this into nc file,for that i run the jnl file below.

define axis/x/units=degree_east xaxis={73.5}
define axis/y/units=degrees_north yaxis={15.5}
define axis/z=0.269813:24.9727:0.0299428934/units=km zaxis
set mode calendar:seconds
define axis/t="01-jul-2014:05:30:16":"01-jul-2014:06:29:16":30/np=120/units=sec taxis
!define axis/t=1:121:1 taxis
define grid/x=xaxis/y=yaxis/z=zaxis/t=taxis ab_grid
file/grid=ab_grid/var="cof" outputdata.txt
set variable/bad=-999 cof
save/file=ratio1.nc cof
cancel var/all;cancel data/all

When i executes the above program it runs perfectly and creates the nc file. But when I use the file to plot, the time axis is not coming properly,but the vertical axis is coming perfectly. I am attaching the figure also.
Thanks in advance

Chinnu Sachidanandan
National Institute of Oceanography

Chinnu Sachidanandan
Physical Oceanography Division
National Institute of Oceanography

Attachment: output.ps
Description: PostScript document

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

Privacy Policy | Disclaimer | Accessibility Statement