In [1]:
import netCDF4

In [2]:
url='http://geoport-dev.whoi.edu/thredds/dodsC/sand/usgs/users/nganju/portal_runs/chinco_sandy/00_dir.ncml'

In [3]:
nc = netCDF4.Dataset(url)

In [7]:
'Nbed' in nc.dimensions.keys()


Out[7]:
True

In [9]:
ncv = nc.variables

# Get a list of all variables more than 1D.
vars = [var for var, vart in ncv.items() if vart.ndim > 1]

In [22]:
ncv[vars[46]]


Out[22]:
<type 'netCDF4._netCDF4.Variable'>
float64 bustr(ocean_time, eta_u, xi_u)
    long_name: bottom u-momentum stress
    units: newton meter-2
    time: ocean_time
    coordinates: lon_u lat_u ocean_time
    field: bottom u-momentum stress, scalar, series
    _FillValue: 1e+37
    grid: grid
    display: False
    content_coverage_type: modelResult
    location: edge1
unlimited dimensions: 
current shape = (745, 670, 299)
filling off

In [26]:
ncv['bed_thickness'].dimensions


Out[26]:
(u'ocean_time', u'Nbed', u'eta_rho', u'xi_rho')

In [28]:
ncv['bed_thickness'].coordinates+' Nbed'


Out[28]:
u'lon_rho lat_rho ocean_time Nbed'

In [ ]: