Re: [netcdfgroup] OPeNDAP support for the Python netcdf4 package on Windows

  • To: Christoph Gohlke <cgohlke@xxxxxxx>
  • Subject: Re: [netcdfgroup] OPeNDAP support for the Python netcdf4 package on Windows
  • From: Rich Signell <rsignell@xxxxxxxx>
  • Date: Fri, 5 Aug 2011 07:14:31 -0400
Chris,
Awesome.   I grabbed your win32 executable for Python 2.6
netCDF4-0.9.6.win32-py2.6.‌exe
ran it, and now Python(x,y) can access data from OPeNDAP using NetCDF4!

>>> import netCDF4
>>> nc = 
>>> netCDF4.Dataset('http://megara.tamu.edu:8080/thredds/dodsC/mch_outputs/ngom_24h/mch_his_ngom_24h_2008.nc')
>>> nc
<netCDF4.Dataset object at 0x02A588F0>
>>> salt = nc.variables['salt'][1, :, 25, 60]
>>> salt
array([ 35.30977631,  35.30978775,  35.30978394,  35.30976486,
        35.30973434,  35.30968094,  35.3095665 ,  35.30927658,
        35.30861664,  35.3080864 ,  35.30773926,  35.30751038,
        35.30738449,  35.30732346,  35.30728531,  35.30726624,
        35.30725479,  35.30724335,  35.3072319 ,  35.30722046,
        35.30721664,  35.30720901,  35.3072052 ,  35.3072052 ,
        35.3072052 ,  35.3072052 ,  35.30720901,  35.30721283,
        35.30721664,  35.30722809], dtype=float32)
>>>

Fantastic!

Thank you so much for the great service you are providing to the community!

-Rich

On Thu, Aug 4, 2011 at 10:16 PM, Christoph Gohlke <cgohlke@xxxxxxx> wrote:
>
>
> On 8/4/2011 4:33 AM, Rich Signell wrote:
>>
>> Folks,
>>
>> Most folks on Windows systems who want to do scientific computing in
>> Python will use the Enthought distribution
>> (http://www.enthought.com/products/epd.php) or the Python(x,y)
>> distribution (http://www.pythonxy.com).
>>
>> Both include the wonderful NetCDF4-python library
>> (http://code.google.com/p/netcdf4-python/), but sadly, neither one has
>> the built-in opendap support that is possible with NetCDF4.   (The
>> Enthought packages for Linux and Mac *do* have OPeNDAP support in the
>> NetCDF4 library, just not on Windows).
>>
>> I know there are other ways to get opendap support in Python, but it
>> seems like this should be relatively easy fix.   In the Python(x,y)
>> distribution, I see these .dlls:
>> HDF5_HLDLL.DLL
>> HDF5DLL.DLL
>> NETCDF.DLL
>> SZ.DLL
>> ZLIB1.DLL
>>
>> Has anyone solved this problem?
>>
>> It would be great to get NetCDF4 working with OpenDAP for Python users
>> on Windows.
>>
>> Thanks,
>
>
> AFAICT EPD and Pythonxy repackage the content from the NetCDF4-python
> windows installers at <http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4>.
> I just updated those builds with DAP support using the bsd-xdr-1.0.0 and
> curl-7.20.1 libraries.
>
> Christoph
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/



-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598



  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: