Re: time_axis_labels

From: juki juki <juky_emc2_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 18 2012 - 17:46:49 MDT

Thanks for reply Dr. Arindam, I tried as follow: .......    yyyy = data1(:,0)+2000;    mm = data1(:,1);    dd = data1(:,2);    hh = data1(:,3);    minute = fspan(0,0, 744)    second = fspan(0,0, 744)       data=data1(:,4:1203)          time=new(dimsizes(yyyy),double)     time_at_units = "days since 1800-01-01 00:00:00"     do i=0,dimsizes(yyyy)-1        time(i)=cd_inv_calendar(yyyy(i), mm(i),dd(i),hh(i),minute(i),second(i),time_at_units, 0)     end do     data&time=time ....................... However, I got the following error: Argument type mismatch on argument (0) of (cd_inv_calendar)  Thanks again for help, Joeky ________________________________ From: Arindam Chakraborty <arch_at_caos.iisc.ernet.in> To: juki juki <juky_emc2_at_yahoo.com> Cc: NCL Talk <ncl-talk_at_ucar.edu> Sent: Monday, June 18, 2012 8:18 PM Subject: Re: time_axis_labels hi Juki,  use cd_inv_calendar() to do that.  time=new(dimsizes(yyyy),double)  do i=0,dimsizes(yyyy)-1   time(i)=cd_inv_calendar(....)  end do  data&time=time ... On Mon, Jun 18, 2012 at 7:58 AM, juki juki <juky_emc2_at_yahoo.com> wrote: Dear all, > > >I would like to create a hovmollor diagram with time_axis_labels. I plan to use: > > >time_axis_labels( data&time,  res, restick ) >plot = gsn_csm_hov(wks, data, res )            ; default hovmueller > >The data is as follow: > > > >   data1     = asciiread ("data_2011.txt", (/744,1204/), "float") >    >  ; data during December 2011 > > >   yyyy = data1(:,0)+2000   ; now in format 2011 (integer) >   mm = data1(:,1)              ; month in format 12 (integer) >   dd = data1(:,2)                ; days from 1...31 (integer) >   hh = data1(:,3)                ; hours from 0..23 (integer) >     >   data=data1(:,4:1203) >    >   lon       =  fspan(70,130, ncols-4) >   lon!0     = "lon" >   lon_at_units = "degrees_east" > > >Question:   how to convert yyyy, mm, dd, hh to the time that can be used in "time_axis_labels" ? > > > >   > >   data!0    = "time" >   data!1    = "lon" >   data&time  =  time >   data&lon  =  lon >   data_at_long_name = "(a) test data" >   data_at_units     = "K" > > >Thanks for help, >Joeky > >-- >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. >_______________________________________________ >ncl-talk mailing list >List instructions, subscriber options, unsubscribe: >http://mailman.ucar.edu/mailman/listinfo/ncl-talk > >

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 18 17:46:58 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT