Did you look the File I/O examples or the string functions?
ncl 1> date = "2012-07-07 00:15:00+00"
ncl 2> delim = "- :+"
ncl 3> nfld = str_fields_count(date,delim)
ncl 4> print("nfld="+nfld)
ncl 5> year = str_get_field(date, 1, delim) ; type string
For integer, use 'toint'
year = toint( str_get_field(date, 1, delim) ) ; type integer
--- http://www.ncl.ucar.edu/Document/Functions/ Under "General NCL routines" click 'String' http://www.ncl.ucar.edu/Applications/ Under 'File I/O" click 'Read CSV Files' On 12/10/13, 11:08 PM, sangeeta maharjan wrote: > Hello NCL Users, > > Our meteorological station stores data in csv format. It stores data > in the interval of 15 minutes . The stored dates are 2012-07-07 > 00:15:00+00, 2012-07-07 00:30:00+00, 2012-07-07 00:45:00+00, > 2012-07-07 01:00:00+00 type. > > I need to extract year, month, day, hour and minutes seperately. > > > I would appreciate any help on it. > > Thanks. > Sangeeta Maharjan. > _______________________________________________ > 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-talkReceived on Wed Dec 11 07:10:43 2013
This archive was generated by hypermail 2.1.8 : Fri Dec 13 2013 - 11:39:30 MST