<html><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><META name="Author" content="Novell GroupWise WebAccess"></head><body style='font-family: Helvetica, Arial, sans-serif; font-size: 13px; '><div>Etienne</div><br><div>Yes, I see version 3.6 was released in early 2007 - over 5 years ago!  What route could we follow to perhaps sponsor a change... or would someone be interested enough to upgrade it now?</div><br><div>As to the usage.  We are working on an extension package for a software system called "VisTrails". We are providing geospatial components ("modules") for that workflow environment.  Our code is hosted at <a href="http://code.google.com/p/eo4vistrails/">http://code.google.com/p/eo4vistrails/</a><span style="font-size: 13px; "> . The file that uses netcdf4 is </span><a href="http://code.google.com/p/eo4vistrails/source/browse/trunk/dataanalytics/netcdf4.py" style="font-size: 13px; ">http://code.google.com/p/eo4vistrails/source/browse/trunk/dataanalytics/netcdf4.py</a><span style="font-size: 13px; "> although, following VisTrails requirements, the initialisation happens here </span><a href="http://code.google.com/p/eo4vistrails/source/browse/trunk/dataanalytics/init.py" style="font-size: 13px; ">http://code.google.com/p/eo4vistrails/source/browse/trunk/dataanalytics/init.py</a><span style="font-size: 13px; "> . </span></div><br><div>Under Linux, which is where all our development and testing is taking place, there is no conflict problem (as we do not need OSGeo4W) - however I have been tasked with ensuring the software also runs under Windows.</div><br><div>I appreciate your interest in this matter, and any ideas you have for us to avoid this conflict (at least until OSGeo4W is upgraded to handle netCDF4) would be welcome.</div><br><div>Thanks</div><div>Derek</div><div><br>>>> Etienne Tourigny <etourigny.dev@gmail.com> 27/08/12 7:07 PM >>><br>Hi,<br><br>On Mon, Aug 27, 2012 at 12:05 PM, Derek Hohls <dhohls@csir.co.za> wrote:<br>> Etienne<br>><br>> Thanks for your reply and very useful insights.  Perhaps one of the other<br>> developers might be able to give an indication as to when osgeo4w might<br>> support netcdf4.<br><br>pleasure to be of help. I have suggested a few times upgrading to<br>netcdf-4 (current version is 4.2.1.1  and osgeo4w version ships with<br>venerable 3.6) but it seems no one is available to do the task.<br>Maybe if someone could sponsor it it would get done quicker. I confess<br>I don't use windows, so it's a bit out of my league.<br><br>><br>> From looking at various GDAL examples, it seems it would be possible to use<br>> GDAL for our current purpose.  I have a module written by a colleague (as<br>> part of a larger suite of tools we are developing) that uses the netCDF4<br>> Python package.  All it does, right now, is read the metadata from any<br>> netcdf file, in order to read the "variables" and "dimensions" and allow the<br>> user to extract selected data from the file as a numpy array.  I am sure<br>> that it would be possible to rewrite portions of our existing code to work<br>> with "pure" GDAL, given the somewhat parallel examples I have seen for, say,<br>> TIFF files.  If there is any guidance, or working examples, that you could<br>> provide in this direction, I'd appreciate your further input.<br><br>It really depends on what you wish to do, it would be easier if you<br>use either netcdf-4 OR gdal, not mix both.<br>If you are only dealing with netcdf files, my suggestion would be to<br>stick with netcdf-4, (because it's easier to deal with metadata) and<br>use numpy for the calculations.<br>GDAL supports netcdf metadata, but using the gdal metadata model.<br>Creating/manipulating variables and metadata<br><br>May I ask which you are mixing netcdf-4 and gdal in your script? If<br>you like, send me your script directly and I can help you out.<br><br>For examples, it really depends on which route you go:<br><br>netcdf-4 / scipyt/netcdf:<br>http://www.esr.org/~chjiang/python.html<br><br>gdal:<br>trac.osgeo.org/gdal/wiki/GdalOgrInPython<br><br>cheers<br>Etienne<br><br>><br>> Thanks<br>> Derek<br>><br>><br>>>>> Etienne Tourigny <etourigny.dev@gmail.com> 27/08/12 2:33 PM >>><br>><br>> Hi,<br>><br>> gdal in osgeo4w comes with netcdf-3, so that is the source of the<br>> conflict, although I don't know how to resolve it though, sorry.<br>><br>> You might want to use, instead of python-netcdf4, the netcdf routines<br>> that come with scipy. This will not cause the conflict, but it doesn't<br>> support netcdf-4 files, only netcdf-3 files.<br>><br>> By the way - why do you want to mix gdal and netcdf in the same<br>> script? gdal can import netcdf files by itself, but will expose them<br>> as gdal datasets.<br>><br>> Etienne<br>><br>> On Mon, Aug 27, 2012 at 9:01 AM, Derek Hohls <dhohls@csir.co.za> wrote:<br>>> Hi<br>>><br>>> I am hoping some one can help with this.<br>>><br>>> I have a "vanilla" Windows XP, into which I have installed the latest<br>>> version of OSGeo4W. I then used the "register-python" script<br>>> (http://code.google.com/p/maphew/source/browse/register-python/register-python.py)<br>>> to make the OSGeo4W the system Python. I then installed the NetCDF4 package<br>>> (available in binary form from<br>>> http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4). Now I can import one or<br>>> the other but not both packages into Python.<br>>><br>>> GDAL first:<br>>><br>>>>>> import gdal<br>>>>>> import netCDF4<br>>> Traceback (most recent call last):<br>>> File "", line 1, in<br>>> ImportError: DLL load failed: The specified procedure could not be found.<br>>><br>>> NetCDF first:<br>>><br>>>>>> import netCDF4<br>>>>>> import gdal<br>>> Traceback (most recent call last):<br>>> File "", line 1, in<br>>> File "C:\OSGeo4W\apps\Python27\lib\site-packages\gdal.py", line 2, in<br>>> from osgeo.gdal import deprecation_warn<br>>> File "C:\OSGeo4W\apps\Python27\lib\site-packages\osgeo\__init__.py", line<br>>> 21,<br>>> in<br>>> _gdal = swig_import_helper()<br>>> File "C:\OSGeo4W\apps\Python27\lib\site-packages\osgeo\__init__.py", line<br>>> 17,<br>>> in swig_import_helper<br>>> _mod = imp.load_module('_gdal', fp, pathname, description)<br>>> ImportError: DLL load failed: The specified procedure could not be found.<br>>><br>>> If anyone can suggest how to resolve this in a straightforward manner<br>>> (i.e. without doing builds-from-scratch, and just using standard installers<br>>> - I need these as part of another install, which will be aimed at a much<br>>> wider, non-programming audience), I'd appreciate it.<br>>><br>>> Thanks<br>>> Derek<br>>><br>>><br>>><br>>><br>>> --<br>>> This message is subject to the CSIR's copyright terms and conditions,<br>>> e-mail legal notice, and implemented Open Document Format (ODF) standard.<br>>> The full disclaimer details can be found at<br>>> http://www.csir.co.za/disclaimer.html.<br>>><br>>> This message has been scanned for viruses and dangerous content by<br>>> MailScanner,<br>>> and is believed to be clean.<br>>><br>>> Please consider the environment before printing this email.<br>>><br>>> _______________________________________________<br>>> osgeo4w-dev mailing list<br>>> osgeo4w-dev@lists.osgeo.org<br>>> http://lists.osgeo.org/mailman/listinfo/osgeo4w-dev<br>><br>> --<br>> This message is subject to the CSIR's copyright terms and conditions, e-mail<br>> legal notice, and implemented Open Document Format (ODF) standard.<br>> The full disclaimer details can be found at<br>> http://www.csir.co.za/disclaimer.html.<br>><br>> This message has been scanned for viruses and dangerous content by<br>> MailScanner,<br>> and is believed to be clean.<br>><br>> Please consider the environment before printing this email.<br>><br>><br>><br>> --<br>> This message is subject to the CSIR's copyright terms and conditions, e-mail<br>> legal notice, and implemented Open Document Format (ODF) standard.<br>> The full disclaimer details can be found at<br>> http://www.csir.co.za/disclaimer.html.<br>><br>><br>> This message has been scanned for viruses and dangerous content by<br>> MailScanner,<br>> and is believed to be clean.<br>><br>><br>> Please consider the environment before printing this email.<br><br>-- <br>This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. <br>The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.<br><br>This message has been scanned for viruses and dangerous content by MailScanner, <br>and is believed to be clean.<br><br>Please consider the environment before printing this email.<br><br><br></div><font face="Verdana,Arial,Helvetica,Trebuchet MS" size="1">
<br />-- 
<br />This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
<br />The full disclaimer details can be found at <a href="http://www.csir.co.za/disclaimer.html">http://www.csir.co.za/disclaimer.html</a>.
<p>
<br />This message has been scanned for viruses and dangerous content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, 
<br />and is believed to be clean.
<p>
<br />Please consider the environment before printing this email.
</font>
</body></html>