ioos / notebooks_demos

Notebook demonstrations and examples
https://ioos.github.io/notebooks_demos/
MIT License
19 stars 19 forks source link

SABGOM_Forecast_Model_Run_Collection_best is returning an IndexError #294

Closed ocefpaf closed 6 years ago

ocefpaf commented 6 years ago

Example 2016-11-16-CF-UGRID-SGRID-conventions.ipynb is failing when downloading data from

http://omgsrv1.meas.ncsu.edu:8080/thredds/dodsC/fmrc/sabgom/SABGOM_Forecast_Model_Run_Collection_best.ncd.html

Here is a sscce that reproduces the problem:

import netCDF4
print(netCDF4.__version__)

url = 'http://omgsrv1.meas.ncsu.edu:8080/thredds/dodsC/fmrc/sabgom/SABGOM_Forecast_Model_Run_Collection_best.ncd'
standard_name='sea_water_potential_temperature'

with netCDF4.Dataset(url) as nc:
    temp = nc.get_variables_by_attributes(
        standard_name=standard_name
    )
    T = temp[0]
    print(T.shape)
    T[-1, -1, :, :]

@rsignell-usgs do you know what may be the cause?

See http://nbviewer.jupyter.org/gist/ocefpaf/0fb928736bb84528d9e6746c03a63af4

PS: I did try all previous versions of netCDF4 I could, all failed :unamused:

ocefpaf commented 6 years ago

Closing this b/c I replaced SABGOM with ESPRESSOClosing this b/c I replaced SABGOM with ESPRESSO. The indexing issue remains.