From: <js...@us...> - 2007-11-24 19:57:48
|
Revision: 4432 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4432&view=rev Author: jswhit Date: 2007-11-24 11:57:45 -0800 (Sat, 24 Nov 2007) Log Message: ----------- no longer need to manually create masked array Modified Paths: -------------- trunk/toolkits/basemap/examples/ccsm_popgrid.py Modified: trunk/toolkits/basemap/examples/ccsm_popgrid.py =================================================================== --- trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-24 19:43:37 UTC (rev 4431) +++ trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-24 19:57:45 UTC (rev 4432) @@ -36,16 +36,13 @@ fpin = NetCDFFile(infile) tlat = fpin.variables['TLAT'][:] tlon = fpin.variables['TLONG'][:] +# masked array returned, masked where data == _FillValue temp = fpin.variables['TEMP'][:] -fillvalue = fpin.variables['TEMP'].attributes['_FillValue'] fpin.close() # make longitudes monotonically increasing. tlon = N.where(N.greater_equal(tlon,min(tlon[:,0])),tlon-360,tlon) -# create a masked array with temperature data (continents masked). -temp = MA.masked_values(temp,fillvalue) - # stack grids side-by-side (in longitiudinal direction), so # any range of longitudes may be plotted on a world map. tlon = N.concatenate((tlon,tlon+360),1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |