Dear Yao and MGET users,
I fixed the KeyError: '_gdal_array_1_0_3'
problem on ArcGIS 9.3 and released a new version of MGET, 0.8a10. Please try it
out if you are getting the KeyError: '_gdal_array_1_0_3'.
Best regards,
Jason
From: Jason Roberts
[mailto:]
Sent: Monday, August 23, 2010 3:02 PM
To: ; Yao Zhao
Subject: Re: [mget-help] Questions with Cayula-Cornillon Fronts
Detection & HYCOMData Download
Hi Yao,
Thanks for your interest in MGET. I'm sorry you're seeing these problems.
On August 13, I released the latest version of MGET, 0.8a9. This version
included many changes related to making MGET compatible with ArcGIS 10 for the
first time. It appears that in my haste to complete this before I went on
vacation the next day, I broke compatibility with ArcGIS 9.3. It is tempting to
say that I was just unlucky, trying to release a new version on Friday the
13th, but I am not superstitious; this was
clearly a case of rushing a release out the door with insufficient testing.
To get the Cayula-Cornillon tool working, and
the HYCOM netCDF example, please uninstall 0.8a9 and install the next older
version, 0.8a8, from this location:
http://code.nicholas.duke.edu/projects/mget/export/517/MGET/Trunk/PythonPackage/dist/GeoEco-0.8a8.win32-py2.5.exe
Unfortunately 8.8a8 does not include the tool that downloads HYCOM data
directly. 0.8a9 is the first version to include that tool. But you should still
be able to follow the netCDF example.
I am on vacation until August 29. After I return, I'll figure out what is
wrong with 0.8a9 on ArcGIS 9.3 and release a fixed version.
In case you are wondering, the problem appears to be related to code that
makes MGET compatible with multiple versions of the Python numpy package.
Internally, MGET includes a copy of an open-source library called GDAL, which
is used to read and write raster data. That library depends on the numpy
package. Different versions of the numpy package are incompatible with each
other, and this problem propogates to GDAL itself. Starting with 0.8a9, MGET
includes multiple copies of certain parts of GDAL, one for each version of
numpy. The error that you are seeing relates to MGET attempting to load the
version of GDAL that is compatible with numpy 1.0.3, which is the version that
comes with ArcGIS 9.3. For some reason, MGET fails to load that version of
GDAL. Unfortunately I'm not in a place where I can determine more than that,
but will find out more when I return...
Best regards,
Jason
On Mon 08/23/10 1:11 PM , "Yao Zhao" sent:
I began to
know MGET several weeks ago and found that it's really a useful software for my
future research. But I'm a beginner in ArcGIS and have no Python
background. I met some errors when I learned to use this software.
Hope you can help me to fix them. (The MGET version on my computer is the
lastest one. Python 2.5, Python 2.5 pywin32-212 and ArcGIS 9.3 are all
installed.)
First
error came from Cayula-Cornillon Fronts finding tool. I tried to
detect fronts in an ArcGIS Raster which is converted from NASA MODISA 4km
SST HDF file and contains integers in 16-bit unsigned data type. For the optional settings, I only writed "int(inputRaster)"
in Map algebra _expression_ box to make sure that the input
raster was a integer raster. The error message looks as follows and I have
no idea what wrong it is.
Executing:
CayulaCornillonEdgeDetectionDetectEdgesInArcGISRaster C:\yzwork\test\sstraster
C:\yzwork\test\edge false int(inputRaster) 3 32 16 0.65 0.25 3 0.76 0.9 0.92 1
# # # # #
Start Time: Mon Aug 23 10:34:23 2010
Running script
CayulaCornillonEdgeDetectionDetectEdgesInArcGISRaster...
Finding fronts in C:\yzwork\test\sstraster using
parameters: medianFilter=3, histogramWindow=32, histogramStride=16,
minPropCellsWithData=0.65000000000000002, minPopProp=0.25, minPopMeanDiff=3.0,
minTheta=0.76000000000000001, minSinglePopCohesion=0.90000000000000002,
minGlobalPopCohesion=0.92000000000000004, threads=1.
Output rasters: fronts=C:\yzwork\test\edge,
filteredImage=None, candidateCounts=None, frontCounts=None,
windowStatusCodes=None, windowStatusValues=None
KeyError: '_gdal_array_1_0_3'
: '_gdal_array_1_0_3'
Failed to execute
(CayulaCornillonEdgeDetectionDetectEdgesInArcGISRaster).
End Time: Mon Aug 23 10:34:30
2010 (Elapsed Time: 7.00 seconds)
A similar error came out when I used the MGET tool to
download HYCOM GOMl0.04 3D Variable to ArcGIS Rasters. I selected ssh variable
and limited the time series from 4/1/2010 to 4/30/2010. Error message is like
this:
Executing:
HYCOMGOMl0043DCreateArcGISRasters ssh C:\yzwork\test\HYCOM Add
%(VariableName)s;%%Y;%(VariableName)s_%%Y%%j.img # Degrees 4/1/2010 4/30/2010
1000 # true false C:\yzwork\test\HYCOM
Start
Time: Mon Aug 23 11:37:43 2010
Running
script HYCOMGOMl0043DCreateArcGISRasters...
RuntimeError:
Failed to write a block of data of 541 columns by 385 rows at offsets x=0, y=0
to band 1 of band 1 of GDAL dataset
"C:\yzwork\test\HYCOM\ssh\2010\ssh_2010091.img" with the Geospatial
Data Abstraction Library (GDAL). Verify that the dataset exists, is accessible,
and has the expected dimensions. Detailed error information: band.WriteArray(data,
0, 0) reported KeyError: '_gdal_array_1_0_3'.
:
Failed to write a block of data of 541 columns by 385 rows at offsets x=0, y=0
to band 1 of band 1 of GDAL dataset
"C:\yzwork\test\HYCOM\ssh\2010\ssh_2010091.img" with the Geospatial
Data Abstraction Library (GDAL). Verify that the dataset exists, is accessible,
and has the expected dimensions. Detailed error information:
band.WriteArray(data, 0, 0) reported KeyError: '_gdal_array_1_0_3'.
Failed
to execute (HYCOMGOMl0043DCreateArcGISRasters).
End
Time: Mon Aug 23 11:38:18 2010 (Elapsed Time: 35.00 seconds)
I also tried to repeat the example "Extracting ArcGIS
rasters from the HYCOM global ocean model's 4D netCDFs". I followed the
step-by-step instructions. After inputing the command
"Extract_Rasters_From_HYCOM_Global_NetCDFs.py NetCDFs\archv.2003_002_00_3zt.nc
temperature regional.grid.a regional.grid.b Rasters 0" in CMD
shell, there is an ImportError which said "No module named netCDF3".
So I just wonder if there is something that I failed to install on my computer.
At last, I have a small question on 'geostrophic eddies
identifying tool' in MGET. I saw MGET Overview for NOAA Coastal GeoTools 2009
Conference PowerPoint and learned that there should be such a tool under
the directory of Oceanographic Analysis in toolbox. But I failed to find it.
Can you show me how to get access to this tool?
Sorry for my long questions. Thanks a lot for your patience and
help!
Master student in major Marine Science
North Carolina State University