SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: John <was...@gm...> - 2010年10月30日 09:42:04
I've searched through the netcdf4-python trunk, but I find no
reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
modules use it.
For compatibility with my old scripts, is it safe to simply:
from netCDF4 import Dataset as NetCDFFile
??
Thanks,
john
From: Jeff W. <js...@fa...> - 2010年10月30日 13:08:58
 On 10/30/10 3:41 AM, John wrote:
> I've searched through the netcdf4-python trunk, but I find no
> reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
> modules use it.
>
> For compatibility with my old scripts, is it safe to simply:
>
> from netCDF4 import Dataset as NetCDFFile
>
> ??
>
> Thanks,
> john
>
John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you 
the impression they did? There is a 'NetCDFFile' in function in 
basemap, but it is based on the pure-python netCDF module pupynere. It 
doesn't support netcdf-4 and I only recommend using it for the 
occasional light use.
The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF, 
so if you have old script that use the latter, you can try:
from netCDF4 import Dataset as NetCDFFile
The docs for netcdf4-python are at
http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
-Jeff
From: John <was...@gm...> - 2010年10月30日 23:06:06
Thank you. I didn't think they used it, I just wanted to know if it
was safe to do what you suggested to try. It does seem to work.
Another question, can netcd4-python READ HDF files? Or is it just that
it creates files that are readable? If it's the latter, does anyone
have a suggestion for a python module that can read both hdf4 and
hdf5??
Thank you,
john
PS: Jeff, this module seems to work very well! And I am very thankful
for the introduction of compression.
On Sat, Oct 30, 2010 at 2:55 PM, Jeff Whitaker <js...@fa...> wrote:
> On 10/30/10 3:41 AM, John wrote:
>> I've searched through the netcdf4-python trunk, but I find no
>> reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
>> modules use it.
>>
>> For compatibility with my old scripts, is it safe to simply:
>>
>> from netCDF4 import Dataset as NetCDFFile
>>
>> ??
>>
>> Thanks,
>> john
>>
> John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you
> the impression they did? There is a 'NetCDFFile' in function in
> basemap, but it is based on the pure-python netCDF module pupynere. It
> doesn't support netcdf-4 and I only recommend using it for the
> occasional light use.
>
> The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF,
> so if you have old script that use the latter, you can try:
>
> from netCDF4 import Dataset as NetCDFFile
>
> The docs for netcdf4-python are at
>
> http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
>
>
> -Jeff
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Configuration
``````````````````````````
Plone 2.5.3-final,
CMF-1.6.4,
Zope (Zope 2.9.7-final, python 2.4.4, linux2),
Python 2.6
PIL 1.1.6
Mailman 2.1.9
Postfix 2.4.5
Procmail v3.22 2001年09月10日
Basemap: 1.0
Matplotlib: 1.0.0
From: Jeff W. <js...@fa...> - 2010年10月31日 00:53:27
On 10/30/10 5:05 PM, John wrote:
> Thank you. I didn't think they used it, I just wanted to know if it
> was safe to do what you suggested to try. It does seem to work.
>
> Another question, can netcd4-python READ HDF files? Or is it just that
> it creates files that are readable? If it's the latter, does anyone
> have a suggestion for a python module that can read both hdf4 and
> hdf5??
>
> Thank you,
> john
>
>
> PS: Jeff, this module seems to work very well! And I am very thankful
> for the introduction of compression.
John: If you enabled hdf4 support when you built the netcdf lib, it will 
read hdf4 files in 'scientific dataset' files.
-Jeff
>
>
> On Sat, Oct 30, 2010 at 2:55 PM, Jeff Whitaker<js...@fa...> wrote:
>> On 10/30/10 3:41 AM, John wrote:
>>> I've searched through the netcdf4-python trunk, but I find no
>>> reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
>>> modules use it.
>>>
>>> For compatibility with my old scripts, is it safe to simply:
>>>
>>> from netCDF4 import Dataset as NetCDFFile
>>>
>>> ??
>>>
>>> Thanks,
>>> john
>>>
>> John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you
>> the impression they did? There is a 'NetCDFFile' in function in
>> basemap, but it is based on the pure-python netCDF module pupynere. It
>> doesn't support netcdf-4 and I only recommend using it for the
>> occasional light use.
>>
>> The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF,
>> so if you have old script that use the latter, you can try:
>>
>> from netCDF4 import Dataset as NetCDFFile
>>
>> The docs for netcdf4-python are at
>>
>> http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
>>
>>
>> -Jeff
>>
>>
>> ------------------------------------------------------------------------------
>> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
>> Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
>> 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing
>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>> http://p.sf.net/sfu/nokia-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
From: John <was...@gm...> - 2010年10月31日 11:44:39
Jeff,
I just built netcdf with the following script:
#!/bin/bash
./configure --enable-netcdf-4 --enable-hdf4 --enable-hdf4-file-tests
--enable-pnetcdf --enable-cxx-4 --with-hdf5=/flex_wrk/lib64
--enable-shared --prefix=/flex_wrk/lib64
make
make install
Everything seemed to work fine.
I then rebuilt netcdf4-python and got no errors.
IE:
export HDF5_DIR=/flex_wrk/lib64
export NETCDF4_DIR=/flex_wrk/lib64
python setup.py build
python setup.py install --prefix=/custom...
However, when I try to read a hdf4 file in Ipython I get:
In [1]: from netCDF4 import Dataset as NetCDFFile
In [2]: nci = NetCDFFile('scia_200910.hdf')
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/xnilu_wrk/flex_wrk/EMISSIONS/<ipython console> in <module>()
/xnilu_wrk/flex_wrk/bin64/site-packages/netCDF4.so in
netCDF4.Dataset.__init__ (netCDF4.c:6336)()
RuntimeError: Attempt to use feature that was not turned on when
netCDF was built.
What is it that I need to do to 'build' netCDF and netcdf4-python with
the support?
Thank you,
john
On Sun, Oct 31, 2010 at 2:53 AM, Jeff Whitaker <js...@fa...> wrote:
> On 10/30/10 5:05 PM, John wrote:
>>
>> Thank you. I didn't think they used it, I just wanted to know if it
>> was safe to do what you suggested to try. It does seem to work.
>>
>> Another question, can netcd4-python READ HDF files? Or is it just that
>> it creates files that are readable? If it's the latter, does anyone
>> have a suggestion for a python module that can read both hdf4 and
>> hdf5??
>>
>> Thank you,
>> john
>>
>>
>> PS: Jeff, this module seems to work very well! And I am very thankful
>> for the introduction of compression.
>
> John: If you enabled hdf4 support when you built the netcdf lib, it will
> read hdf4 files in 'scientific dataset' files.
>
> -Jeff
>>
>>
>> On Sat, Oct 30, 2010 at 2:55 PM, Jeff Whitaker<js...@fa...> wrote:
>>>
>>> On 10/30/10 3:41 AM, John wrote:
>>>>
>>>> I've searched through the netcdf4-python trunk, but I find no
>>>> reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
>>>> modules use it.
>>>>
>>>> For compatibility with my old scripts, is it safe to simply:
>>>>
>>>> from netCDF4 import Dataset as NetCDFFile
>>>>
>>>> ??
>>>>
>>>> Thanks,
>>>> john
>>>>
>>> John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you
>>> the impression they did? There is a 'NetCDFFile' in function in
>>> basemap, but it is based on the pure-python netCDF module pupynere. It
>>> doesn't support netcdf-4 and I only recommend using it for the
>>> occasional light use.
>>>
>>> The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF,
>>> so if you have old script that use the latter, you can try:
>>>
>>> from netCDF4 import Dataset as NetCDFFile
>>>
>>> The docs for netcdf4-python are at
>>>
>>> http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
>>>
>>>
>>> -Jeff
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Nokia and AT&T present the 2010 Calling All Innovators-North America
>>> contest
>>> Create new apps& games for the Nokia N8 for consumers in U.S. and
>>> Canada
>>> 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in
>>> marketing
>>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>>> http://p.sf.net/sfu/nokia-dev2dev
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
>>
>
>
-- 
Configuration
``````````````````````````
Plone 2.5.3-final,
CMF-1.6.4,
Zope (Zope 2.9.7-final, python 2.4.4, linux2),
Python 2.6
PIL 1.1.6
Mailman 2.1.9
Postfix 2.4.5
Procmail v3.22 2001年09月10日
Basemap: 1.0
Matplotlib: 1.0.0
From: Jeff W. <js...@fa...> - 2010年10月31日 12:46:54
On 10/31/10 5:44 AM, John wrote:
> Jeff,
>
> I just built netcdf with the following script:
>
> #!/bin/bash
>
> ./configure --enable-netcdf-4 --enable-hdf4 --enable-hdf4-file-tests
> --enable-pnetcdf --enable-cxx-4 --with-hdf5=/flex_wrk/lib64
> --enable-shared --prefix=/flex_wrk/lib64
> make
> make install
John: You forget --with-hdf4=<where hdf4 is installed>.
-Jeff
>
> Everything seemed to work fine.
>
> I then rebuilt netcdf4-python and got no errors.
> IE:
> export HDF5_DIR=/flex_wrk/lib64
> export NETCDF4_DIR=/flex_wrk/lib64
> python setup.py build
> python setup.py install --prefix=/custom...
>
> However, when I try to read a hdf4 file in Ipython I get:
> In [1]: from netCDF4 import Dataset as NetCDFFile
>
> In [2]: nci = NetCDFFile('scia_200910.hdf')
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call last)
>
> /xnilu_wrk/flex_wrk/EMISSIONS/<ipython console> in<module>()
>
> /xnilu_wrk/flex_wrk/bin64/site-packages/netCDF4.so in
> netCDF4.Dataset.__init__ (netCDF4.c:6336)()
>
> RuntimeError: Attempt to use feature that was not turned on when
> netCDF was built.
>
>
> What is it that I need to do to 'build' netCDF and netcdf4-python with
> the support?
>
> Thank you,
> john
>
>
> On Sun, Oct 31, 2010 at 2:53 AM, Jeff Whitaker<js...@fa...> wrote:
>> On 10/30/10 5:05 PM, John wrote:
>>> Thank you. I didn't think they used it, I just wanted to know if it
>>> was safe to do what you suggested to try. It does seem to work.
>>>
>>> Another question, can netcd4-python READ HDF files? Or is it just that
>>> it creates files that are readable? If it's the latter, does anyone
>>> have a suggestion for a python module that can read both hdf4 and
>>> hdf5??
>>>
>>> Thank you,
>>> john
>>>
>>>
>>> PS: Jeff, this module seems to work very well! And I am very thankful
>>> for the introduction of compression.
>> John: If you enabled hdf4 support when you built the netcdf lib, it will
>> read hdf4 files in 'scientific dataset' files.
>>
>> -Jeff
>>>
>>> On Sat, Oct 30, 2010 at 2:55 PM, Jeff Whitaker<js...@fa...> wrote:
>>>> On 10/30/10 3:41 AM, John wrote:
>>>>> I've searched through the netcdf4-python trunk, but I find no
>>>>> reference of NetCDFFile as in how the basemap or Scientific.IO.NetCDF
>>>>> modules use it.
>>>>>
>>>>> For compatibility with my old scripts, is it safe to simply:
>>>>>
>>>>> from netCDF4 import Dataset as NetCDFFile
>>>>>
>>>>> ??
>>>>>
>>>>> Thanks,
>>>>> john
>>>>>
>>>> John: Neither basemap or Scientific.IO.NetCDF uses it. What gave you
>>>> the impression they did? There is a 'NetCDFFile' in function in
>>>> basemap, but it is based on the pure-python netCDF module pupynere. It
>>>> doesn't support netcdf-4 and I only recommend using it for the
>>>> occasional light use.
>>>>
>>>> The netcdf4-python API is mostly compatible with Scientific.IO.NetCDF,
>>>> so if you have old script that use the latter, you can try:
>>>>
>>>> from netCDF4 import Dataset as NetCDFFile
>>>>
>>>> The docs for netcdf4-python are at
>>>>
>>>> http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
>>>>
>>>>
>>>> -Jeff
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Nokia and AT&T present the 2010 Calling All Innovators-North America
>>>> contest
>>>> Create new apps& games for the Nokia N8 for consumers in U.S. and
>>>> Canada
>>>> 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in
>>>> marketing
>>>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
>>>> http://p.sf.net/sfu/nokia-dev2dev
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>
>>
>
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /