Revision: 4564
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4564&view=rev
Author: jswhit
Date: 2007-12-03 08:08:12 -0800 (Mon, 03 Dec 2007)
Log Message:
-----------
include OPenDAP URL
Modified Paths:
--------------
trunk/py4science/examples/skel/basemap5_skel.py
Modified: trunk/py4science/examples/skel/basemap5_skel.py
===================================================================
--- trunk/py4science/examples/skel/basemap5_skel.py 2007-12-03 15:49:35 UTC
(rev 4563)
+++ trunk/py4science/examples/skel/basemap5_skel.py 2007-12-03 16:08:12 UTC
(rev 4564)
@@ -5,10 +5,12 @@
# or (if PyNIO is installed) a GRIB or HDF file.
# See http://nomads.ncdc.noaa.gov/ for some NOAA OPenDAP datasets.
ncfile = NetCDFFile('data/sst.nc')
-# this will produce a very similar plot, but will read
+sst = ncfile.variables['analysed_sst'][:]
+# uncommenting the next two lines will
+# produce a very similar plot, but will read
# the data over the web instead of from a local file.
#ncfile =
NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/2007/AVHRR/sst4-navy-eot.20071201.nc')
-sst = ncfile.variables['analysed_sst'][:]
+#sst = ncfile.variables['sst'][:]
lats = ncfile.variables['lat'][:]
lons = ncfile.variables['lon'][:]
# Basemap comes with extra colormaps from Generic Mapping Tools
@@ -18,7 +20,7 @@
projection = XX # try moll, robin, sinu or ortho.
# coastlines not used, so resolution set to None to skip
# continent processing (this speeds things up a bit)
-m = Basemap(projection=projection,lon_0=0,lat_0=0,resolution=None)
+m = Basemap(projection=projection,lon_0=lons.mean(),lat_0=0,resolution=None)
# compute map projection coordinates of grid.
x, y = m(*numpy.meshgrid(lons, lats))
# plot with pcolor
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins