|
From: <js...@us...> - 2010-03-01 15:58:58
|
Revision: 8165
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8165&view=rev
Author: jswhit
Date: 2010-03-01 15:58:51 +0000 (Mon, 01 Mar 2010)
Log Message:
-----------
update for geos-3.2.0
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/README
trunk/toolkits/basemap/doc/users/installing.rst
Removed Paths:
-------------
trunk/toolkits/basemap/geos-3.1.1/
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2010-03-01 15:51:19 UTC (rev 8164)
+++ trunk/toolkits/basemap/MANIFEST.in 2010-03-01 15:58:51 UTC (rev 8165)
@@ -94,7 +94,7 @@
include doc/make.py
include doc/conf.py
include doc/index.rst
-recursive-include geos-3.1.1 *
+recursive-include geos-3.2.0 *
recursive-include lib/dap *
recursive-include lib/httplib2 *
recursive-include lib/dbflib *
Modified: trunk/toolkits/basemap/README
===================================================================
--- trunk/toolkits/basemap/README 2010-03-01 15:51:19 UTC (rev 8164)
+++ trunk/toolkits/basemap/README 2010-03-01 15:58:51 UTC (rev 8165)
@@ -12,7 +12,7 @@
numpy 1.1 (or higher)
The GEOS (Geometry Engine - Open Source) library (version 3.1.1 or higher).
-Source code is included in the geos-3.1.1 directory.
+Source code is included in the geos-3.2.0 directory.
PIL (http://pythonware.com/products/pil) is optional (only
needed for Basemap warpimage and bluemarble methods).
Modified: trunk/toolkits/basemap/doc/users/installing.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/installing.rst 2010-03-01 15:51:19 UTC (rev 8164)
+++ trunk/toolkits/basemap/doc/users/installing.rst 2010-03-01 15:58:51 UTC (rev 8165)
@@ -24,7 +24,7 @@
**Required libraries that ship with basemap**
`GEOS <http://trac.osgeo.org/geos/>`__ (Geometry Engine - Open Source) library 3.1.1 or later.
- Source code is included in the geos-3.1.1 directory.
+ Source code is included in the geos-3.2.0 directory.
When building from source, must be built and installed separately
from basemap (see build instructions below).
Included in Windows binary installers.
@@ -75,7 +75,7 @@
Then go to next step. If you don't have it, you can build it from
the source code included with basemap by following these steps::
- cd geos-3.1.1
+ cd geos-3.2.0
export GEOS_DIR=<where you want the libs and headers to go>
# A reasonable choice on a Unix-like system is /usr/local, or
# if you don't have permission to write there, your home directory.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-23 12:31:07
|
Revision: 8332
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8332&view=rev
Author: jswhit
Date: 2010-05-23 12:31:00 +0000 (Sun, 23 May 2010)
Log Message:
-----------
add support for unstructured meshes in pcolor, contour, contourf methods.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/C02562.orog.nc
trunk/toolkits/basemap/examples/ploticos.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-05-21 18:26:12 UTC (rev 8331)
+++ trunk/toolkits/basemap/Changelog 2010-05-23 12:31:00 UTC (rev 8332)
@@ -1,7 +1,11 @@
version 0.99.5 (not yet released)
+ * add support for plotting on unstructured grids using
+ keyword 'tri' in pcolor,contour,contourf methods (which
+ then forward to tripcolor, tricontour, tricontourf axes
+ methods).
* let continents that fill the whole map be filled.
* added option for cubic spline interpolation in interp function
- (order=3) using scipy.ndimage.
+ (order=3) using scipy.ndimage.
* added "near-sided perspective" projection for a satellite
view at an arbitrary altitude.
* patch from Stephane Raynaud to pass format string to
Added: trunk/toolkits/basemap/examples/C02562.orog.nc
===================================================================
(Binary files differ)
Property changes on: trunk/toolkits/basemap/examples/C02562.orog.nc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py (rev 0)
+++ trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 12:31:00 UTC (rev 8332)
@@ -0,0 +1,15 @@
+from mpl_toolkits.basemap import Basemap, NetCDFFile
+import matplotlib.pyplot as plt
+import numpy as np
+# read in orography of icosahedral global grid.
+f = NetCDFFile('C02562.orog.nc')
+lons = (180./np.pi)*f.variables['grid_center_lon'][:]
+lats = (180./np.pi)*f.variables['grid_center_lat'][:]
+z = f.variables['zs'][:]
+map = Basemap(projection='ortho',lon_0=-105,lat_0=40)
+x,y = map(lons, lats)
+map.drawcoastlines()
+map.drawmapboundary()
+# tri=True forwards to axes.tripcolor
+map.pcolor(x,y,z,tri=True,shading='faceted')
+plt.show()
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-21 18:26:12 UTC (rev 8331)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 12:31:00 UTC (rev 8332)
@@ -2730,7 +2730,7 @@
self.set_axes_limits(ax=ax)
return ret
- def pcolor(self,x,y,data,**kwargs):
+ def pcolor(self,x,y,data,tri=False,**kwargs):
"""
Make a pseudo-color plot over the map
(see matplotlib.pyplot.pcolor documentation).
@@ -2739,22 +2739,35 @@
they will be convert to masked arrays with those values masked.
As a result, those values will not be plotted.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricolor is used.
+
Extra keyword ``ax`` can be used to override the default axis instance.
- Other \**kwargs passed on to matplotlib.pyplot.pcolor.
+ Other \**kwargs passed on to matplotlib.pyplot.pcolor (or tricolor if
+ ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make x,y masked arrays
- # (masked where data is outside of projection limb)
- x = ma.masked_values(np.where(x > 1.e20,1.e20,x), 1.e20)
- y = ma.masked_values(np.where(y > 1.e20,1.e20,y), 1.e20)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- ret = ax.pcolor(x,y,data,**kwargs)
+ if tri:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ ret = ax.tripcolor(x,y,data,**kwargs)
+ else:
+ # make x,y masked arrays
+ # (masked where data is outside of projection limb)
+ x = ma.masked_values(np.where(x > 1.e20,1.e20,x), 1.e20)
+ y = ma.masked_values(np.where(y > 1.e20,1.e20,y), 1.e20)
+ ret = ax.pcolor(x,y,data,**kwargs)
except:
ax.hold(b)
raise
@@ -2801,40 +2814,51 @@
Extra keyword ``ax`` can be used to override the default axis instance.
- Other \*args and \**kwargs passed on to matplotlib.pyplot.contour.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricontour is used.
+
+ Other \*args and \**kwargs passed on to matplotlib.pyplot.contour
+ (or tricontour if ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make sure x is monotonically increasing - if not,
- # print warning suggesting that the data be shifted in longitude
- # with the shiftgrid function.
- # only do this check for global projections.
- if self.projection in _cylproj + _pseudocyl:
- xx = x[x.shape[0]/2,:]
- condition = (xx >= self.xmin) & (xx <= self.xmax)
- xl = xx.compress(condition).tolist()
- xs = xl[:]
- xs.sort()
- if xl != xs:
- print dedent("""
- WARNING: x coordinate not montonically increasing - contour plot
- may not be what you expect. If it looks odd, your can either
- adjust the map projection region to be consistent with your data, or
- (if your data is on a global lat/lon grid) use the shiftgrid
- function to adjust the data to be consistent with the map projection
- region (see examples/contour_demo.py).""")
- # mask for points outside projection limb.
- xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
- data = ma.asarray(data)
- # combine with data mask.
- mask = np.logical_or(ma.getmaskarray(data),xymask)
- data = ma.masked_array(data,mask=mask)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- CS = ax.contour(x,y,data,*args,**kwargs)
+ if kwargs.has_key('tri') and kwargs['tri']:
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ CS = ax.tricontour(x,y,data,*args,**kwargs)
+ else:
+ # make sure x is monotonically increasing - if not,
+ # print warning suggesting that the data be shifted in longitude
+ # with the shiftgrid function.
+ # only do this check for global projections.
+ if self.projection in _cylproj + _pseudocyl:
+ xx = x[x.shape[0]/2,:]
+ condition = (xx >= self.xmin) & (xx <= self.xmax)
+ xl = xx.compress(condition).tolist()
+ xs = xl[:]
+ xs.sort()
+ if xl != xs:
+ print dedent("""
+ WARNING: x coordinate not montonically increasing - contour plot
+ may not be what you expect. If it looks odd, your can either
+ adjust the map projection region to be consistent with your data, or
+ (if your data is on a global lat/lon grid) use the shiftgrid
+ function to adjust the data to be consistent with the map projection
+ region (see examples/contour_demo.py).""")
+ # mask for points outside projection limb.
+ xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
+ data = ma.asarray(data)
+ # combine with data mask.
+ mask = np.logical_or(ma.getmaskarray(data),xymask)
+ data = ma.masked_array(data,mask=mask)
+ CS = ax.contour(x,y,data,*args,**kwargs)
except:
ax.hold(b)
raise
@@ -2856,48 +2880,59 @@
Extra keyword 'ax' can be used to override the default axis instance.
- Other \*args and \**kwargs passed on to matplotlib.pyplot.scatter.
+ If ``tri`` is set to ``True``, an unstructured grid is assumed
+ (x,y,data must be 1-d) and matplotlib.pyplot.tricontourf is used.
+
+ Other \*args and \**kwargs passed on to matplotlib.pyplot.contourf
+ (or tricontourf if ``tri=True``).
"""
ax, plt = self._ax_plt_from_kw(kwargs)
- # make sure x is monotonically increasing - if not,
- # print warning suggesting that the data be shifted in longitude
- # with the shiftgrid function.
- # only do this check for global projections.
- if self.projection in _cylproj + _pseudocyl:
- xx = x[x.shape[0]/2,:]
- condition = (xx >= self.xmin) & (xx <= self.xmax)
- xl = xx.compress(condition).tolist()
- xs = xl[:]
- xs.sort()
- if xl != xs:
- print dedent("""
- WARNING: x coordinate not montonically increasing - contour plot
- may not be what you expect. If it looks odd, your can either
- adjust the map projection region to be consistent with your data, or
- (if your data is on a global lat/lon grid) use the shiftgrid
- function to adjust the data to be consistent with the map projection
- region (see examples/contour_demo.py).""")
- # mask for points outside projection limb.
- xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
- # mask outside projection region (workaround for contourf bug?)
- epsx = 0.1*(self.xmax-self.xmin)
- epsy = 0.1*(self.ymax-self.ymin)
- outsidemask = np.logical_or(np.logical_or(x > self.xmax+epsx,\
- x < self.xmin-epsy),\
- np.logical_or(y > self.ymax+epsy,\
- y < self.ymin-epsy))
- data = ma.asarray(data)
- # combine masks.
- mask = \
- np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
- data = ma.masked_array(data,mask=mask)
# allow callers to override the hold state by passing hold=True|False
b = ax.ishold()
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
try:
- CS = ax.contourf(x,y,data,*args,**kwargs)
+ if kwargs.has_key('tri') and kwargs['tri']:
+ mask = np.logical_or(x<1.e20,y<1.e20)
+ x = np.compress(mask,x)
+ y = np.compress(mask,y)
+ data = np.compress(mask,data)
+ CS = ax.tricontourf(x,y,data,*args,**kwargs)
+ else:
+ # make sure x is monotonically increasing - if not,
+ # print warning suggesting that the data be shifted in longitude
+ # with the shiftgrid function.
+ # only do this check for global projections.
+ if self.projection in _cylproj + _pseudocyl:
+ xx = x[x.shape[0]/2,:]
+ condition = (xx >= self.xmin) & (xx <= self.xmax)
+ xl = xx.compress(condition).tolist()
+ xs = xl[:]
+ xs.sort()
+ if xl != xs:
+ print dedent("""
+ WARNING: x coordinate not montonically increasing - contour plot
+ may not be what you expect. If it looks odd, your can either
+ adjust the map projection region to be consistent with your data, or
+ (if your data is on a global lat/lon grid) use the shiftgrid
+ function to adjust the data to be consistent with the map projection
+ region (see examples/contour_demo.py).""")
+ # mask for points outside projection limb.
+ xymask = np.logical_or(np.greater(x,1.e20),np.greater(y,1.e20))
+ # mask outside projection region (workaround for contourf bug?)
+ epsx = 0.1*(self.xmax-self.xmin)
+ epsy = 0.1*(self.ymax-self.ymin)
+ outsidemask = np.logical_or(np.logical_or(x > self.xmax+epsx,\
+ x < self.xmin-epsy),\
+ np.logical_or(y > self.ymax+epsy,\
+ y < self.ymin-epsy))
+ data = ma.asarray(data)
+ # combine masks.
+ mask = \
+ np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask))
+ data = ma.masked_array(data,mask=mask)
+ CS = ax.contourf(x,y,data,*args,**kwargs)
except:
ax.hold(b)
raise
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-23 16:49:28
|
Revision: 8333
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8333&view=rev
Author: jswhit
Date: 2010-05-23 16:49:22 +0000 (Sun, 23 May 2010)
Log Message:
-----------
handle masked arrays for unstructured meshes.
Modified Paths:
--------------
trunk/toolkits/basemap/examples/ploticos.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 12:31:00 UTC (rev 8332)
+++ trunk/toolkits/basemap/examples/ploticos.py 2010-05-23 16:49:22 UTC (rev 8333)
@@ -1,6 +1,7 @@
from mpl_toolkits.basemap import Basemap, NetCDFFile
import matplotlib.pyplot as plt
import numpy as np
+from numpy import ma
# read in orography of icosahedral global grid.
f = NetCDFFile('C02562.orog.nc')
lons = (180./np.pi)*f.variables['grid_center_lon'][:]
@@ -11,5 +12,8 @@
map.drawcoastlines()
map.drawmapboundary()
# tri=True forwards to axes.tripcolor
-map.pcolor(x,y,z,tri=True,shading='faceted')
+#z = ma.masked_where(z < 1.e-5, z) # for testing masked arrays.
+map.pcolor(x,y,z,tri=True,shading='faceted',vmin=0,vmax=3000)
+#map.contourf(x,y,z,np.arange(0,3000,150),tri=True)
+#map.contour(x,y,z,np.arange(0,3000,150),tri=True)
plt.show()
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 12:31:00 UTC (rev 8332)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-23 16:49:22 UTC (rev 8333)
@@ -2757,11 +2757,24 @@
if tri:
# for unstructured grids, toss out points outside
# projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- ret = ax.tripcolor(x,y,data,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ ret = ax.tripcolor(triang,data,**kwargs)
+ else:
+ ret = ax.tripcolor(x,y,data,**kwargs)
else:
# make x,y masked arrays
# (masked where data is outside of projection limb)
@@ -2828,11 +2841,26 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- CS = ax.tricontour(x,y,data,*args,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ CS = ax.tricontour(triang,data,*args,**kwargs)
+ else:
+ CS = ax.tricontour(x,y,data,*args,**kwargs)
else:
# make sure x is monotonically increasing - if not,
# print warning suggesting that the data be shifted in longitude
@@ -2894,11 +2922,26 @@
ax.hold(h)
try:
if kwargs.has_key('tri') and kwargs['tri']:
+ # for unstructured grids, toss out points outside
+ # projection limb (don't use those points in triangulation).
+ if hasattr(data,'mask'):
+ data = data.filled(fill_value=1.e30)
+ masked=True
+ else:
+ masked=False
mask = np.logical_or(x<1.e20,y<1.e20)
x = np.compress(mask,x)
y = np.compress(mask,y)
data = np.compress(mask,data)
- CS = ax.tricontourf(x,y,data,*args,**kwargs)
+ if masked:
+ import matplotlib.tri as tri
+ triang = tri.Triangulation(x, y)
+ z = data[triang.triangles]
+ mask = (z > 1.e20).sum(axis=-1)
+ triang.set_mask(mask)
+ CS = ax.tricontourf(triang,data,*args,**kwargs)
+ else:
+ CS = ax.tricontourf(x,y,data,*args,**kwargs)
else:
# make sure x is monotonically increasing - if not,
# print warning suggesting that the data be shifted in longitude
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-06-10 18:25:25
|
Revision: 8409
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8409&view=rev
Author: jswhit
Date: 2010-06-10 18:25:19 +0000 (Thu, 10 Jun 2010)
Log Message:
-----------
don't force adjustable='box' for AxesGrid compatability. Added example that uses AxesGrid.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/README
trunk/toolkits/basemap/examples/run_all.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-06-10 17:48:10 UTC (rev 8408)
+++ trunk/toolkits/basemap/Changelog 2010-06-10 18:25:19 UTC (rev 8409)
@@ -1,4 +1,6 @@
version 0.99.5 (not yet released)
+ * don't force adjustable='box' so Basemap is compatible
+ with AxesGrid. Added fcstmaps_axesgrid.py example.
* add support for plotting on unstructured grids using
keyword 'tri' in pcolor,contour,contourf methods (which
then forward to tripcolor, tricontour, tricontourf axes
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2010-06-10 17:48:10 UTC (rev 8408)
+++ trunk/toolkits/basemap/MANIFEST.in 2010-06-10 18:25:19 UTC (rev 8409)
@@ -53,6 +53,7 @@
include examples/geos_demo_3.py
include examples/200706041200-msg-ch01-SAfrica.jpg
include examples/fcstmaps.py
+include examples/fcstmaps_axesgrid.py
include examples/plotsst.py
include examples/wiki_example.py
include examples/fillstates.py
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README 2010-06-10 17:48:10 UTC (rev 8408)
+++ trunk/toolkits/basemap/examples/README 2010-06-10 18:25:19 UTC (rev 8409)
@@ -63,6 +63,9 @@
fcstmaps.py is a sample multi-panel plot that accesses
data over http using the dap module. An internet connection is required.
+fcstmaps_axesgrid.py is the same as above, but illustrates the use
+of the AxesGrid toolkit.
+
plotsst.py also uses dap client to access the data, and also illustrates
how the NetCDFFile function deals with missing values.
Added: trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py
===================================================================
--- trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py (rev 0)
+++ trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py 2010-06-10 18:25:19 UTC (rev 8409)
@@ -0,0 +1,102 @@
+# this example reads today's numerical weather forecasts
+# from the NOAA OpenDAP servers and makes a multi-panel plot.
+# This version demonstrates the use of the AxesGrid toolkit.
+import numpy as np
+import matplotlib.pyplot as plt
+import sys
+import numpy.ma as ma
+import datetime
+from mpl_toolkits.basemap import Basemap, NetCDFFile, addcyclic, num2date
+from mpl_toolkits.axes_grid1 import AxesGrid
+
+
+# today's date is default.
+if len(sys.argv) > 1:
+ YYYYMMDD = sys.argv[1]
+else:
+ YYYYMMDD = datetime.datetime.today().strftime('%Y%m%d')
+
+# set OpenDAP server URL.
+URLbase="http://nomad1.ncep.noaa.gov:9090/dods/mrf/mrf"
+URL=URLbase+YYYYMMDD+'/mrf'+YYYYMMDD
+print URL+'\n'
+try:
+ data = NetCDFFile(URL)
+except:
+ msg = """
+opendap server not providing the requested data.
+Try another date by providing YYYYMMDD on command line."""
+ raise IOError, msg
+
+
+# read lats,lons,times.
+
+print data.variables.keys()
+latitudes = data.variables['lat']
+longitudes = data.variables['lon']
+fcsttimes = data.variables['time']
+times = fcsttimes[0:6] # first 6 forecast times.
+ntimes = len(times)
+# convert times for datetime instances.
+fdates = num2date(times,units=fcsttimes.units,calendar='standard')
+# make a list of YYYYMMDDHH strings.
+verifdates = [fdate.strftime('%Y%m%d%H') for fdate in fdates]
+# convert times to forecast hours.
+fcsthrs = []
+for fdate in fdates:
+ fdiff = fdate-fdates[0]
+ fcsthrs.append(fdiff.days*24. + fdiff.seconds/3600.)
+print fcsthrs
+print verifdates
+lats = latitudes[:]
+nlats = len(lats)
+lons1 = longitudes[:]
+nlons = len(lons1)
+
+# unpack 2-meter temp forecast data.
+
+t2mvar = data.variables['tmp2m']
+t2min = t2mvar[0:ntimes,:,:]
+t2m = np.zeros((ntimes,nlats,nlons+1),t2min.dtype)
+
+# create figure, set up AxesGrid.
+fig=plt.figure(figsize=(6,8))
+grid = AxesGrid(fig, [0.05,0.01,0.9,0.9],
+ nrows_ncols=(3, 2),
+ axes_pad=0.25,
+ cbar_mode='single',
+ cbar_pad=0.3,
+ cbar_size=0.1,
+ cbar_location='top',
+ share_all=True,
+ )
+
+# create Basemap instance for Orthographic projection.
+m = Basemap(lon_0=-90,lat_0=60,projection='ortho')
+# add wrap-around point in longitude.
+for nt in range(ntimes):
+ t2m[nt,:,:], lons = addcyclic(t2min[nt,:,:], lons1)
+# convert to celsius.
+t2m = t2m-273.15
+# contour levels
+clevs = np.arange(-30,30.1,2.)
+lons, lats = np.meshgrid(lons, lats)
+x, y = m(lons, lats)
+# make subplots.
+for nt,fcsthr in enumerate(fcsthrs):
+ ax = grid[nt]
+ m.ax = ax
+ cs = m.contourf(x,y,t2m[nt,:,:],clevs,cmap=plt.cm.jet,extend='both')
+ m.drawcoastlines(linewidth=0.5)
+ m.drawcountries()
+ m.drawparallels(np.arange(-80,81,20))
+ m.drawmeridians(np.arange(0,360,20))
+ # panel title
+ ax.set_title('%d-h forecast valid '%fcsthr+verifdates[nt],fontsize=9)
+# figure title
+plt.figtext(0.5,0.95,
+ u"2-m temp (\N{DEGREE SIGN}C) forecasts from %s"%verifdates[0],
+ horizontalalignment='center',fontsize=14)
+# a single colorbar.
+cbar = fig.colorbar(cs, cax=grid.cbar_axes[0], orientation='horizontal')
+plt.show()
Modified: trunk/toolkits/basemap/examples/run_all.py
===================================================================
--- trunk/toolkits/basemap/examples/run_all.py 2010-06-10 17:48:10 UTC (rev 8408)
+++ trunk/toolkits/basemap/examples/run_all.py 2010-06-10 18:25:19 UTC (rev 8409)
@@ -2,6 +2,7 @@
test_files = glob.glob('*.py')
test_files.remove('run_all.py')
test_files.remove('fcstmaps.py')
+test_files.remove('fcstmaps_axesgrid.py')
test_files.remove('testgdal.py')
test_files.remove('pnganim.py')
test_files.remove('geos_demo_2.py')
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-06-10 17:48:10 UTC (rev 8408)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-06-10 18:25:19 UTC (rev 8409)
@@ -2628,9 +2628,9 @@
# plot is re-centered in bounding rectangle.
# (anchor instance var determines where plot is placed)
if self.fix_aspect:
- ax.set_aspect('equal',adjustable='box',anchor=self.anchor)
+ ax.set_aspect('equal',anchor=self.anchor)
else:
- ax.set_aspect('auto',adjustable='box',anchor=self.anchor)
+ ax.set_aspect('auto',anchor=self.anchor)
# make sure axis ticks are turned off.
if self.noticks:
ax.set_xticks([])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-06-10 18:43:41
|
Revision: 8410
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8410&view=rev
Author: jswhit
Date: 2010-06-10 18:43:34 +0000 (Thu, 10 Jun 2010)
Log Message:
-----------
added ploticos.py example for plotting triangular grids.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/README
trunk/toolkits/basemap/examples/ploticos.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-06-10 18:25:19 UTC (rev 8409)
+++ trunk/toolkits/basemap/Changelog 2010-06-10 18:43:34 UTC (rev 8410)
@@ -4,12 +4,12 @@
* add support for plotting on unstructured grids using
keyword 'tri' in pcolor,contour,contourf methods (which
then forward to tripcolor, tricontour, tricontourf axes
- methods).
+ methods). examples/ploticos.py added.
* let continents that fill the whole map be filled.
* added option for cubic spline interpolation in interp function
(order=3) using scipy.ndimage.
* added "near-sided perspective" projection for a satellite
- view at an arbitrary altitude.
+ view at an arbitrary altitude.
* patch from Stephane Raynaud to pass format string to
drawmapscale, and allow units='m'.
* updated proj4 source to version 4.7.0, pyproj to 1.8.6.
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2010-06-10 18:25:19 UTC (rev 8409)
+++ trunk/toolkits/basemap/MANIFEST.in 2010-06-10 18:43:34 UTC (rev 8410)
@@ -20,6 +20,7 @@
include examples/simpletest_oo.py
include examples/randompoints.py
include examples/daynight.py
+include examples/ploticos.py
include examples/test.py
include examples/us_25m.dem
include examples/testgdal.py
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README 2010-06-10 18:25:19 UTC (rev 8409)
+++ trunk/toolkits/basemap/examples/README 2010-06-10 18:43:34 UTC (rev 8410)
@@ -136,3 +136,5 @@
(requires scipy).
daynight.py shows how to shade the regions of a map where the sun has set.
+
+ploticos.py demonstrates plotting on unstructured grids.
Modified: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py 2010-06-10 18:25:19 UTC (rev 8409)
+++ trunk/toolkits/basemap/examples/ploticos.py 2010-06-10 18:43:34 UTC (rev 8410)
@@ -16,4 +16,5 @@
map.pcolor(x,y,z,tri=True,shading='faceted',vmin=0,vmax=3000)
#map.contourf(x,y,z,np.arange(0,3000,150),tri=True)
#map.contour(x,y,z,np.arange(0,3000,150),tri=True)
+plt.title('pcolor plot on a global icosahedral mesh')
plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-07-06 01:43:41
|
Revision: 8500
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8500&view=rev
Author: jswhit
Date: 2010-07-06 01:43:34 +0000 (Tue, 06 Jul 2010)
Log Message:
-----------
change version to 1.0 (following matplotlib's lead)
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/doc/conf.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-07-06 01:24:58 UTC (rev 8499)
+++ trunk/toolkits/basemap/Changelog 2010-07-06 01:43:34 UTC (rev 8500)
@@ -1,4 +1,4 @@
-version 0.99.5 (not yet released)
+version 1.0 (not yet released)
* don't force adjustable='box' so Basemap is compatible
with AxesGrid. Added fcstmaps_axesgrid.py example.
* add support for plotting on unstructured grids using
Modified: trunk/toolkits/basemap/doc/conf.py
===================================================================
--- trunk/toolkits/basemap/doc/conf.py 2010-07-06 01:24:58 UTC (rev 8499)
+++ trunk/toolkits/basemap/doc/conf.py 2010-07-06 01:43:34 UTC (rev 8500)
@@ -46,9 +46,9 @@
# other places throughout the built documents.
#
# The short X.Y version.
-version = '0.99.5'
+version = '1.0'
# The full version, including alpha/beta/rc tags.
-release = '0.99.5'
+release = '1.0'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-07-06 01:24:58 UTC (rev 8499)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-07-06 01:43:34 UTC (rev 8500)
@@ -52,7 +52,7 @@
else:
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '0.99.5'
+__version__ = '1.0'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2010-07-06 01:24:58 UTC (rev 8499)
+++ trunk/toolkits/basemap/setup.py 2010-07-06 01:43:34 UTC (rev 8500)
@@ -225,7 +225,7 @@
package_data = {'mpl_toolkits.basemap':pyproj_datafiles+basemap_datafiles}
setup(
name = "basemap",
- version = "0.99.5",
+ version = "1.0",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-08-29 13:26:26
|
Revision: 8669
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8669&view=rev
Author: jswhit
Date: 2010-08-29 13:26:17 +0000 (Sun, 29 Aug 2010)
Log Message:
-----------
fix so that datum grid files are installed with pyproj
Modified Paths:
--------------
trunk/toolkits/basemap/setup.py
Added Paths:
-----------
trunk/toolkits/basemap/datumgrid/
trunk/toolkits/basemap/datumgrid/FL.lla
trunk/toolkits/basemap/datumgrid/MD.lla
trunk/toolkits/basemap/datumgrid/TN.lla
trunk/toolkits/basemap/datumgrid/WI.lla
trunk/toolkits/basemap/datumgrid/WO.lla
trunk/toolkits/basemap/datumgrid/alaska.lla
trunk/toolkits/basemap/datumgrid/conus.lla
trunk/toolkits/basemap/datumgrid/hawaii.lla
trunk/toolkits/basemap/datumgrid/null.lla
trunk/toolkits/basemap/datumgrid/prvi.lla
trunk/toolkits/basemap/datumgrid/stgeorge.lla
trunk/toolkits/basemap/datumgrid/stlrnc.lla
trunk/toolkits/basemap/datumgrid/stpaul.lla
trunk/toolkits/basemap/nad2bin.c
Added: trunk/toolkits/basemap/datumgrid/FL.lla
===================================================================
--- trunk/toolkits/basemap/datumgrid/FL.lla (rev 0)
+++ trunk/toolkits/basemap/datumgrid/FL.lla 2010-08-29 13:26:17 UTC (rev 8669)
@@ -0,0 +1,162 @@
+Florida - HP
+ 33 33 1 -88.00000 .25000 24.00000 .25000
+0: 7672 -6501 103 -773 125 -788 160 -817 200 -858 246 -914 294 -982 339 -1060
+378 -1141 404 -1217 416 -1277 406 -1312 377 -1308 321 -1253 243 -1136 136 -946
+6 -668 -154 -294 -347 194 -577 813 -837 1548 -1039 2280 -920 2603 -731 2767
+-244 2680 366 2537 835 2117 545 1930 194 2344 152 2581 592 2449 1020 2189
+1247 1948
+1: 6754 -7120 8 -708 34 -720 68 -742 113 -778 164 -827 220 -889 276 -960
+327 -1036 372 -1109 404 -1169 422 -1206 423 -1211 404 -1170 367 -1076 311 -915
+234 -680 133 -352 -5 91 -206 694 -519 1526 -940 2565 -720 2708 -761 2904
+-190 2656 556 2684 1384 1878 336 1391 -509 2300 -707 2530 249 2025 931 1499
+1153 1093
+2: 5839 -7757 -85 -643 -60 -651 -23 -668 24 -696 79 -738 141 -792 206 -856
+269 -925 328 -992 380 -1048 420 -1085 448 -1093 461 -1060 462 -982 449 -845
+426 -645 391 -367 339 8 246 530 22 1341 -727 2950 -300 2631 -817 2997 -63 2328
+605 3088 2423 1864 -180 932 -1705 2673 -2090 2563 126 1350 1056 604 1092 80
+3: 4931 -8407 -176 -580 -152 -582 -115 -593 -67 -613 -9 -648 57 -692 128 -747
+200 -807 272 -865 339 -914 396 -946 446 -950 484 -919 511 -844 531 -719
+544 -534 557 -282 575 57 603 521 666 1219 935 2462 -596 2881 -290 2556 533 1660
+517 2766 2960 2565 -780 2955 -4000 3000 -3837 1859 682 18 1424 -535 929 -1087
+4: 4040 -9062 -266 -517 -242 -515 -207 -517 -159 -531 -101 -555 -33 -590
+42 -634 122 -683 201 -730 279 -768 350 -790 413 -785 466 -747 508 -664 540 -533
+563 -344 583 -85 600 264 616 739 614 1405 484 2283 -488 2772 -579 2757 -245 2656
+-1 3507 917 4006 -862 4197 -2155 2464 -1050 -2791 1050 -1209 1564 -1695
+378 -2234
+5: 3177 -9703 -353 -457 -331 -449 -299 -444 -253 -449 -196 -464 -128 -487
+-51 -519 32 -556 117 -590 201 -614 281 -623 350 -604 410 -550 453 -452 480 -305
+487 -97 471 180 425 544 331 1017 146 1614 -231 2286 -935 2790 -1308 3079
+-1338 3409 -1044 4066 -165 4364 -98 3520 1098 -1747 317 -3205 1665 -2467
+2276 -2277 -302 -2541
+6: 2355 -10301 -436 -403 -419 -387 -389 -376 -348 -372 -294 -374 -228 -388
+-152 -406 -67 -430 20 -449 108 -460 191 -452 264 -416 322 -343 359 -227
+369 -58 345 170 276 464 147 829 -69 1271 -405 1783 -900 2313 -1540 2764
+-2049 3120 -2302 3479 -1974 3796 -82 3346 1747 1598 3151 -3091 281 -2706
+2719 -2294 352 -2797 200 -3163
+7: 1590 -10819 -516 -357 -503 -335 -479 -316 -444 -301 -394 -293 -333 -294
+-259 -301 -176 -310 -87 -315 3 -311 87 -287 161 -234 215 -144 244 -7 237 183
+182 427 65 727 -132 1080 -432 1471 -848 1880 -1370 2263 -1925 2567 -2361 2769
+-2645 2902 -2624 2933 286 1797 3755 -705 3171 -2773 1532 -1897 1118 -915
+636 -2145 -185 -3134
+8: 898 -11213 -591 -325 -585 -296 -567 -267 -540 -243 -498 -224 -442 -213
+-372 -206 -291 -202 -202 -194 -111 -176 -24 -139 50 -71 103 35 127 188 109 393
+37 650 -105 952 -335 1281 -668 1611 -1101 1905 -1581 2125 -1957 2219 -1968 2123
+-1462 1769 -924 1518 -924 1495 3095 -2090 3298 -1453 2284 -1197 -736 -682
+983 -1073 1002 -3205
+9: 299 -11436 -663 -310 -663 -275 -655 -237 -637 -202 -604 -171 -556 -148
+-490 -128 -412 -111 -322 -92 -229 -63 -138 -16 -59 61 -3 177 23 342 6 557
+-64 823 -202 1125 -423 1433 -739 1703 -1151 1887 -1604 1941 -1908 1856
+-1633 1562 -301 701 169 192 -158 600 1102 -1285 3892 -1075 734 -429 262 -858
+248 -1211 1092 -2529
+10: -192 -11437 -729 -320 -738 -277 -741 -230 -735 -183 -714 -141 -673 -104
+-615 -71 -538 -42 -446 -14 -347 23 -249 75 -162 154 -95 273 -60 438 -62 660
+-112 932 -217 1238 -388 1541 -637 1773 -980 1854 -1425 1726 -1884 1463
+-1835 1296 626 440 839 696 -805 -950 675 -1036 4029 -688 210 -2089 1085 -24
+-138 -838 328 -1417
+11: -559 -11168 -788 -361 -808 -309 -826 -252 -835 -194 -827 -137 -798 -85
+-745 -38 -668 2 -572 39 -464 79 -354 130 -252 203 -171 313 -117 470 -98 687
+-115 961 -170 1281 -261 1604 -388 1849 -570 1874 -871 1503 -1453 663 -2290 -114
+104 1078 789 -131 164 -22 1680 -765 4263 -160 -787 -1958 2609 -1886 -2732 873
+-29 -276
+12: -789 -10590 -839 -437 -873 -378 -909 -310 -935 -237 -945 -164 -929 -95
+-883 -32 -806 21 -700 67 -578 106 -449 150 -328 208 -226 296 -151 432 -108 627
+-92 893 -99 1224 -112 1599 -113 1941 -75 2099 -9 1802 -158 798 -2134 5 -660 884
+-909 -1955 809 46 864 -927 1716 -1008 2936 -1094 -50 25 -1001 -540 148 -655
+13: -874 -9674 -878 -556 -930 -488 -988 -408 -1038 -320 -1069 -227 -1070 -135
+-1031 -52 -951 18 -832 73 -688 111 -533 142 -384 175 -257 229 -161 323 -97 479
+-59 710 -37 1029 -17 1436 20 1898 103 2309 265 2370 583 1459 1923 -901 -2624 -38
+-3346 -1930 102 16 663 379 973 -2392 1234 -868 -1191 942 187 -3809 909 1161
+14: -810 -8403 -902 -723 -976 -647 -1061 -554 -1142 -445 -1201 -328 -1222 -209
+-1193 -96 -1107 -3 -970 64 -794 104 -601 118 -416 118 -261 126 -143 164
+-64 256 -12 422 22 678 42 1036 42 1490 -8 1932 -193 1847 -1030 -947 127 3077
+-1734 645 -141 -1585 -1138 971 1611 5264 -608 -9267 85 -497 -917 -1288
+796 1568 1477 278
+15: -600 -6782 -906 -943 -1005 -858 -1124 -751 -1245 -620 -1342 -471 -1391 -314
+-1374 -164 -1280 -36 -1115 54 -895 97 -651 95 -418 57 -228 10 -90 -17 -1 1
+61 87 112 247 159 495 175 847 120 1293 38 1673 941 1936 -9941 -936 858 1039
+-1295 -2639 3057 -804 2291 1821 1058 -1212 123 688 680 390 -440 1982 611 313
+16: -255 -4835 -881 -1218 -1011 -1128 -1173 -1005 -1344 -848 -1492 -659
+-1579 -453 -1580 -249 -1478 -73 -1274 52 -993 110 -676 93 -379 15 -146 -93
+4 -185 92 -229 159 -205 246 -111 382 67 568 396 796 1097 1014 2461 0 2000
+-8346 -5148 -6654 4148 2600 -4833 3503 1265 3163 2598 1837 870 -186 126
+143 1015 -128 1314 205 670
+17: 206 -2608 -821 -1550 -983 -1458 -1197 -1322 -1435 -1135 -1652 -897
+-1793 -624 -1819 -349 -1707 -105 -1455 72 -1091 157 -670 133 -282 12 -3 -161
+147 -315 206 -394 252 -378 366 -266 611 -48 1003 357 1540 1418 2577 5461
+-501 -2255 5516 5948 -18845 -6837 0 -5107 2402 2555 4553 2700 1242 348
+-368 554 15 637 -179 1340 -96 1049
+18: 751 -169 -717 -1938 -909 -1851 -1183 -1706 -1510 -1488 -1820 -1188
+-2035 -829 -2098 -459 -1978 -127 -1670 124 -1195 255 -625 237 -104 65 226 -193
+346 -405 326 -493 294 -428 384 -196 713 217 1330 869 2070 1935 2277 3529
+24 1272 7103 3967 -2782 -5390 -9810 -3597 -2867 1487 1170 -514 1204 -5
+64 107 122 1081 -289 1400 -334 1205
+19: 1334 2389 -561 -2377 -773 -2304 -1112 -2162 -1555 -1917 -1996 -1538
+-2311 -1065 -2419 -573 -2295 -132 -1932 210 -1324 413 -533 419 190 188
+576 -195 619 -483 443 -566 243 -436 202 -76 504 525 1285 1262 2419 1785
+2861 1614 258 744 4600 5835 -1610 -5973 -5784 -751 -2652 -890 -2683 -1865
+1273 57 733 862 74 1430 -445 1184 -488 1116
+20: 1890 4955 -353 -2859 -553 -2813 -955 -2692 -1556 -2435 -2181 -1954
+-2620 -1320 -2775 -676 -2644 -120 -2251 317 -1516 619 -396 687 657 403
+1088 -190 986 -572 565 -644 110 -486 -190 -62 -107 705 599 1700 2151 2152
+3558 1268 -1507 -983 42 152 1603 -2650 270 -1361 85 859 -7000 0 1798 903
+-428 542 -32 1121 -308 1103 -438 1050
+21: 2332 7397 -106 -3372 -236 -3370 -662 -3295 -1489 -3073 -2389 -2435
+-2965 -1560 -3134 -725 -2964 -85 -2606 403 -1849 812 -234 1005 1373 728
+1775 -181 1446 -645 703 -683 -10 -593 -617 -297 -874 462 -590 1868 727 2585
+3088 850 -2719 -882 2463 -2273 1661 -1542 403 -247 -803 -600 -2808 2265
+78 552 -268 754 -152 985 -266 998 -380 958
+22: 2553 9565 128 -3909 183 -3962 -150 -3947 -1331 -3900 -2665 -2973 -3354 -1695
+-3442 -625 -3088 7 -2864 391 -2448 853 -86 1168 2369 1054 2538 8 1923 -527
+819 -504 24 -633 -783 -758 -1053 -507 -337 1109 1651 2823 536 -2240 1044 1122
+946 -1948 -80 -814 -1704 2439 -1329 403 -1042 1100 -6 504 -44 770 -102 851
+-225 850 -342 820
+23: 2453 11303 233 -4478 625 -4610 730 -4564 -1058 -5090 -3119 -3498 -3769 -1546
+-3669 -178 -2723 264 -2620 231 -3334 613 251 553 3000 0 3158 1966 2158 218
+815 55 337 -390 -796 -933 -1254 -1571 -797 456 2435 -455 2771 1386 -827 3268
+0 -3000 -510 -862 -2895 2167 -1703 1713 -892 982 151 593 90 586 -70 637
+-225 654 -348 648
+24: 2018 12480 20 -5106 779 -5482 2150 -4984 -657 -6960 -3918 -3730 -3983 -827
+-3972 874 -1687 926 -1286 60 -3464 749 -716 2140 8510 -484 -1773 1318 954 978
+1151 -16 1237 -44 -557 -171 -893 -1011 630 -1280 -303 -5857 2962 3371 -2993 5847
+528 -1758 -1163 250 -3620 1297 -22 1275 144 1277 -37 420 -85 425 -185 475
+-306 485 -413 474
+25: 1482 13045 -595 -5698 -76 -7030 3555 -5891 -75 -9103 -4913 -2783 -2879 620
+-4780 2466 -842 2224 -1877 150 899 5691 -4885 5468 9110 -4286 -849 -657
+27 -1439 790 -1014 1344 195 -172 -280 -633 -726 369 -1130 22 -1009 -22 2187
+-1000 0 -51 -252 -87 1011 -3027 403 -787 279 904 2090 38 1229 -150 767 -289 523
+-419 392 -521 320
+26: 1355 12925 -894 -5548 -930 -7327 -2531 -19050 1950 -360 -2950 -640
+2000 2000 -4428 2801 -435 3572 -167 2638 386 3423 -965 1454 2797 9 519 847
+-1666 -1917 1959 -4827 1000 3000 -886 -211 -1177 -2017 439 -905 749 -2342
+-191 5903 406 2279 -2340 -8707 674 987 -4677 5266 -25 -1215 1305 2437 588 1784
+-4 996 -354 519 -556 270 -669 146
+27: 1459 11181 -1466 -7182 -2572 -10336 -3104 -11802 1118 -1032 3176 911
+-611 4260 -2000 0 -619 3300 -2381 700 -1000 4000 0 -4000 2404 3094 5349 7048
+1689 4151 -991 -3201 131 63 -2168 386 1542 242 -560 -3732 80 -2204 493 3164
+1412 2599 318 -2751 -1207 -4294 -5222 -3431 -2270 3866 520 1894 163 1104
+-327 566 -631 218 -792 16 -873 -88
+28: 2203 10314 -830 -6011 -1373 -7303 -4130 -9160 -817 1919 3956 749 -1009 1492
+221 -1684 2270 2426 -2873 3931 -2405 -482 2282 309 2655 2770 3130 5110
+1455 3807 -535 -219 -587 -72 -1198 71 457 -475 -266 -2633 -86 -1848 222 551
+326 205 -885 -2650 -2183 -2117 -1600 -1445 569 2262 -1413 425 -1219 69
+-1107 -98 -1098 -227 -1110 -316 -1112 -365
+29: 2716 10001 -644 -4332 -1204 -4602 -2281 -3934 -319 1881 2290 2592
+-73 -1368 577 -1976 1226 678 -1193 2021 -1019 265 1543 1065 2171 2483 2097 3629
+1087 2963 -136 972 -554 260 -736 -122 -151 -785 -284 -1841 -246 -1646 -177 -779
+-348 -949 -1043 -1950 -1496 -1537 -785 -809 26 629 -1182 -51 -1483 -404
+-1478 -541 -1425 -604 -1375 -633 -1328 -640
+30: 3029 9940 -431 -2553 -758 -2281 -989 -1183 36 1426 1195 1655 548 -691
+693 -1266 753 -73 -164 811 -55 576 1094 1158 1573 2020 1451 2592 814 2237
+47 1191 -382 422 -535 -164 -382 -796 -399 -1427 -411 -1516 -453 -1290 -631 -1364
+-965 -1632 -1085 -1356 -727 -853 -505 -282 -1099 -484 -1463 -716 -1581 -842
+-1583 -891 -1541 -903 -1490 -894
+31: 3263 9862 -143 -949 -274 -581 -241 203 289 1267 831 1191 750 -14 764 -535
+696 -141 363 355 425 565 901 1014 1144 1543 1026 1844 608 1640 101 1035
+-260 405 -438 -173 -461 -729 -496 -1199 -542 -1406 -614 -1430 -746 -1484
+-908 -1531 -950 -1354 -827 -1061 -822 -811 -1145 -862 -1437 -992 -1593 -1084
+-1643 -1128 -1633 -1136 -1596 -1125
+32: 3476 9640 176 430 146 687 231 1079 513 1415 789 1190 837 486 835 38
+769 55 633 269 646 489 808 801 876 1120 747 1278 449 1148 92 765 -203 287
+-393 -203 -490 -673 -563 -1065 -630 -1312 -711 -1435 -809 -1506 -904 -1520
+-946 -1426 -943 -1278 -1014 -1165 -1223 -1178 -1442 -1248 -1592 -1310
+-1667 -1343 -1682 -1351 -1667 -1343
Added: trunk/toolkits/basemap/datumgrid/MD.lla
===================================================================
--- trunk/toolkits/basemap/datumgrid/MD.lla (rev 0)
+++ trunk/toolkits/basemap/datumgrid/MD.lla 2010-08-29 13:26:17 UTC (rev 8669)
@@ -0,0 +1,70 @@
+Maryland - HP
+ 25 17 1 -80.00000 .25000 37.00000 .25000
+0: 5107 -2502 -700 496 -656 468 -587 418 -481 347 -325 256 -111 152 166 50
+493 -37 854 -96 1221 -118 1568 -125 1953 -143 2433 -195 2464 -281 2529 -395
+1987 -729 447 -916 -3011 -1181 -5559 -406 -6094 541 -5714 1110 -5247 1289
+-4993 1254 -4960 1151
+1: 4757 -1695 -644 429 -627 411 -602 368 -555 299 -470 206 -328 96 -125 -15
+126 -105 391 -146 634 -120 762 -58 911 -13 1583 -8 1049 -28 1451 123 1377 -464
+907 -603 -4056 -1955 -6769 -485 -5797 929 -4254 1413 -3251 1295 -2871 993
+-2899 724
+2: 4413 -932 -563 355 -566 354 -582 322 -597 258 -579 164 -499 45 -341 -84
+-127 -192 93 -234 288 -157 190 -25 -145 65 1065 74 -1087 -40 -877 1058 -994 18
+1208 694 -5540 -3840 -7658 -332 -4130 1732 -1668 1786 -634 1127 -525 501
+-856 110
+3: 4055 -240 -456 271 -467 294 -520 279 -598 226 -652 137 -622 9 -469 -140
+-216 -285 27 -362 263 -223 177 -13 -96 71 110 26 -1646 -1167 -6731 2306
+-6507 1730 -6212 3695 -4277 -7455 -3522 570 519 3029 2116 1873 2259 459
+1672 -383 871 -737
+4: 3649 351 -332 164 -326 230 -409 235 -557 201 -693 131 -718 0 -535 -165
+-101 -346 460 -493 33 -283 -1321 62 -1559 1 -5178 295 -5413 -3383 -1930 1443
+-2892 564 -10423 1293 -5171 1702 -2535 2461 2932 4061 4566 750 4123 -1116
+2992 -1715 1857 -1727
+5: 3144 806 -212 20 -145 160 -245 172 -468 175 -706 151 -825 16 -677 -154
+-182 -358 990 -703 -674 -285 -5937 730 -3063 -730 -2085 -867 -3581 281
+-2334 586 -1865 759 -5614 1473 -3452 5821 -3401 5679 1428 2413 4628 -2496
+4177 -3412 2947 -3078 1846 -2521
+6: 2486 1092 -149 -192 58 93 -44 50 -322 127 -644 224 -873 34 -771 -149
+-678 -275 1770 -1075 -356 -827 -5051 5 -7881 816 -1030 443 -515 634 -2144 1008
+-1825 1030 -2498 1380 -732 4469 -286 5830 843 2970 3527 -3923 2622 -4302
+1634 -3420 962 -2613
+7: 1654 1205 -254 -546 221 60 99 -240 -127 38 -418 455 -728 36 -31 -311
+-225 -355 -33 -358 -3518 -30 -4640 -954 -5000 1000 -1818 2806 1675 -346
+-1857 1540 -225 -656 -1646 2284 2156 3127 2865 2526 3328 2398 1668 -4480
+57 -3443 -249 -2495 -233 -1941
+8: 774 1247 -684 -1157 78 -16 -159 -920 104 -45 117 1090 -906 205 695 -339
+-472 -133 -1852 1212 -5751 619 -1944 -763 0 0 -1000 1000 0 2000 -781 1116
+399 1285 -1441 1545 4580 1012 1900 -687 3393 1019 2580 -6254 -1198 -1689
+-1158 -1160 -867 -1068
+9: 286 1527 -1064 -1509 -1784 -1841 -1774 -1770 671 449 1944 1770 -864 986
+-654 174 -459 -486 -3471 4225 -753 -3046 -1998 -493 920 1014 -194 1777
+219 1456 -220 1705 -4805 4062 4000 -1000 1438 -738 1687 -1949 4875 -1313
+137 -2862 1175 -2395 -88 -1276 -580 -789
+10: 155 1275 -1109 -3207 -3642 -4791 -2359 752 -671 811 -127 1647 2394 2226
+143 593 -1814 676 -2822 760 3 -1215 2849 -1527 273 2735 -238 2454 -152 3485
+1117 -674 1000 0 -2868 944 -947 22 3163 1227 3618 -1203 2940 -5487 -80 -2667
+-428 -1173 -531 -579
+11: 210 2136 -191 -2212 -19 -4924 -671 974 -2112 719 -1798 471 60 914 304 1048
+-2565 1609 -3875 184 1862 -2588 7166 1567 -242 2228 -1731 3121 2189 749
+-4055 528 -454 -2297 -78 773 -1000 -1000 2289 1712 5097 -691 -167 -5244
+240 -1551 -59 -589 -233 -314
+12: 136 2158 79 -2113 870 -2292 -87 492 -1395 1041 -324 108 1093 15 -372 591
+-3302 -1631 1228 1503 2274 -18 348 98 -548 48 3116 847 -2761 -369 -1636 4272
+-1692 3024 -2566 -1109 3539 -5665 -2548 3660 4460 -4303 33 -1230 -83 -215
+64 -282 7 -263
+13: 437 2268 560 -1486 885 -1135 371 147 -233 547 243 42 679 -222 -336 -237
+-1466 -996 550 564 492 316 -1347 86 -1522 -8 -3178 -134 3508 29 224 1615
+-978 2218 111 -3614 1000 -1000 814 1143 -1762 1626 28 -784 -14 -140 274 -574
+170 -385
+14: 853 2381 888 -971 974 -638 715 -41 417 171 481 -79 441 -329 -174 -472
+-704 -640 -236 -12 -607 49 -1686 -95 -2002 -238 -1988 -349 1822 -129 995 494
+219 507 526 -1730 552 -212 170 1146 -1495 1850 -678 543 -301 275 -1 -88
+30 -81
+15: 1272 2398 1135 -612 1122 -398 955 -126 740 -45 598 -193 366 -390 -90 -527
+-502 -568 -637 -337 -1047 -270 -1628 -342 -1734 -438 -1191 -480 655 -329
+834 -53 575 -59 523 -598 291 234 -200 1168 -1032 1651 -848 1158 -561 799
+-319 502 -228 413
+16: 1671 2307 1341 -357 1280 -252 1127 -153 911 -156 671 -279 357 -439
+-57 -566 -460 -614 -776 -555 -1133 -534 -1436 -571 -1391 -613 -871 -599
+97 -470 476 -272 475 -136 364 -48 91 536 -331 1193 -799 1568 -849 1461 -725 1247
+-579 1047 -498 951
Added: trunk/toolkits/basemap/datumgrid/TN.lla
===================================================================
--- trunk/toolkits/basemap/datumgrid/TN.lla (rev 0)
+++ trunk/toolkits/basemap/datumgrid/TN.lla 2010-08-29 13:26:17 UTC (rev 8669)
@@ -0,0 +1,72 @@
+Tennessee - HP
+ 41 13 1 -91.00000 .25000 34.00000 .25000
+0: 4428 -22007 -1493 4893 -1577 5555 -1600 6225 -1405 5086 -965 1594 -1701 -1996
+-2039 -3629 -1741 -3344 -815 -1573 494 700 1259 1802 1435 1879 1325 1617
+1153 1350 1009 1144 885 1001 778 868 707 653 744 389 841 191 927 57 931 -55
+770 -133 351 -128 -257 -37 -607 -22 -737 -63 -743 -99 -678 -91 -560 -30
+-416 38 -280 74 -175 66 -102 31 -54 -8 -26 -41 -11 -60 -5 -71 -6 -73 -10 -70
+1: 3780 -18301 -1014 3344 -1198 4442 -1427 6806 -1330 6403 118 1384 -1798 -3653
+-2337 -5100 -2065 -4288 -954 -1580 1037 1956 1772 2803 1591 2110 1187 1417
+865 1022 694 810 561 754 431 767 300 564 399 238 602 75 797 25 926 -76 882 -173
+432 -168 -496 49 -785 39 -800 -58 -737 -137 -642 -130 -489 -13 -301 104
+-146 160 -46 133 7 73 30 15 39 -23 39 -41 32 -46 25 -45 15 -38
+2: 3069 -14097 -393 1440 -561 2094 -1223 6705 -1961 7926 1706 1136 -2308 -5180
+-2320 -5540 -2111 -4420 -1122 -1101 1818 3758 2256 3591 1515 1676 829 738
+424 480 357 358 273 454 155 786 -183 562 41 35 350 -45 609 92 842 -20 992 -165
+588 -224 -866 182 -861 84 -731 -82 -648 -214 -592 -222 -424 11 -164 201
+11 278 89 207 108 101 102 26 89 -10 74 -20 60 -19 46 -10 34 0
+3: 2036 -8580 276 277 983 -599 -510 2225 -1953 5028 -1355 918 -1485 -2621
+-646 -2637 -1037 -2105 -236 1836 1439 3031 2063 2724 988 58 257 -375 -160 -55
+89 -77 91 65 124 1042 -806 722 -215 -297 136 -170 329 352 528 121 879 -7
+201 -18 -794 57 -492 2 -427 -117 -460 -287 -591 -403 -424 80 5 335 195 442
+217 266 181 97 144 20 116 3 92 10 73 22 58 35 46 47
+4: 287 -1924 -453 1080 -331 3 2355 -7518 -858 2359 -3610 -2302 575 3050
+1411 1053 432 3839 -252 90 303 163 1142 119 774 -805 -8 -1014 -755 -120
+-12 -73 46 -498 607 1411 -1622 1049 -8 -684 10 -208 0 821 -33 109 994 45
+-23 190 -839 -183 -74 50 -109 73 -267 -134 -800 -764 -629 316 275 425 405 661
+304 257 190 30 139 10 112 38 91 67 73 85 60 97 52 105
+5: -865 3376 -382 913 -44 -261 1057 -3331 -508 -2245 742 -3452 775 -1825
+-559 27 1784 1798 737 1534 -2211 1916 -525 -445 1059 -829 775 -1226 -946 -789
+-613 1793 620 -328 564 -481 -1185 836 1279 836 -572 345 -171 501 -881 -280
+962 -334 169 767 678 -1396 -1259 824 78 836 -143 828 -1381 -1522 -1321 1038
+903 11 594 946 264 66 77 -98 79 60 86 143 74 176 64 182 56 178 53 174
+6: -1343 6747 -88 292 232 -825 700 -2723 317 -3600 220 -3850 200 -1389
+784 -730 1893 125 1140 212 -216 618 -3344 1373 -992 -463 1441 -1220 -673 -1585
+592 -975 -498 836 816 1029 -122 1065 805 1213 67 777 -417 -867 -2156 -452
+1484 229 295 930 833 -644 -135 -680 -38 1930 133 3340 -1820 -2259 -3171 2527
+2553 -2627 483 1358 -55 -352 -228 -120 3 358 68 383 61 351 52 310 51 273
+52 247
+7: -1388 8391 183 -350 407 -1309 560 -2735 238 -3997 -42 -4199 71 -1137
+986 -992 1896 -487 1923 -342 237 149 280 -714 -1945 -467 -1380 -467 -1011 -371
+-834 -58 -158 -7 1730 2420 237 1669 164 -191 665 -772 723 -1413 -3157 345
+324 726 329 497 1138 1010 -121 -133 -175 -268 -51 4070 2416 8621 -8245 -1489
+5673 -10573 -529 1071 -827 490 -744 521 87 1194 130 721 64 551 45 439 48 362
+56 311
+8: -1226 8668 372 -864 552 -1607 648 -2768 398 -4734 -744 -9695 44 2104
+907 915 2135 -112 1924 -870 990 963 66 -49 -1087 -39 -2185 14 -1731 115
+-1028 -154 -294 -680 -1047 2008 2306 1785 1325 -1428 623 -2381 922 -799
+-2498 1892 -1328 829 885 93 580 1349 576 1217 12 -1876 -97 104 -616 1461
+-931 1274 641 -1811 -915 917 -299 -301 -1130 436 746 2382 319 748 68 663
+38 517 51 417 62 354
+9: -1031 7928 431 -1230 551 -1693 574 -2266 289 -3136 -774 -5420 881 -309
+-40 209 2144 -2843 1906 -2731 630 3134 902 1630 -1538 739 -1788 -303 -2169 90
+-968 -799 -248 349 -752 651 633 1763 1973 -1677 -241 -2784 761 1326 -1204 715
+-841 2315 733 577 2318 604 1564 14 740 -2126 -2785 -760 -1562 2680 -259 -93
+-254 487 -1576 -41 795 -1621 -2359 -288 1945 3980 577 -12 -18 710 15 520
+53 425 71 367
+10: -885 6528 377 -1487 428 -1749 404 -1817 238 -1402 -132 -1485 293 583
+-1609 -1903 603 -5543 341 6911 -891 -1006 4153 -596 581 -549 -1636 -2262
+-1235 290 -986 1249 -792 -297 691 542 87 2083 88 -194 793 190 -515 -726
+-295 193 -168 1078 -910 1303 1418 698 1650 -729 -160 -1305 -3097 -1402
+2044 1640 -870 -591 -202 171 -706 -189 817 -396 -1835 172 -131 615 2670 852
+-539 476 -59 457 45 400 75 354
+11: -792 4852 259 -1571 258 -1740 205 -1615 161 -93 -68 78 -214 222 -936 -1563
+147 -2586 598 2672 188 1463 1970 688 681 371 -1504 -866 -222 708 -687 -1579
+-6 -404 826 -952 -34 2378 -753 786 -287 433 -361 -358 -228 -75 -227 374
+-444 519 710 -70 989 -1131 26 -1638 -986 -1436 841 556 -277 83 -228 258
+-292 107 130 42 -820 165 -28 216 1382 525 99 410 16 381 51 349 78 321
+12: -729 3220 132 -1351 115 -1285 70 -874 15 145 -134 465 -293 299 -469 -539
+47 -619 440 1495 483 1720 994 1314 412 822 -565 50 -136 69 -190 -1194 167 -806
+416 -572 -146 1121 -691 793 -600 383 -479 -159 -323 -266 -231 -229 -124 -363
+458 -902 717 -1662 439 -2116 168 -1882 116 411 -205 548 -226 540 -208 421
+-101 321 -326 275 64 248 641 360 262 339 120 317 96 296 99 278
Added: trunk/toolkits/basemap/datumgrid/WI.lla
===================================================================
--- trunk/toolkits/basemap/datumgrid/WI.lla (rev 0)
+++ trunk/toolkits/basemap/datumgrid/WI.lla 2010-08-29 13:26:17 UTC (rev 8669)
@@ -0,0 +1,121 @@
+Wisconsin - HP
+ 33 25 1 -94.00000 .25000 42.00000 .25000
+0: 1142 -2439 -9 236 -4 218 3 196 11 171 18 143 24 117 28 93 21 74 -7 64 -62 57
+-151 10 -225 -154 -63 -403 -174 -312 -109 -375 719 -221 484 11 -544 454
+778 199 399 -131 482 334 1322 -1332 466 -2511 25 -1372 -3555 -3448 -5228 -413
+-4418 992 -3463 1547 -2945 1834 -2806 2036 -2895 2186 -3089 2289
+1: 962 -2138 -21 236 -17 215 -14 188 -10 161 -8 137 -5 116 0 103 -4 101 -29 128
+-94 195 -226 268 -450 166 77 -52 -177 185 -345 -67 1266 -30 758 66 -2237 666
+637 96 -1126 -674 -787 1772 867 -1040 -715 -2820 291 1249 -5772 -5028 -5685 625
+-2814 1117 -1412 1110 -1050 1180 -1186 1314 -1522 1455 -1903 1573
+2: 789 -1853 -29 240 -26 212 -27 179 -29 147 -35 124 -38 108 -36 97 -39 91
+-73 111 -155 193 -302 351 -899 28 -3 1571 93 396 809 1005 933 26 1061 901
+-1277 -638 -1717 -289 -3934 -1909 816 1843 -2988 -654 9 -323 -4099 1350
+-11582 532 -703 -565 1348 -475 1346 -154 837 167 207 447 -418 678 -972 858
+3: 626 -1593 -31 249 -30 212 -30 169 -40 129 -57 109 -75 103 -74 102 -72 84
+-145 61 -357 63 -715 360 -934 1755 -8 140 -147 130 2178 -1107 -475 3922
+1496 1973 -977 -20 -2133 159 -3098 -1078 -853 -668 -1175 -182 -4471 305
+-4241 5372 -11726 2321 1303 -2332 2775 -1960 2375 -1259 1651 -726 889 -329
+178 -20 -427 215
+4: 478 -1372 -30 268 -23 218 -22 158 -33 104 -67 88 -106 112 -103 149 -39 161
+-71 165 -279 98 -723 336 -906 3204 -74 516 -1855 765 -982 1893 69 2079 3646 -888
+-922 -15 -235 719 -2777 -1741 -1142 -103 -1804 86 -2956 1757 -1355 2255
+-3134 1816 -3203 103 -128 -984 1112 -1213 1179 -1075 762 -814 214 -536
+-302 -290
+5: 348 -1202 -25 299 -11 235 4 147 4 62 -46 46 -130 114 -143 230 57 315 157 508
+223 453 436 -126 -19 2708 -902 1099 -1702 1214 -1251 898 -1389 1090 -605 -59
+-6 -31 900 1775 -64 -924 -1836 -851 -1235 -23 -1467 787 -522 1401 -1184 2449
+-1736 1127 -501 -242 316 -968 467 -1169 234 -1078 -139 -864 -510 -635
+6: 238 -1102 -22 346 1 271 43 145 83 -10 35 -43 -116 59 -232 271 114 384
+163 885 -209 1025 -1048 -1897 -50 2666 1000 2000 1000 3000 -3204 899 -3657 -801
+-255 -263 121 -887 -90 138 67 -175 48 913 15 357 30 1633 408 1889 -765 1792
+-85 973 98 -205 19 -979 -185 -1264 -443 -1227 -704 -1042 -930 -825
+7: 156 -1093 -27 409 -4 335 65 174 195 -109 205 -181 40 -99 -123 93 17 377
+516 888 69 909 -2504 1753 -1605 -456 2000 4000 -1616 -315 -2672 -664 -3712 -1021
+1785 209 846 -379 -473 1235 714 -95 983 1023 1307 762 1190 1830 1358 2334
+-710 2081 1700 772 669 -488 -327 -1192 -905 -1387 -1204 -1290 -1358 -1081
+-1438 -866
+8: 114 -1197 -36 471 -38 418 11 270 246 -190 339 -236 156 -137 -83 56 -170 677
+1969 2103 -321 3927 -6425 -228 238 -2934 -2825 -2596 -1107 1550 811 265
+-666 123 -197 833 -16 -175 1144 678 1132 434 2328 1064 1755 1036 3196 1540
+1493 2616 1952 2632 2169 1092 36 -792 -1226 -1434 -1792 -1434 -1980 -1216
+-1982 -967 -1912 -760
+9: 130 -1426 -28 508 -64 452 -90 282 -22 -35 144 -52 -13 211 -156 41 -1453 1063
+719 1943 -896 4530 -6271 -1517 -104 -2066 1068 -925 -361 -53 -1982 -944
+1379 -12 -952 965 -1070 -797 2239 624 1667 -203 4486 701 2870 1044 3892 1732
+3191 2514 1811 2523 3311 1338 -956 -1332 -2114 -1570 -2499 -1269 -2540 -935
+-2409 -686 -2221 -523
+10: 206 -1747 15 555 -56 549 -244 443 -642 173 -1140 20 -960 1837 53 -952
+-296 140 -5773 2701 -4163 -1719 -804 1949 2804 51 2534 -368 -355 -591 1447 -1726
+334 650 -359 97 -3335 800 2697 -1044 1647 -4023 16184 4356 3962 2167 932 5018
+-1556 -308 -158 91 1802 -533 -856 -1170 -1910 -1167 -2509 -752 -2635 -438
+-2489 -275 -2262 -206
+11: 317 -2136 114 611 127 731 52 866 -353 852 -1022 243 -1368 2721 -5443 12
+-3424 100 -3449 1816 -3385 -2127 1752 -602 2884 -927 3992 -127 2172 904
+1956 -66 -514 -1139 -720 -845 -371 -437 -412 836 1652 -861 10857 -5335
+17344 -13635 39679 -18671 -40694 36552 -10007 7834 -814 -887 599 -2128
+-621 -1143 -1919 -233 -2275 81 -2196 126 -2005 89
+12: 380 -2585 181 602 339 824 723 1249 1377 1910 -107 1194 -5794 1662 -5583 1775
+-1598 -658 -1308 901 -2569 176 3177 -2081 1537 -2218 468 -1548 2980 956
+324 50 -723 -1427 -1159 -1287 2355 505 1492 309 -1213 814 -7803 -4600 5901 -6146
+26567 -18529 -10372 21045 -4757 11552 862 651 1323 -3096 1006 -1396 -1264 193
+-1632 412 -1591 355 -1490 258
+13: 338 -3044 56 492 21 635 -43 831 130 1333 3437 5060 -4977 1084 -8092 2428
+-529 -1856 2522 114 1587 392 4576 -1342 -83 -1159 -1736 865 4841 -2658
+-1515 -1462 -2283 1122 -1734 -5519 1727 1103 -934 814 -787 -239 -8829 -2963
+-10693 -3031 12771 2677 4136 3094 3693 2953 3333 -96 1733 -1087 1142 -586
+-526 127 -684 291 -760 297 -829 250
+14: 300 -3401 -37 454 -150 702 -367 1139 -720 1828 -1336 1531 -1339 5182
+-2773 155 2106 -380 1087 -1387 3721 -1719 2310 32 456 -120 742 -16 1655 -160
+-988 50 -1105 1159 -1133 -3569 4 -313 -2867 541 -3983 855 -11104 -3164
+2270 -5082 7686 1598 2136 2220 1634 1412 1577 315 277 -22 829 34 -745 123
+55 59 -61 122 -256 147
+15: 325 -3665 -54 412 -133 738 -305 1282 -833 2233 -3111 4516 2527 7153
+5200 -902 1671 -2632 -1102 -3172 -105 -1837 2154 -742 -1982 1391 625 158
+244 -129 -160 -565 216 686 -334 -1090 -1269 90 -1522 56 -432 -627 2310 -7203
+-1769 -1452 -673 2171 -764 2065 -903 1030 -390 -25 -340 -100 59 -6 -353 30
+62 -6 127 24 25 54
+16: 403 -3896 -56 315 -85 689 -102 1244 -72 1989 136 2611 1494 3958 2390 42
+197 178 -481 -1145 1039 -106 -459 -919 435 -20 160 184 -27 -148 -260 -181
+414 -492 35 -190 -1570 -225 406 434 2134 -370 6112 -2074 -1820 -4189 -7219 529
+-1826 901 -1739 972 -631 9 -413 -143 -191 -96 -189 -61 38 -59 141 -40 117 -17
+17: 520 -4172 -83 125 -123 511 -146 1010 -38 1486 676 1817 -821 1175 2015 3048
+-175 373 -1334 480 3189 -750 172 48 478 -3 933 663 1404 138 -422 273 -506 -1238
+-2394 -1351 -204 -1819 566 -693 -594 -1225 6646 2265 -307 -2024 -4556 -563
+-2739 109 -1963 354 -1008 48 -564 -92 -304 -111 -165 -102 0 -98 100 -85
+115 -70
+18: 694 -4558 -109 -173 -174 252 -276 870 -421 1650 -542 2308 -90 845 3268 4894
+-759 112 -629 -130 575 -159 2441 -41 934 67 977 -577 3696 1106 7694 2089
+-12687 -4638 -8040 -3403 2997 -480 512 249 -344 -398 4851 1203 1431 -461
+-1711 -421 -1978 -162 -1675 -13 -1007 28 -610 -54 -357 -100 -188 -117 -49 -121
+38 -117 68 -111
+19: 942 -5097 -104 -625 -138 -252 -175 314 -187 1120 -149 2147 -371 2824
+-559 4060 9826 3350 -5878 -1630 -1718 -319 3515 -502 1111 1664 -688 -828
+2873 1448 3923 1087 -6691 -2448 -5696 -3595 -80 -2854 -323 -100 165 145
+2528 648 1427 52 -327 -163 -1042 -153 -1121 -98 -840 -51 -572 -76 -368 -109
+-217 -129 -102 -140 -30 -144 4 -142
+20: 1238 -5750 -94 -1191 -95 -969 -76 -682 -15 -418 64 -332 -144 -155 -1857 5519
+1958 4101 148 2169 597 1518 3682 2085 2109 2553 -1401 -1172 736 1535 1344 -16
+-3061 -1900 -3399 -2921 -1191 -2567 -557 -882 170 -149 1273 224 1011 85
+153 -61 -437 -115 -654 -114 -605 -100 -475 -110 -345 -130 -235 -148 -150 -160
+-94 -168 -66 -171
+21: 1548 -6408 -116 -1732 -116 -1605 -112 -1432 -122 -1215 -222 -834 -614 353
+-1365 3851 104 4149 556 3567 560 3306 2935 2120 2372 2503 169 597 334 987
+239 -83 -1513 -1348 -1955 -2107 -1167 -1985 -566 -1111 48 -463 640 -104
+639 -44 251 -84 -131 -119 -347 -133 -401 -136 -368 -144 -305 -157 -241 -172
+-189 -184 -152 -193 -134 -198
+22: 1852 -6980 -177 -2161 -192 -2040 -224 -1824 -298 -1451 -459 -746 -744 632
+-963 2795 -278 3694 368 3792 849 3565 2047 2766 1926 2465 861 1445 455 995
+70 133 -745 -788 -1082 -1380 -828 -1426 -444 -1023 -24 -596 326 -305 391 -184
+224 -157 -3 -160 -173 -168 -258 -172 -278 -179 -267 -189 -242 -200 -219 -211
+-203 -220 -196 -226
+23: 2146 -7440 -260 -2464 -291 -2299 -346 -1990 -436 -1469 -568 -623 -711 650
+-706 2178 -281 3154 280 3541 832 3481 1481 3025 1518 2570 1027 1852 612 1219
+211 467 -261 -261 -515 -767 -467 -929 -268 -801 -20 -578 184 -389 247 -278
+174 -230 41 -215 -84 -211 -169 -213 -217 -217 -236 -224 -243 -231 -244 -241
+-246 -248 -249 -254
+24: 2438 -7814 -354 -2672 -393 -2447 -449 -2055 -522 -1446 -599 -573 -635 553
+-537 1758 -211 2673 242 3174 711 3277 ...
[truncated message content] |
|
From: <js...@us...> - 2010-08-30 15:20:48
|
Revision: 8672
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8672&view=rev
Author: jswhit
Date: 2010-08-30 15:20:42 +0000 (Mon, 30 Aug 2010)
Log Message:
-----------
change version number to 1.0.1
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-08-30 15:18:39 UTC (rev 8671)
+++ trunk/toolkits/basemap/Changelog 2010-08-30 15:20:42 UTC (rev 8672)
@@ -1,4 +1,7 @@
-version 1.0 (svn revision 8531)
+version 1.0.1 (not yet released).
+ * add datum grid shift files, so that pyproj.transform can do datum
+ shifts.
+version 1.0 (svn revision 8531)
* don't force adjustable='box' so Basemap is compatible
with AxesGrid. Added fcstmaps_axesgrid.py example.
* add support for plotting on unstructured grids using
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-08-30 15:18:39 UTC (rev 8671)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-08-30 15:20:42 UTC (rev 8672)
@@ -52,7 +52,7 @@
else:
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '1.0'
+__version__ = '1.0.1'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2010-08-30 15:18:39 UTC (rev 8671)
+++ trunk/toolkits/basemap/setup.py 2010-08-30 15:20:42 UTC (rev 8672)
@@ -241,7 +241,7 @@
setup(
name = "basemap",
- version = "1.0",
+ version = "1.0.1",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-09-07 17:50:02
|
Revision: 8683
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8683&view=rev
Author: jswhit
Date: 2010-09-07 17:49:56 +0000 (Tue, 07 Sep 2010)
Log Message:
-----------
add removeparallels and removemeridians convenience methods.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-09-06 01:51:58 UTC (rev 8682)
+++ trunk/toolkits/basemap/Changelog 2010-09-07 17:49:56 UTC (rev 8683)
@@ -1,6 +1,7 @@
version 1.0.1 (not yet released).
* add datum grid shift files, so that pyproj.transform can do datum
shifts.
+ * add removeparallels and removemeridians convenience methods.
version 1.0 (svn revision 8531)
* don't force adjustable='box' so Basemap is compatible
with AxesGrid. Added fcstmaps_axesgrid.py example.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-06 01:51:58 UTC (rev 8682)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-07 17:49:56 UTC (rev 8683)
@@ -2017,6 +2017,29 @@
if v == ([], []): del linecolls[k]
return linecolls
+ def removeparallels(self,pdict,lat=None):
+ """
+ Given a dictionary returned by ``drawparallels``, remove parallels
+ (latitude lines) and associated labels from the map.
+
+ .. tabularcolumns:: |l|L|
+
+ ============== ====================================================
+ Keyword Description
+ ============== ====================================================
+ lat latitude value to remove (Default None, removes all
+ of them)
+ ============== ====================================================
+ """
+ if lat is not None and lat not in pdict.keys():
+ raise ValueError('latitude %s not drawn' % lat)
+ for key in pdict.keys():
+ if lat is None or key == lat:
+ tup = pdict[key]
+ for item in tup:
+ for x in item:
+ x.remove()
+
def drawmeridians(self,meridians,color='k',linewidth=1., zorder=None,\
dashes=[1,1],labels=[0,0,0,0],labelstyle=None,\
fmt='%g',xoffset=None,yoffset=None,ax=None,latmax=None,
@@ -2260,6 +2283,24 @@
if v == ([], []): del linecolls[k]
return linecolls
+ def removemeridians(self,mdict,lon=None):
+ """
+ Given a dictionary returned by ``drawmeridians``, remove meridians
+ (longitude lines) and associated labels from the map.
+
+ .. tabularcolumns:: |l|L|
+
+ ============== ====================================================
+ Keyword Description
+ ============== ====================================================
+ lon longitude value to remove (Default None, removes all
+ of them)
+ ============== ====================================================
+ """
+ if lon is not None and lon not in mdict.keys():
+ raise ValueError('longitude %s not drawn' % lon)
+ self.removeparallels(mdict,lat=lon)
+
def tissot(self,lon_0,lat_0,radius_deg,npts,ax=None,**kwargs):
"""
Draw a polygon centered at ``lon_0,lat_0``. The polygon
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-09-08 12:00:38
|
Revision: 8686
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8686&view=rev
Author: jswhit
Date: 2010-09-08 12:00:32 +0000 (Wed, 08 Sep 2010)
Log Message:
-----------
reconsider removeparallels and removemeridians. Add remove method to tuples contained
in dicts returned by drawparallels and drawmeridians instead.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-09-07 23:15:27 UTC (rev 8685)
+++ trunk/toolkits/basemap/Changelog 2010-09-08 12:00:32 UTC (rev 8686)
@@ -1,6 +1,6 @@
version 1.0.1 (not yet released).
- * add datum grid shift files, so that pyproj.transform can do datum
- shifts.
+ * add a remove method to the tuples that are returned in
+ the dicts returned by drawparallels and drawmeridians.
* add removeparallels and removemeridians convenience methods.
version 1.0 (svn revision 8531)
* don't force adjustable='box' so Basemap is compatible
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-07 23:15:27 UTC (rev 8685)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-08 12:00:32 UTC (rev 8686)
@@ -1814,9 +1814,11 @@
============== ====================================================
returns a dictionary whose keys are the parallel values, and
- whose values are tuples containing lists of the
+ whose values are tuple-like objects containing lists of the
matplotlib.lines.Line2D and matplotlib.text.Text instances
- associated with each parallel.
+ associated with each parallel. Each one of these tuple-like
+ objects has a ``remove`` method so it can be easily removed
+ from the plot.
"""
# get current axes instance (if none specified).
ax = ax or self._check_ax()
@@ -2015,41 +2017,10 @@
keys = linecolls.keys(); vals = linecolls.values()
for k,v in zip(keys,vals):
if v == ([], []): del linecolls[k]
+ # add a remove method to each tuple.
+ linecolls[k] = _tup(linecolls[k])
return linecolls
- def removeparallels(self,pdict,lat=None,ax=None):
- """
- Given a dictionary returned by :meth:`Basemap.drawparallels`, remove
- parallels (latitude lines) and associated labels from the map.
-
- .. tabularcolumns:: |l|L|
-
- ============== ====================================================
- Keyword Description
- ============== ====================================================
- lat latitude value to remove (Default None, removes all
- of them)
- ax axes instance (overrides default axes instance)
- ============== ====================================================
- """
- if lat is not None and lat not in pdict.keys():
- raise ValueError('latitude %s not drawn' % lat)
- for key in pdict.keys():
- if lat is None or key == lat:
- tup = pdict[key]
- for item in tup:
- for x in item:
- try:
- x.remove()
- # might already be removed, if so
- # don't do anything (exit silently).
- except ValueError:
- pass
- # get current axes instance (if none specified).
- ax = ax or self._check_ax()
- # set axes limits to fit map region.
- self.set_axes_limits(ax=ax)
-
def drawmeridians(self,meridians,color='k',linewidth=1., zorder=None,\
dashes=[1,1],labels=[0,0,0,0],labelstyle=None,\
fmt='%g',xoffset=None,yoffset=None,ax=None,latmax=None,
@@ -2099,9 +2070,11 @@
============== ====================================================
returns a dictionary whose keys are the meridian values, and
- whose values are tuples containing lists of the
+ whose values are tuple-like objects containing lists of the
matplotlib.lines.Line2D and matplotlib.text.Text instances
- associated with each meridian.
+ associated with each meridian. Each one of these tuple-like
+ objects has a ``remove`` method so it can be easily removed
+ from the plot.
"""
# get current axes instance (if none specified).
ax = ax or self._check_ax()
@@ -2291,27 +2264,10 @@
keys = linecolls.keys(); vals = linecolls.values()
for k,v in zip(keys,vals):
if v == ([], []): del linecolls[k]
+ # add a remove method to each tuple.
+ linecolls[k] = _tup(linecolls[k])
return linecolls
- def removemeridians(self,mdict,lon=None):
- """
- Given a dictionary returned by :meth:`Basemap.drawmeridians`, remove
- meridians (longitude lines) and associated labels from the map.
-
- .. tabularcolumns:: |l|L|
-
- ============== ====================================================
- Keyword Description
- ============== ====================================================
- lon longitude value to remove (Default None, removes all
- of them)
- ax axes instance (overrides default axes instance)
- ============== ====================================================
- """
- if lon is not None and lon not in mdict.keys():
- raise ValueError('longitude %s not drawn' % lon)
- self.removeparallels(mdict,lat=lon)
-
def tissot(self,lon_0,lat_0,radius_deg,npts,ax=None,**kwargs):
"""
Draw a polygon centered at ``lon_0,lat_0``. The polygon
@@ -4188,3 +4144,11 @@
lsmask = tmparr
lsmaskf.close()
return lsmask_lons, lsmask_lats, lsmask
+
+class _tup(tuple):
+ # tuple with an added remove method.
+ # used for objects returned by drawparallels and drawmeridians.
+ def remove(self):
+ for item in self:
+ for x in item:
+ x.remove()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-09-08 13:47:20
|
Revision: 8688
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8688&view=rev
Author: jswhit
Date: 2010-09-08 13:47:13 +0000 (Wed, 08 Sep 2010)
Log Message:
-----------
deleting an item from parallels/meridians dict removes it from plot.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-09-08 12:21:50 UTC (rev 8687)
+++ trunk/toolkits/basemap/Changelog 2010-09-08 13:47:13 UTC (rev 8688)
@@ -1,4 +1,7 @@
version 1.0.1 (not yet released).
+ * Deleting an item from the dicts returned by drawparallels
+ and drawmeridians removes the corresponding parallel or meridian (and
+ associated labels) from the plot.
* add a remove method to the tuples that are returned in
the dicts returned by drawparallels and drawmeridians.
* add removeparallels and removemeridians convenience methods.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-08 12:21:50 UTC (rev 8687)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-08 13:47:13 UTC (rev 8688)
@@ -1814,11 +1814,10 @@
============== ====================================================
returns a dictionary whose keys are the parallel values, and
- whose values are tuple-like objects containing lists of the
+ whose values are tuples containing lists of the
matplotlib.lines.Line2D and matplotlib.text.Text instances
- associated with each parallel. Each one of these tuple-like
- objects has a ``remove`` method so it can be easily removed
- from the plot.
+ associated with each parallel. Deleting an item from the
+ dictionary removes the corresponding parallel from the plot.
"""
# get current axes instance (if none specified).
ax = ax or self._check_ax()
@@ -2019,7 +2018,7 @@
if v == ([], []): del linecolls[k]
# add a remove method to each tuple.
linecolls[k] = _tup(linecolls[k])
- return linecolls
+ return _dict(linecolls)
def drawmeridians(self,meridians,color='k',linewidth=1., zorder=None,\
dashes=[1,1],labels=[0,0,0,0],labelstyle=None,\
@@ -2070,11 +2069,10 @@
============== ====================================================
returns a dictionary whose keys are the meridian values, and
- whose values are tuple-like objects containing lists of the
+ whose values are tuples containing lists of the
matplotlib.lines.Line2D and matplotlib.text.Text instances
- associated with each meridian. Each one of these tuple-like
- objects has a ``remove`` method so it can be easily removed
- from the plot.
+ associated with each meridian. Deleting an item from the
+ dictionary removes the correpsonding meridian from the plot.
"""
# get current axes instance (if none specified).
ax = ax or self._check_ax()
@@ -2266,7 +2264,7 @@
if v == ([], []): del linecolls[k]
# add a remove method to each tuple.
linecolls[k] = _tup(linecolls[k])
- return linecolls
+ return _dict(linecolls)
def tissot(self,lon_0,lat_0,radius_deg,npts,ax=None,**kwargs):
"""
@@ -4156,3 +4154,8 @@
except ValueError:
# don't raise an error if item already removed
pass
+class _dict(dict):
+ # override __delitem__ to first call remove method on values.
+ def __delitem__(self,key):
+ self[key].remove()
+ super(_dict, self).__delitem__(key)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-09-08 15:53:33
|
Revision: 8692
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8692&view=rev
Author: jswhit
Date: 2010-09-08 15:53:27 +0000 (Wed, 08 Sep 2010)
Log Message:
-----------
add DeprecationWarning in NetCDFFile
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-09-08 15:51:18 UTC (rev 8691)
+++ trunk/toolkits/basemap/Changelog 2010-09-08 15:53:27 UTC (rev 8692)
@@ -1,4 +1,6 @@
version 1.0.1 (not yet released).
+ * NetCDFFile function deprecated, will be removed in 1.0.2. Issue
+ warning advising users to use netcdf4-python instead.
* Deleting an item from the dicts returned by drawparallels
and drawmeridians removes the corresponding parallel or meridian (and
associated labels) from the plot.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-08 15:51:18 UTC (rev 8691)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-09-08 15:53:27 UTC (rev 8692)
@@ -4,7 +4,9 @@
Contains the :class:`Basemap` class (which does most of the
heavy lifting), and the following functions:
-:func:`NetCDFFile`: Read local and remote NetCDF datasets.
+:func:`NetCDFFile`: Read local and remote NetCDF datasets. Deprecated
+as of version 1.0.1 (will be removed in 1.0.2). Use netcdf4-python
+(http://netcdf4-python.googlecode.com) module instead.
:func:`interp`: bilinear interpolation between rectilinear grids.
@@ -2015,9 +2017,11 @@
self.set_axes_limits(ax=ax)
keys = linecolls.keys(); vals = linecolls.values()
for k,v in zip(keys,vals):
- if v == ([], []): del linecolls[k]
+ if v == ([], []):
+ del linecolls[k]
# add a remove method to each tuple.
- linecolls[k] = _tup(linecolls[k])
+ else:
+ linecolls[k] = _tup(linecolls[k])
# override __delitem__ in dict to call remove() on values.
return _dict(linecolls)
@@ -2262,9 +2266,11 @@
# remove empty values from linecolls dictionary
keys = linecolls.keys(); vals = linecolls.values()
for k,v in zip(keys,vals):
- if v == ([], []): del linecolls[k]
+ if v == ([], []):
+ del linecolls[k]
+ else:
# add a remove method to each tuple.
- linecolls[k] = _tup(linecolls[k])
+ linecolls[k] = _tup(linecolls[k])
# override __delitem__ in dict to call remove() on values.
return _dict(linecolls)
@@ -3935,6 +3941,13 @@
This may be slow for very large netCDF variables.
"""
import netcdf
+ import warnings
+ msg=dedent("""
+
+ NetCDFFile will be removed in 1.0.2, please use netcdf4-python
+ (http://netcdf4-python.googlecode.com) instead
+ """)
+ warnings.warn(msg,DeprecationWarning)
if file.startswith('http'):
return netcdf._RemoteFile(file,maskandscale=maskandscale,\
cache=cache,username=username,password=password,verbose=verbose)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-12-29 14:18:36
|
Revision: 8854
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8854&view=rev
Author: jswhit
Date: 2010-12-29 14:18:30 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
updated src/pj_mutex.c from proj4 svn to fix a threading bug on Windows.
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/src/pj_mutex.c
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2010-12-29 08:30:32 UTC (rev 8853)
+++ trunk/toolkits/basemap/Changelog 2010-12-29 14:18:30 UTC (rev 8854)
@@ -1,4 +1,9 @@
version 1.0.1 (not yet released).
+ * updated src/pj_mutex.c from proj4 svn to fix a threading bug
+ on Windows.
+ * if you try to transform NaNs to/from map projection coords, 1.e30
+ is returned (previously, this caused a segfault for some
+ projections).
* NetCDFFile function deprecated, will be removed in 1.0.2. Issue
warning advising users to use netcdf4-python instead.
* Deleting an item from the dicts returned by drawparallels
Modified: trunk/toolkits/basemap/src/pj_mutex.c
===================================================================
--- trunk/toolkits/basemap/src/pj_mutex.c 2010-12-29 08:30:32 UTC (rev 8853)
+++ trunk/toolkits/basemap/src/pj_mutex.c 2010-12-29 14:18:30 UTC (rev 8854)
@@ -181,8 +181,8 @@
{
if( mutex_lock == NULL )
pj_init_lock();
-
- ReleaseMutex( mutex_lock );
+ else
+ ReleaseMutex( mutex_lock );
}
/************************************************************************/
@@ -205,7 +205,7 @@
{
if( mutex_lock == NULL )
- mutex_lock = CreateMutex( NULL, TRUE, NULL );
+ mutex_lock = CreateMutex( NULL, FALSE, NULL );
}
#endif // def MUTEX_win32
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-12-29 18:05:44
|
Revision: 8855
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8855&view=rev
Author: jswhit
Date: 2010-12-29 18:05:38 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
add initial support for hammer projection (labelling of parallels does not yet work)
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py
trunk/toolkits/basemap/src/PJ_hammer.c
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-29 14:18:30 UTC (rev 8854)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-29 18:05:38 UTC (rev 8855)
@@ -82,6 +82,7 @@
'nsper' : 'Near-Sided Perspective',
'sinu' : 'Sinusoidal',
'moll' : 'Mollweide',
+ 'hammer' : 'Hammer-Aitoff',
'robin' : 'Robinson',
'vandg' : 'van der Grinten',
'mbtfpq' : 'McBryde-Thomas Flat-Polar Quartic',
@@ -93,7 +94,7 @@
supported_projections = ''.join(supported_projections)
_cylproj = ['cyl','merc','mill','gall']
-_pseudocyl = ['moll','robin','sinu','mbtfpq','vandg']
+_pseudocyl = ['moll','robin','sinu','mbtfpq','vandg','hammer']
# projection specific parameters.
projection_params = {'cyl' : 'corners only (no width/height)',
@@ -121,6 +122,7 @@
'nsper' : 'lon_0,satellite_height,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height',
'sinu' : 'lon_0,lat_0,no corners or width/height',
'moll' : 'lon_0,lat_0,no corners or width/height',
+ 'hammer' : 'lon_0,lat_0,no corners or width/height',
'robin' : 'lon_0,lat_0,no corners or width/height',
'vandg' : 'lon_0,lat_0,no corners or width/height',
'mbtfpq' : 'lon_0,lat_0,no corners or width/height',
@@ -183,7 +185,7 @@
lat_0 center of desired map domain (in degrees).
============== ====================================================
- For ``sinu``, ``moll``, ``npstere``, ``spstere``, ``nplaea``, ``splaea``,
+ For ``sinu``, ``moll``, ``hammer``, ``npstere``, ``spstere``, ``nplaea``, ``splaea``,
``npaeqd``, ``spaeqd``, ``robin`` or ``mbtfpq``, the values of
llcrnrlon, llcrnrlat, urcrnrlon, urcrnrlat, width and height are ignored
(because either they are computed internally, or entire globe is
@@ -1923,10 +1925,11 @@
nmax = int((self.ymax-self.ymin)/dy+1)
yy = np.linspace(self.llcrnry,self.urcrnry,nmax)
# mollweide inverse transform undefined at South Pole
- if self.projection == 'moll' and yy[0] < 1.e-4:
+ if self.projection == 'moll' and yy[0] < 1.e-4:
yy[0] = 1.e-4
if side == 'l':
- lons,lats = self(self.llcrnrx*np.ones(yy.shape,np.float32),yy,inverse=True)
+ xx = self.llcrnrx*np.ones(yy.shape,yy.dtype)
+ lons,lats = self(xx,yy,inverse=True)
lons = lons.tolist(); lats = lats.tolist()
else:
lons,lats = self(self.urcrnrx*np.ones(yy.shape,np.float32),yy,inverse=True)
@@ -2148,9 +2151,9 @@
lines.append(l)
linecolls[merid] = (lines,[])
# draw labels for meridians.
- # meridians not labelled for sinusoidal, mollweide, or
- # or full-disk orthographic/geostationary.
- if self.projection in ['sinu','moll','vandg'] and max(labels):
+ # meridians not labelled for sinusoidal, hammer, mollweide,
+ # VanDerGrinten or full-disk orthographic/geostationary.
+ if self.projection in ['sinu','moll','hammer','vandg'] and max(labels):
print 'Warning: Cannot label meridians on %s basemap' % _projnames[self.projection]
labels = [0,0,0,0]
if self.projection in ['ortho','geos','nsper','aeqd'] and max(labels):
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py 2010-12-29 14:18:30 UTC (rev 8854)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/proj.py 2010-12-29 18:05:38 UTC (rev 8855)
@@ -8,7 +8,7 @@
_rad2dg = math.degrees(1.)
_cylproj = ['cyl','merc','mill','gall']
-_pseudocyl = ['moll','robin','sinu','mbtfpq','vandg']
+_pseudocyl = ['moll','robin','sinu','mbtfpq','vandg','hammer']
_upper_right_out_of_bounds = (
'the upper right corner of the plot is not in the map projection region')
Modified: trunk/toolkits/basemap/src/PJ_hammer.c
===================================================================
--- trunk/toolkits/basemap/src/PJ_hammer.c 2010-12-29 14:18:30 UTC (rev 8854)
+++ trunk/toolkits/basemap/src/PJ_hammer.c 2010-12-29 18:05:38 UTC (rev 8855)
@@ -4,7 +4,7 @@
#define PJ_LIB__
# include <projects.h>
PROJ_HEAD(hammer, "Hammer & Eckert-Greifendorff")
- "\n\tMisc Sph, no inv.\n\tW= M=";
+ "\n\tMisc Sph, \n\tW= M=";
FORWARD(s_forward); /* spheroid */
double cosphi, d;
@@ -13,6 +13,13 @@
xy.y = P->rm * d * sin(lp.phi);
return (xy);
}
+INVERSE(s_inverse); /* spheroid */
+ double z;
+ z = sqrt(1. - (0.5 * P->w * xy.x) * (0.5 * P->w * xy.x) - (0.5 * xy.y) * (0.5 * xy.y));
+ lp.lam = aatan2(P->w * xy.x * z,2. * z * z - 1)/P->w;
+ lp.phi = aasin(z * xy.y);
+ return (lp);
+}
FREEUP; if (P) pj_dalloc(P); }
ENTRY0(hammer)
if (pj_param(P->params, "tW").i) {
@@ -25,5 +32,5 @@
P->m = 1.;
P->rm = 1. / P->m;
P->m /= P->w;
- P->es = 0.; P->fwd = s_forward;
+ P->es = 0.; P->fwd = s_forward; P->inv = s_inverse;
ENDENTRY(P)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-12-30 12:49:20
|
Revision: 8864
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8864&view=rev
Author: jswhit
Date: 2010-12-30 12:49:13 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
refer to new projection as Hammer, not Hammer-Aitoff
Modified Paths:
--------------
trunk/toolkits/basemap/examples/test.py
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/examples/test.py
===================================================================
--- trunk/toolkits/basemap/examples/test.py 2010-12-29 21:54:10 UTC (rev 8863)
+++ trunk/toolkits/basemap/examples/test.py 2010-12-30 12:49:13 UTC (rev 8864)
@@ -610,7 +610,7 @@
# create new figure
fig=plt.figure()
-# setup of basemap ('hammer' = Hammer-Aitoff projection)
+# setup of basemap ('hammer' = Hammer projection)
m = Basemap(projection='hammer',
resolution='c',area_thresh=10000.,lon_0=0.5*(lonsin[0]+lonsin[-1]))
ax = fig.add_axes([0.1,0.1,0.7,0.7])
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-29 21:54:10 UTC (rev 8863)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-30 12:49:13 UTC (rev 8864)
@@ -82,7 +82,7 @@
'nsper' : 'Near-Sided Perspective',
'sinu' : 'Sinusoidal',
'moll' : 'Mollweide',
- 'hammer' : 'Hammer-Aitoff',
+ 'hammer' : 'Hammer',
'robin' : 'Robinson',
'vandg' : 'van der Grinten',
'mbtfpq' : 'McBryde-Thomas Flat-Polar Quartic',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-08 13:01:52
|
Revision: 8960
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8960&view=rev
Author: jswhit
Date: 2011-02-08 13:01:46 +0000 (Tue, 08 Feb 2011)
Log Message:
-----------
add new examples from Tom Loredo
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/README
trunk/toolkits/basemap/examples/README
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2011-02-08 12:58:49 UTC (rev 8959)
+++ trunk/toolkits/basemap/MANIFEST.in 2011-02-08 13:01:46 UTC (rev 8960)
@@ -12,6 +12,8 @@
include setupegg.py
include nad2bin.c
include src/*
+include examples/allskymap.py
+include examples/allskymap_cr_example.py
include examples/plothighsandlows.py
include examples/save_background.py
include examples/embedding_map_in_wx.py
Modified: trunk/toolkits/basemap/README
===================================================================
--- trunk/toolkits/basemap/README 2011-02-08 12:58:49 UTC (rev 8959)
+++ trunk/toolkits/basemap/README 2011-02-08 13:01:46 UTC (rev 8960)
@@ -142,5 +142,6 @@
Christoph Gohlke
Eric Bruning
Stephane Raynaud
+Tom Loredo
for valuable contributions.
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README 2011-02-08 12:58:49 UTC (rev 8959)
+++ trunk/toolkits/basemap/examples/README 2011-02-08 13:01:46 UTC (rev 8960)
@@ -1,5 +1,8 @@
Basemap example scripts
+allskymap_cr_example.py is an all-sky plot that uses the module allskymap.py
+to make sky maps used in astronomy.
+
simpletest.py is the simple example given in the Basemap docstrings.
simpletest_oo.py is the same example, but using the "OO" interface (does
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-09 17:57:20
|
Revision: 8967
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8967&view=rev
Author: jswhit
Date: 2011-02-09 17:57:14 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
add missing nc file to MANIFEST
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/MANIFEST.in
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2011-02-09 07:45:18 UTC (rev 8966)
+++ trunk/toolkits/basemap/Changelog 2011-02-09 17:57:14 UTC (rev 8967)
@@ -1,4 +1,4 @@
-version 1.0.1 (svn revision 8963)
+version 1.0.1 (svn revision 8967)
* regenerated C source with cython 0.14.1.
* added new "allsky" example from Tom Loredo.
* added 'celestial' keyword - if True astronomical convention for
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2011-02-09 07:45:18 UTC (rev 8966)
+++ trunk/toolkits/basemap/MANIFEST.in 2011-02-09 17:57:14 UTC (rev 8967)
@@ -69,7 +69,6 @@
include examples/garp.py
include examples/setwh.py
include examples/ccsm_popgrid.py
-include examples/ccsm_popgrid.nc
include examples/plot_tissot.py
include examples/cities.dbf
include examples/cities.shp
@@ -77,6 +76,8 @@
include examples/show_colormaps.py
include examples/plotprecip.py
include examples/nws_precip_conus_20061222.nc
+include examples/C02562.orog.nc
+include examples/ccsm_popgrid.nc
include examples/NetCDFFile_tst.py
include examples/maskoceans.py
include examples/README
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-11 19:30:20
|
Revision: 8970
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8970&view=rev
Author: jswhit
Date: 2011-02-11 19:30:12 +0000 (Fri, 11 Feb 2011)
Log Message:
-----------
add new Line Integral Convolution (LIC) example (requires vectorplot scikit)
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/README
trunk/toolkits/basemap/examples/run_all.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/hurrearl.nc
trunk/toolkits/basemap/examples/lic_demo.py
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2011-02-10 07:37:05 UTC (rev 8969)
+++ trunk/toolkits/basemap/MANIFEST.in 2011-02-11 19:30:12 UTC (rev 8970)
@@ -75,9 +75,11 @@
include examples/cities.shx
include examples/show_colormaps.py
include examples/plotprecip.py
+include examples/lic_demo.py
include examples/nws_precip_conus_20061222.nc
include examples/C02562.orog.nc
include examples/ccsm_popgrid.nc
+include examples/hurrearl.nc
include examples/NetCDFFile_tst.py
include examples/maskoceans.py
include examples/README
Modified: trunk/toolkits/basemap/examples/README
===================================================================
--- trunk/toolkits/basemap/examples/README 2011-02-10 07:37:05 UTC (rev 8969)
+++ trunk/toolkits/basemap/examples/README 2011-02-11 19:30:12 UTC (rev 8970)
@@ -141,3 +141,6 @@
daynight.py shows how to shade the regions of a map where the sun has set.
ploticos.py demonstrates plotting on unstructured grids.
+
+lic_demo.py shows how to use vectorplot scikit to visualize vector fields with
+Line Integral Convolutions (LIC).
Added: trunk/toolkits/basemap/examples/hurrearl.nc
===================================================================
(Binary files differ)
Property changes on: trunk/toolkits/basemap/examples/hurrearl.nc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/toolkits/basemap/examples/lic_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/lic_demo.py (rev 0)
+++ trunk/toolkits/basemap/examples/lic_demo.py 2011-02-11 19:30:12 UTC (rev 8970)
@@ -0,0 +1,42 @@
+# example showing how to use Line Integral Convolution to visualize a vector
+# flow field (from Hurricane Earl). Produces something akin to streamlines.
+# Requires vectorplot scikit (http://scikits.appspot.com/vectorplot).
+try:
+ from netCDF4 import Dataset as NetCDFFile
+except ImportError:
+ from mpl_toolkits.basemap import NetCDFFile
+from mpl_toolkits.basemap import Basemap, cm, shiftgrid
+import numpy as np
+import matplotlib.pyplot as plt
+try:
+ from vectorplot import lic_internal
+except ImportError:
+ raise ImportError('need vectorplot scikit for this example')
+
+date = '2010090100'
+lat0=22.6; lon0=-69.2
+
+ncfile = NetCDFFile('hurrearl.nc')
+u = ncfile.variables['u10m'][:,:]
+v = ncfile.variables['v10m'][:,:]
+lons1 = ncfile.variables['lon'][:]
+lats1 = ncfile.variables['lat'][:]
+lons, lats = np.meshgrid(lons1,lats1)
+ncfile.close()
+
+fig = plt.figure(figsize=(8,8))
+m = Basemap(projection='stere',lat_0=lat0,lon_0=lon0,width=1.e6,height=1.e6,resolution='i')
+nxv = 501; nyv = 501
+udat, vdat, xv, yv = m.transform_vector(u,v,lons1,lats1,nxv,nyv,returnxy=True)
+texture = np.random.rand(udat.shape[0],udat.shape[1]).astype(np.float32)
+kernellen=51
+kernel = np.sin(np.arange(kernellen)*np.pi/kernellen).astype(np.float32)
+image = lic_internal.line_integral_convolution(udat.astype(np.float32),\
+ vdat.astype(np.float32), texture, kernel)
+im = m.imshow(image,plt.cm.gist_stern)
+m.drawcoastlines()
+m.drawmeridians(np.arange(0,360,2),labels=[0,0,0,1])
+m.drawparallels(np.arange(-30,30,2),labels=[1,0,0,0])
+plt.title('Hurricane Earl flow field visualized with Line Integral Convolution',\
+ fontsize=13)
+plt.show()
Property changes on: trunk/toolkits/basemap/examples/lic_demo.py
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/toolkits/basemap/examples/run_all.py
===================================================================
--- trunk/toolkits/basemap/examples/run_all.py 2011-02-10 07:37:05 UTC (rev 8969)
+++ trunk/toolkits/basemap/examples/run_all.py 2011-02-11 19:30:12 UTC (rev 8970)
@@ -10,6 +10,7 @@
test_files.remove('plotsst.py')
test_files.remove('embedding_map_in_wx.py') # requires wx
test_files.remove('plothighsandlows.py') # requires scipy
+test_files.remove('lic_demo.py')
print test_files
py_path = os.environ.get('PYTHONPATH')
if py_path is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-11 20:52:34
|
Revision: 8972
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8972&view=rev
Author: jswhit
Date: 2011-02-11 20:52:28 +0000 (Fri, 11 Feb 2011)
Log Message:
-----------
use rita data from AOML for lic example.
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/lic_demo.py
Added Paths:
-----------
trunk/toolkits/basemap/examples/rita.nc
Removed Paths:
-------------
trunk/toolkits/basemap/examples/hurrearl.nc
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2011-02-11 20:29:37 UTC (rev 8971)
+++ trunk/toolkits/basemap/MANIFEST.in 2011-02-11 20:52:28 UTC (rev 8972)
@@ -79,7 +79,7 @@
include examples/nws_precip_conus_20061222.nc
include examples/C02562.orog.nc
include examples/ccsm_popgrid.nc
-include examples/hurrearl.nc
+include examples/rita.nc
include examples/NetCDFFile_tst.py
include examples/maskoceans.py
include examples/README
Deleted: trunk/toolkits/basemap/examples/hurrearl.nc
===================================================================
(Binary files differ)
Modified: trunk/toolkits/basemap/examples/lic_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/lic_demo.py 2011-02-11 20:29:37 UTC (rev 8971)
+++ trunk/toolkits/basemap/examples/lic_demo.py 2011-02-11 20:52:28 UTC (rev 8972)
@@ -13,14 +13,14 @@
except ImportError:
raise ImportError('need vectorplot scikit for this example')
-date = '2010090100'
-lat0=22.6; lon0=-69.2
-
-ncfile = NetCDFFile('hurrearl.nc')
-u = ncfile.variables['u10m'][:,:]
-v = ncfile.variables['v10m'][:,:]
-lons1 = ncfile.variables['lon'][:]
-lats1 = ncfile.variables['lat'][:]
+# H*wind data from http://www.aoml.noaa.gov/hrd/data_sub/wind.html
+ncfile = NetCDFFile('rita.nc')
+u = ncfile.variables['sfc_u'][0,:,:]
+v = ncfile.variables['sfc_v'][0,:,:]
+lons1 = ncfile.variables['longitude'][:]
+lats1 = ncfile.variables['latitude'][:]
+lat0 = lats1[len(lats1)/2]; lon0 = lons1[len(lons1)/2]
+print lat0,lon0
lons, lats = np.meshgrid(lons1,lats1)
ncfile.close()
@@ -36,6 +36,6 @@
m.drawcoastlines()
m.drawmeridians(np.arange(0,360,2),labels=[0,0,0,1])
m.drawparallels(np.arange(-30,30,2),labels=[1,0,0,0])
-plt.title('Hurricane Earl flow field visualized with Line Integral Convolution',\
+plt.title('Hurricane Rita flow field visualized with Line Integral Convolution',\
fontsize=13)
plt.show()
Added: trunk/toolkits/basemap/examples/rita.nc
===================================================================
(Binary files differ)
Property changes on: trunk/toolkits/basemap/examples/rita.nc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-12 13:53:36
|
Revision: 8975
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8975&view=rev
Author: jswhit
Date: 2011-02-12 13:53:30 +0000 (Sat, 12 Feb 2011)
Log Message:
-----------
remove deprecated NetCDFFile
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
trunk/toolkits/basemap/setup.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2011-02-12 04:35:09 UTC (rev 8974)
+++ trunk/toolkits/basemap/Changelog 2011-02-12 13:53:30 UTC (rev 8975)
@@ -1,3 +1,7 @@
+version 1.0.2 (not yet released)
+ * added lic_demo.py to examples (line integral convolution,
+ requires scikit.vectorplot).
+ * removed deprecated NetCDFFile.
version 1.0.1 (svn revision 8967)
* regenerated C source with cython 0.14.1.
* added new "allsky" example from Tom Loredo.
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2011-02-12 04:35:09 UTC (rev 8974)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2011-02-12 13:53:30 UTC (rev 8975)
@@ -4,10 +4,6 @@
Contains the :class:`Basemap` class (which does most of the
heavy lifting), and the following functions:
-:func:`NetCDFFile`: Read local and remote NetCDF datasets. Deprecated
-as of version 1.0.1 (will be removed in 1.0.2). Use netcdf4-python
-(http://netcdf4-python.googlecode.com) module instead.
-
:func:`interp`: bilinear interpolation between rectilinear grids.
:func:`maskoceans`: mask 'wet' points of an input array.
@@ -54,7 +50,7 @@
else:
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
-__version__ = '1.0.1'
+__version__ = '1.0.2'
# supported map projections.
_projnames = {'cyl' : 'Cylindrical Equidistant',
@@ -3978,52 +3974,6 @@
else:
return corners
-def NetCDFFile(file, mode='r', maskandscale=True, cache=None, mmap=True,\
- username=None, password=None, verbose=False):
- """NetCDF File reader/writer. API is the same as Scientific.IO.NetCDF.
-
- If ``file`` is a URL that starts with `http`, it is assumed
- to be a remote OPenDAP dataset, and pydap is used
- to retrieve the data. Only the OPenDAP Array and Grid data
- types are recognized. If file does not start with `http`, it
- is assumed to be a local netCDF file and is read
- with scipy.io.netcdf. Both pydap and scipy.io.netcdf are written
- by Roberto De Almeida.
-
- Data will
- automatically be converted to and from masked arrays if the variable
- has either a ``missing_value`` or ``_FillValue`` attribute, and
- some data points are equal to the value specified by that attribute.
- In addition, variables that have the ``scale_factor`` and ``add_offset``
- attribute will automatically be converted to and from short integers.
- To suppress these automatic conversions, set the ``maskandscale``
- keyword to False.
-
- The keywords ``cache``, ``username``, ``password`` and ``verbose`` are only
- valid for remote OPenDAP datasets. ``username`` and ``password`` are used
- to access OPenDAP datasets that require authentication. ``verbose=True``
- will make the pydap client print out the URLs being accessed.
- ``cache`` is a location (a directory) for caching data, so that repeated
- accesses to the same URL avoid the network.
-
- The keyword ``mmap`` is only valid for local netCDF files. When
- ``mmap=True`` (default), the mmap module is used to access the data.
- This may be slow for very large netCDF variables.
- """
- import netcdf
- import warnings
- msg=dedent("""
-
- NetCDFFile will be removed in 1.0.2, please use netcdf4-python
- (http://netcdf4-python.googlecode.com) instead
- """)
- warnings.warn(msg,DeprecationWarning)
- if file.startswith('http'):
- return netcdf._RemoteFile(file,maskandscale=maskandscale,\
- cache=cache,username=username,password=password,verbose=verbose)
- else:
- return netcdf.netcdf_file(file,mode=mode,mmap=mmap,maskandscale=maskandscale)
-
def num2date(times,units='days since 0001-01-01 00:00:00',calendar='proleptic_gregorian'):
"""
Return datetime objects given numeric time values. The units
Modified: trunk/toolkits/basemap/setup.py
===================================================================
--- trunk/toolkits/basemap/setup.py 2011-02-12 04:35:09 UTC (rev 8974)
+++ trunk/toolkits/basemap/setup.py 2011-02-12 13:53:30 UTC (rev 8975)
@@ -241,7 +241,7 @@
setup(
name = "basemap",
- version = "1.0.1",
+ version = "1.0.2",
description = "Plot data on map projections with matplotlib",
long_description = """
An add-on toolkit for matplotlib that lets you plot data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2011-02-12 14:01:41
|
Revision: 8979
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8979&view=rev
Author: jswhit
Date: 2011-02-12 14:01:34 +0000 (Sat, 12 Feb 2011)
Log Message:
-----------
use netcdf4-python instead of built-in NetCDFFile.
Modified Paths:
--------------
trunk/toolkits/basemap/MANIFEST.in
trunk/toolkits/basemap/examples/ccsm_popgrid.py
trunk/toolkits/basemap/examples/fcstmaps.py
trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py
trunk/toolkits/basemap/examples/lic_demo.py
trunk/toolkits/basemap/examples/plothighsandlows.py
trunk/toolkits/basemap/examples/ploticos.py
trunk/toolkits/basemap/examples/plotprecip.py
trunk/toolkits/basemap/examples/plotsst.py
trunk/toolkits/basemap/examples/pnganim.py
Removed Paths:
-------------
trunk/toolkits/basemap/examples/NetCDFFile_tst.py
Modified: trunk/toolkits/basemap/MANIFEST.in
===================================================================
--- trunk/toolkits/basemap/MANIFEST.in 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/MANIFEST.in 2011-02-12 14:01:34 UTC (rev 8979)
@@ -80,7 +80,6 @@
include examples/C02562.orog.nc
include examples/ccsm_popgrid.nc
include examples/rita.nc
-include examples/NetCDFFile_tst.py
include examples/maskoceans.py
include examples/README
include lib/mpl_toolkits/__init__.py
Deleted: trunk/toolkits/basemap/examples/NetCDFFile_tst.py
===================================================================
--- trunk/toolkits/basemap/examples/NetCDFFile_tst.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/NetCDFFile_tst.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -1,70 +0,0 @@
-import sys
-import unittest
-import os
-import tempfile
-from numpy import ma
-from numpy.testing import assert_array_equal, assert_array_almost_equal
-from numpy.random.mtrand import uniform
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
-
-# test automatic conversion of masked arrays, and
-# packing/unpacking of short ints.
-
-FILE_NAME = tempfile.mktemp(".nc")
-ndim = 10
-ranarr = 100.*uniform(size=(ndim))
-packeddata = 10.*uniform(size=(ndim))
-missing_value = -9999.
-ranarr[::2] = missing_value
-maskedarr = ma.masked_values(ranarr,-9999.)
-scale_factor = (packeddata.max()-packeddata.min())/(2.*32766.)
-add_offset = 0.5*(packeddata.max()+packeddata.min())
-packeddata2 = ((packeddata-add_offset)/scale_factor).astype('i2')
-
-class TestCase(unittest.TestCase):
-
- def setUp(self):
- self.file = FILE_NAME
- file = NetCDFFile(self.file,'w')
- file.createDimension('n', None) # use unlimited dim.
- foo = file.createVariable('maskeddata', 'f8', ('n',))
- foo.missing_value = missing_value
- bar = file.createVariable('packeddata', 'i2', ('n',))
- bar.scale_factor = scale_factor
- bar.add_offset = add_offset
- foo[0:ndim] = maskedarr
- bar[0:ndim] = packeddata
- file.close()
-
- def tearDown(self):
- # Remove the temporary files
- os.remove(self.file)
-
- def runTest(self):
- """testing auto-conversion of masked arrays and packed integers"""
- # no auto-conversion.
- file = NetCDFFile(self.file,maskandscale=False)
- datamasked = file.variables['maskeddata']
- datapacked = file.variables['packeddata']
- if hasattr(datapacked,'set_auto_maskandscale'):
- datapacked.set_auto_maskandscale(False)
- # check missing_value, scale_factor and add_offset attributes.
- assert datamasked.missing_value == missing_value
- assert datapacked.scale_factor == scale_factor
- assert datapacked.add_offset == add_offset
- assert_array_equal(datapacked[:],packeddata2)
- assert_array_almost_equal(datamasked[:],ranarr)
- file.close()
- # auto-conversion
- file = NetCDFFile(self.file)
- datamasked = file.variables['maskeddata']
- datapacked = file.variables['packeddata']
- assert_array_almost_equal(datamasked[:].filled(datamasked.missing_value),ranarr)
- assert_array_almost_equal(datapacked[:],packeddata,decimal=4)
- file.close()
-
-if __name__ == '__main__':
- unittest.main()
Modified: trunk/toolkits/basemap/examples/ccsm_popgrid.py
===================================================================
--- trunk/toolkits/basemap/examples/ccsm_popgrid.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/ccsm_popgrid.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -25,10 +25,7 @@
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
# read in data from netCDF file.
infile = 'ccsm_popgrid.nc'
Modified: trunk/toolkits/basemap/examples/fcstmaps.py
===================================================================
--- trunk/toolkits/basemap/examples/fcstmaps.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/fcstmaps.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -6,10 +6,7 @@
import numpy.ma as ma
import datetime
from mpl_toolkits.basemap import Basemap, addcyclic, num2date
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
# today's date is default.
Modified: trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py
===================================================================
--- trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/fcstmaps_axesgrid.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -8,10 +8,7 @@
import datetime
from mpl_toolkits.basemap import Basemap, addcyclic, num2date
from mpl_toolkits.axes_grid1 import AxesGrid
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
# today's date is default.
Modified: trunk/toolkits/basemap/examples/lic_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/lic_demo.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/lic_demo.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -1,10 +1,7 @@
# example showing how to use Line Integral Convolution to visualize a vector
# flow field (from Hurricane Earl). Produces something akin to streamlines.
# Requires vectorplot scikit (http://scikits.appspot.com/vectorplot).
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
Modified: trunk/toolkits/basemap/examples/plothighsandlows.py
===================================================================
--- trunk/toolkits/basemap/examples/plothighsandlows.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/plothighsandlows.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -7,10 +7,7 @@
import sys
from mpl_toolkits.basemap import Basemap, addcyclic
from scipy.ndimage.filters import minimum_filter, maximum_filter
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
def extrema(mat,mode='wrap',window=10):
"""find the indices of local extrema (min and max)
Modified: trunk/toolkits/basemap/examples/ploticos.py
===================================================================
--- trunk/toolkits/basemap/examples/ploticos.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/ploticos.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -2,10 +2,7 @@
import matplotlib.pyplot as plt
import numpy as np
from numpy import ma
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
# read in orography of icosahedral global grid.
f = NetCDFFile('C02562.orog.nc')
lons = (180./np.pi)*f.variables['grid_center_lon'][:]
Modified: trunk/toolkits/basemap/examples/plotprecip.py
===================================================================
--- trunk/toolkits/basemap/examples/plotprecip.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/plotprecip.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -1,8 +1,5 @@
from mpl_toolkits.basemap import Basemap, cm
-try:
- from netCDF4 import Dataset as NetCDFFile
-except ImportError:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
import numpy as np
import matplotlib.pyplot as plt
import copy
Modified: trunk/toolkits/basemap/examples/plotsst.py
===================================================================
--- trunk/toolkits/basemap/examples/plotsst.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/plotsst.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -1,8 +1,5 @@
from mpl_toolkits.basemap import Basemap, date2index, num2date
-try:
- from netCDF4 import Dataset as NetCDFFile
-except:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
import numpy as np
import matplotlib.pyplot as plt
import sys, datetime
Modified: trunk/toolkits/basemap/examples/pnganim.py
===================================================================
--- trunk/toolkits/basemap/examples/pnganim.py 2011-02-12 13:58:04 UTC (rev 8978)
+++ trunk/toolkits/basemap/examples/pnganim.py 2011-02-12 14:01:34 UTC (rev 8979)
@@ -10,10 +10,7 @@
import numpy.ma as ma
import datetime, sys, time, subprocess
from mpl_toolkits.basemap import Basemap, shiftgrid, date2index, num2date
-try:
- from netCDF4 import Dataset as NetCDFFile
-except:
- from mpl_toolkits.basemap import NetCDFFile
+from netCDF4 import Dataset as NetCDFFile
# times for March 1993 'storm of the century'
date1 = datetime.datetime(1993,3,10,0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|