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>