To add time stamp

From: Noel Aloysius <noel.aloysius_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 26 2012 - 08:18:48 MDT

Hi,

I want to add time stamp in a control file that describes a binary file. I
created a script as follows,

How can I replace system("date") in l2 with a fucntion that writes date and
time?

------ begin script

  ; write control file
        l1 = "dset ^" + fnames_out(i)
        l2 = "title - file " + fnames_out(i) + " created by Noel on " +
system("date")
        l3 = "undef -999.000000"
        l4 = "xdef 360 linear 0.500000 1.000000"
        l5 = "ydef 180 linear -89.500000 1.000000"
        l7 = "tdef 708 linear jan1948 1mo"
        l8 = "vars 1"
        l9 = "data 0 99 The data"
        l10 = "endvars"
        str = (/l1,l2,l3,l4,l5,l6,l7,l8,l9,l10/)
        asciiwrite(diri + fnames_out_ctl(i), str)

----- end script

Thanks,
Noel

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 26 08:18:57 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 30 2012 - 09:21:12 MDT