1.6.2.2. showdt.py – Display de time step of netcdf time axis

Usage:
showdt.py [-h] [-t TIME] [-v VNAME] [-u UNITS] [-s STAT] [-f FORMAT]
        ncfile
Description:

Show time step of a netcdf file.

Positional Arguments:
 
ncfile

Netcdf file name

Optional Arguments:
 
-h, --help

show this help message and exit

-t TIME, --time TIME

Name of the time axis variable

-v VNAME, --var VNAME

Name of the variable from which to guess time

-u UNITS, --units UNITS

Units as one of “s” for seconds, “m” for minutes, “h” for hours, “d” for days, “a” for auto (the defaults), and time axis units if empty “”

-s STAT, --stat STAT

Statistics to guess time step, as one of “min”, “max” ,”mean” or “median” (default: median)

-f FORMAT, --format FORMAT

Output format (default: %(value)g %(units)s)

Examples:

These examples are executed from the bin directory of the distribution.

$> showdt.py ../data/mars3d.t.nc
3600 seconds
$> showdt.py -u h --format="Time step in hours: %(value).1f" ../data/mars3d.t.nc
Time step in hours: 1.0