Re: Time

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 29 2009 - 10:43:28 MDT

Hi Lara,

You could use...

iseed = systemfunc("date '+%s'")

...and then use iseed to seed your random number generator. Note that this returns a granularity of only seconds.

Hope this helps,
Oli
 
________________________________________

Oliver Fuhrer
Numerical Models

Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 93 59
Fax +41 44 256 92 78
oliver.fuhrer@meteoswiss.ch
www.meteoswiss.ch - First-hand information
  
 

> -----Original Message-----
> From: ncl-talk-bounces@ucar.edu
> [mailto:ncl-talk-bounces@ucar.edu] On Behalf Of Lara O. Delirio
> Sent: Donnerstag, 29. Oktober 2009 17:39
> To: Michael Notaro
> Cc: ncl-talk@ucar.edu
> Subject: Re: Time
>
> But I need one that returns only the current time to set the
> seed diferently every time I execute the program; that way I
> can always generate a random number.
>
>
> On Thu, Oct 29, 2009 at 11:28 AM, Michael Notaro
> <mnotaro@wisc.edu> wrote:
>
>
> system("date")
>
> On Oct 29, 2009, at 9:24 AM, Lara O. Delirio wrote:
>
>
> Hi guys, is there any function that returns
> the actual time? I've looked but I couldnt find it.
>
>
> thanks
>
> --
> Lara O. Delirio
> Percomp - Embedded (http://embedded.ufcg.edu.br/)
> Graduação Ciência da Computação
> (http://www.ccc.ufcg.edu.br)
> Universidade Federal de Campina Grande
> (http://www.ufcg.edu.br/)
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
>
> --
> Lara O. Delirio
> Percomp - Embedded (http://embedded.ufcg.edu.br/)
> Graduação Ciência da Computação (http://www.ccc.ufcg.edu.br)
> Universidade Federal de Campina Grande (http://www.ufcg.edu.br/)
>
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 29 10:43:13 2009

This archive was generated by hypermail 2.1.8 : Mon Nov 02 2009 - 08:49:47 MST