Actions

NetCDF time coordinate

From BAWiki


Introduction

Date, time and calendar plus (optional) use of time intervals.

Time information in a netCDF file

Dimensions

dimensions:

time = number of time steps or UNLIMITED;
bnd = 2 ;

Comment: In case the number of time steps is known before-hand, Bert Jagers (Deltares) recommends to use a fixed length instead of an UNLIMITED dimension due to performace reasons. But this only works for variables not exceeding 4 GiB.

Variables

Coordinate time

double time(time) ;

time:standard_name = "time" ;
time:long_name = "time" ;
time:units = "time units since YYYY-MM-DD hh:mm:ss zone" ;
time:axis = "T"
time:calendar = "gregorian"
time:bounds = "timebnd"

Comment:

  • For time units the following units are common:
    1. seconds,
    2. minutes,
    3. hours, and
    4. days.
  • Specification of zone is optional (default is UTC). Some examples for other time zones:
    1. zone = +1:00 for CET (Central European Time), or
    2. zone = +2:00 for CEST (Central European Summer Time).
  • Attribute bounds must be specified, in case (some) data are e.g. mean or integral (sum) values with respect to time. Examples: Daily mean temperature, daily rainfall. These data must possess attribute cell_methods with e.g. "time: mean" or "time: sum". See also CF Conventions "cell_methods".

Time intervals

double timebnd(time,bnd) ;

Comment:

  • timebnd(n,1) is equivalent to the lower bound for the n-th time step.
  • timebnd(n,2) is equivalent to the upper bound for the n-th time step.
  • Subsequent intervals may not be continous.
  • For continuous intervals timebnd(n,2) == timebnd(n+1,1) holds.

Remarks

  • A double precision variable should be used for time to guarantee sufficient accuracy..

back to NetCDF


Overview