NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: generating increasing time

Emanuele,

>Date: Wed, 27 Jun 2001 15:58:54 +0200 (CEST)
>From: emanuele.lombardi@xxxxxxxxxxxxxxxx
>To: netcdfgroup@xxxxxxxxxxxxxxxx
>Subject: generating increasing time
>Keywords: 200106271357.f5RDvh108703

The above message contained the following:

> Hi to everybody!
> 
> My question is probably simple, but I could'nt get an answer.
> 
> I'm making Fortran routines to allow creation & modification of netcdf
> files. The final user will insert the routines into his/her numerical
> model to store resulting data.
> 
> The problem is concerning the TIME axis. I want to define time as
> follows:
>          double time(time) ;
>        time:units = "days since 1900-1-1" ;
> 
> then I want my user to add time interval to the first time value at each
> iteration of the model so that each resulting time can be saved in the
> time variable.
> 
> I don't know how to manage the addition of a time interval to a given
> time value.  I use UDUNITS, but it man (3) page gives no answer to that
> question. Probably the solution is in using  utCalendar and/or
> utInvCalendar, but I need some clarification.

You might be overthinking the problem.

If the time step of the model is 9 minutes (which is 0.00625 days) then,
given the above unit specification, the time variable should contain the
following values:

    Iteration   Value
        1       0.00625
        2       0.0125
        3       0.01875
        ...

Contact me if you have any questions.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>

  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: