Revision: 4754
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4754&view=rev
Author:   jswhit
Date:     2007-12-16 18:57:17 -0800 (Sun, 16 Dec 2007)

Log Message:
-----------
enter a date on command line.

Modified Paths:
--------------
    trunk/toolkits/basemap/examples/plotsst.py

Modified: trunk/toolkits/basemap/examples/plotsst.py
===================================================================
--- trunk/toolkits/basemap/examples/plotsst.py  2007-12-17 02:12:31 UTC (rev 
4753)
+++ trunk/toolkits/basemap/examples/plotsst.py  2007-12-17 02:57:17 UTC (rev 
4754)
@@ -1,10 +1,16 @@
 from matplotlib.toolkits.basemap import Basemap, NetCDFFile
-import pylab, numpy
+import pylab, numpy, sys
 # read in sea-surface temperature and ice data
 # can be a local file, a URL for a remote opendap dataset,
 # or (if PyNIO is installed) a GRIB or HDF file.
-date = '20071214'
-ncfile = 
NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-navy-eot.'+date+'.nc')
+if len(sys.argv) == 1:
+    date = '20071215'
+else:
+    date = sys.argv[1]
+if date[4] > '2005':
+    ncfile = 
NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-navy-eot.'+date+'.nc')
+else:
+    ncfile = 
NetCDFFile('http://nomads.ncdc.noaa.gov:8085/thredds/dodsC/oisst/'+date[0:4]+'/AVHRR/sst4-path-eot.'+date+'.nc')
 # read sst.  Will automatically create a masked array using
 # missing_value variable attribute.
 sst = ncfile.variables['sst'][:]


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to