CDO#

# Import and initialize
from cdo import Cdo
cdo = Cdo()

# Enable debugging
#cdo.debug = True http://esgf3.dkrz.de/thredds/fileServer/cmip6/CMIP/MPI-M/MPI-ESM1-2-LR/1pctCO2/r1i1p1f1/Omon/tos/gn/v20190710/tos_Omon_MPI-ESM1-2-LR_1pctCO2_r1i1p1f1_gn_185001-186912.nc
# Specify infile
infile = "tos_Omon_MPI-ESM1-2-HR_historical_r1i1p1f1_gn_185001-185412.nc"
infile_path = "/work/ik1017/CMIP6/data/CMIP6/CMIP/MPI-M/MPI-ESM1-2-HR/historical/r1i1p1f1/Omon/tos/gn/v20190710/"
infile_path += infile    

Per default, all cdo calls are in silent mode (command line option -s/--silent) to counter this, specify --verbose as an option. In a future release likely a possiblilty will be added to turn off silent mode.

cdo.sinfoc(input=str(infile_path), options='--verbose')
['File format : NetCDF4 classic zip',
 '-1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Table Code : Extra',
 '1 : unknown  MPI-ESM1.2-HR v instant       1   1    324008   1  F32z :    0   -1    : chunks=802x404x1',
 'Grid coordinates :',
 '1 : curvilinear              : points=324008 (802x404)',
 'longitude : 0.00591556 to 359.9989 degrees_east',
 'latitude : -78.71779 to 89.76312 degrees_north',
 'available : cellbounds',
 'gridID : 29',
 'mapping : undefined',
 'i : 0 to 801 by 1 1',
 'j : 0 to 403 by 1 1',
 'gridID : 28',
 'Vertical coordinates :',
 '1 : surface                  : levels=1',
 'zaxisID : 30',
 'Time coordinate :',
 'time : 60 steps',
 'RefTime =  1850-01-01 00:00:00  Units = days  Calendar = proleptic_gregorian  Bounds = true',
 'YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss',
 '1850-01-16 12:00:00  1850-02-15 00:00:00  1850-03-16 12:00:00  1850-04-16 00:00:00',
 '1850-05-16 12:00:00  1850-06-16 00:00:00  1850-07-16 12:00:00  1850-08-16 12:00:00',
 '1850-09-16 00:00:00  1850-10-16 12:00:00  1850-11-16 00:00:00  1850-12-16 12:00:00',
 '1851-01-16 12:00:00  1851-02-15 00:00:00  1851-03-16 12:00:00  1851-04-16 00:00:00',
 '1851-05-16 12:00:00  1851-06-16 00:00:00  1851-07-16 12:00:00  1851-08-16 12:00:00',
 '1851-09-16 00:00:00  1851-10-16 12:00:00  1851-11-16 00:00:00  1851-12-16 12:00:00',
 '1852-01-16 12:00:00  1852-02-15 12:00:00  1852-03-16 12:00:00  1852-04-16 00:00:00',
 '1852-05-16 12:00:00  1852-06-16 00:00:00  1852-07-16 12:00:00  1852-08-16 12:00:00',
 '1852-09-16 00:00:00  1852-10-16 12:00:00  1852-11-16 00:00:00  1852-12-16 12:00:00',
 '1853-01-16 12:00:00  1853-02-15 00:00:00  1853-03-16 12:00:00  1853-04-16 00:00:00',
 '1853-05-16 12:00:00  1853-06-16 00:00:00  1853-07-16 12:00:00  1853-08-16 12:00:00',
 '1853-09-16 00:00:00  1853-10-16 12:00:00  1853-11-16 00:00:00  1853-12-16 12:00:00',
 '1854-01-16 12:00:00  1854-02-15 00:00:00  1854-03-16 12:00:00  1854-04-16 00:00:00',
 '1854-05-16 12:00:00  1854-06-16 00:00:00  1854-07-16 12:00:00  1854-08-16 12:00:00',
 '1854-09-16 00:00:00  1854-10-16 12:00:00  1854-11-16 00:00:00  1854-12-16 12:00:00']

The same command in the command line

! cdo -v sinfo {infile_path}
 OpenMP:  num_procs=12  max_threads=1
   File format : NetCDF4 classic zip
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter ID : Extra
     1 : unknown  MPI-ESM1.2-HR v instant       1   1    324008   1  F32z : -1             : chunks=802x404x1 
   Grid coordinates :
     1 : curvilinear              : points=324008 (802x404)
                        longitude : 0.00591556 to 359.9989 degrees_east
                         latitude : -78.71779 to 89.76312 degrees_north
                        available : cellbounds
                           gridID : 29
                          mapping : undefined
                                i : 0 to 801 by 1 1
                                j : 0 to 403 by 1 1
                           gridID : 28
   Vertical coordinates :
     1 : surface                  : levels=1
                          zaxisID : 30
   Time coordinate :
                             time : 60 steps
     RefTime =  1850-01-01 00:00:00  Units = days  Calendar = proleptic_gregorian  Bounds = true
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1850-01-16 12:00:00  1850-02-15 00:00:00  1850-03-16 12:00:00  1850-04-16 00:00:00
  1850-05-16 12:00:00  1850-06-16 00:00:00  1850-07-16 12:00:00  1850-08-16 12:00:00
  1850-09-16 00:00:00  1850-10-16 12:00:00  1850-11-16 00:00:00  1850-12-16 12:00:00
  1851-01-16 12:00:00  1851-02-15 00:00:00  1851-03-16 12:00:00  1851-04-16 00:00:00
  1851-05-16 12:00:00  1851-06-16 00:00:00  1851-07-16 12:00:00  1851-08-16 12:00:00
  1851-09-16 00:00:00  1851-10-16 12:00:00  1851-11-16 00:00:00  1851-12-16 12:00:00
  1852-01-16 12:00:00  1852-02-15 12:00:00  1852-03-16 12:00:00  1852-04-16 00:00:00
  1852-05-16 12:00:00  1852-06-16 00:00:00  1852-07-16 12:00:00  1852-08-16 12:00:00
  1852-09-16 00:00:00  1852-10-16 12:00:00  1852-11-16 00:00:00  1852-12-16 12:00:00
  1853-01-16 12:00:00  1853-02-15 00:00:00  1853-03-16 12:00:00  1853-04-16 00:00:00
  1853-05-16 12:00:00  1853-06-16 00:00:00  1853-07-16 12:00:00  1853-08-16 12:00:00
  1853-09-16 00:00:00  1853-10-16 12:00:00  1853-11-16 00:00:00  1853-12-16 12:00:00
  1854-01-16 12:00:00  1854-02-15 00:00:00  1854-03-16 12:00:00  1854-04-16 00:00:00
  1854-05-16 12:00:00  1854-06-16 00:00:00  1854-07-16 12:00:00  1854-08-16 12:00:00
  1854-09-16 00:00:00  1854-10-16 12:00:00  1854-11-16 00:00:00  1854-12-16 12:00:00
cdo    sinfo: Processed 1 variable over 60 timesteps [0.09s 137MB].