NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [thredds] NetCDF Access failure with python in ubuntu

  • To: "TANGJian@tanguy2200.gmail" <tanguy2200@xxxxxxxxx>
  • Subject: Re: [thredds] NetCDF Access failure with python in ubuntu
  • From: Sean Arms <sarms@xxxxxxxx>
  • Date: Tue, 26 May 2020 06:24:33 -0600
Greetings,

My guess is that the unencoded square brackets are the problem. I believe
this was fixed in netCDF-C last summer - what version of netCDF-C are you
using in your python environment on the Ubuntu and Windows machines?

Sean


On Fri, May 22, 2020 at 6:55 AM TANGJian@tanguy2200.gmail <
tanguy2200@xxxxxxxxx> wrote:

> Hi there,
>
> I googled and find the similar problem 
> here.(https://www.unidata.ucar.edu/mailing_lists/archives/thredds/2019/msg00001.html)
>
> code is as follows:
> ##
> import xarray as xr
> files='http://thredds.atmos.albany.edu:8080/thredds/dodsC/CFSR/2016/u.2016.0p5.anl.nc'
> data = xr.open_dataset(files,cache=False,engine='netcdf4')
> data['u'][0,0,0,0].values
> ##
>
> xarray version 0.15.1
> in ubuntu, failed with NetCDF Access failure
> and I use echo "HTTP.VERBOSE=1" > .dodsrc to show the URL as you guys told in 
> previous
>
> * Hostname thredds.atmos.albany.edu was found in DNS cache
> *   Trying 169.226.115.34...
> * TCP_NODELAY set
> * Connected to thredds.atmos.albany.edu (169.226.115.34) port 8080 (#14)
> > GET /thredds/dodsC/CFSR/2016/u.2016.0p5.anl.nc.dods?u.u[0][0][0][0] HTTP/1.1
> Host: thredds.atmos.albany.edu:8080
>
> it appears to send [] to server.
> So is this the problem? how can I bypass this?
>
> But why the same code works fine on my windows machine?
> Thank you very much!
>
> _______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
>
>
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> https://www.unidata.ucar.edu/mailing_lists/
>
  • 2020 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: