Index: trunk/UTIL/PYTHON/mcd/mcd.py
===================================================================
--- trunk/UTIL/PYTHON/mcd/mcd.py	(revision 824)
+++ trunk/UTIL/PYTHON/mcd/mcd.py	(revision 827)
@@ -80,4 +80,7 @@
         self.fixedlt = False
         self.zonmean = False
+        self.min2d = None
+        self.max2d = None
+        self.dpi = 80.
 
     def viking1(self): self.name = "Viking 1 site. MCD v4.3 output" ; self.lat = 22.48 ; self.lon = -49.97 ; self.xdate = 97.
@@ -101,6 +104,8 @@
         if not oneline: self.title = self.title + "\n"
         if self.lats is None:  self.title = self.title + " Latitude " + str(self.lat) + "N"
-        if self.zonmean: self.title = self.title + "Zonal mean over all longitudes."
-        elif self.lons is None: self.title = self.title + " Longitude " + str(self.lon) + "E"
+        if self.zonmean and self.lats is not None and self.xzs is not None: 
+            self.title = self.title + "Zonal mean over all longitudes."
+        elif self.lons is None: 
+            self.title = self.title + " Longitude " + str(self.lon) + "E"
         if self.xzs is None:   
             self.vertunits()
@@ -513,5 +518,5 @@
       # The size * the dpi gives the final image size
       #   a4"x4" image * 80 dpi ==> 320x320 pixel image
-      canvas.print_figure(figname, dpi=80)
+      canvas.print_figure(figname, dpi=self.dpi)
 
 ###################
@@ -704,5 +709,5 @@
         ## define field. bound field.
         what_I_plot = np.transpose(field)
-        zevmin, zevmax = myplot.calculate_bounds(what_I_plot)  ## vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))
+        zevmin, zevmax = myplot.calculate_bounds(what_I_plot,vmin=self.min2d,vmax=self.max2d)  
         what_I_plot = myplot.bounds(what_I_plot,zevmin,zevmax)
         ## define contour field levels. define color palette
@@ -734,5 +739,5 @@
       # The size * the dpi gives the final image size
       #   a4"x4" image * 80 dpi ==> 320x320 pixel image
-      canvas.print_figure(figname, dpi=80)
+      canvas.print_figure(figname, dpi=self.dpi)
 
     def htmlplot2d(self,tabtodo,figname="temp.png"):
@@ -775,5 +780,5 @@
         ## define field. bound field.
         what_I_plot = np.transpose(field)
-        zevmin, zevmax = myplot.calculate_bounds(what_I_plot)  ## vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))
+        zevmin, zevmax = myplot.calculate_bounds(what_I_plot,vmin=self.min2d,vmax=self.max2d)  
         what_I_plot = myplot.bounds(what_I_plot,zevmin,zevmax)
         ## define contour field levels. define color palette
@@ -806,5 +811,5 @@
       # The size * the dpi gives the final image size
       #   a4"x4" image * 80 dpi ==> 320x320 pixel image
-      canvas.print_figure(figname, dpi=80)
+      canvas.print_figure(figname, dpi=self.dpi)
 
 
Index: trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
===================================================================
--- trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py	(revision 824)
+++ trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py	(revision 827)
@@ -90,7 +90,8 @@
 try: query.datekey = int(form.getvalue("datekeyhtml"))
 except: query.datekey = float(1)
+badlschar = False
 if query.datekey == 1:
     try: query.xdate = float(form.getvalue("ls"))
-    except: query.xdate = float(1)
+    except: query.xdate = float(1) ; badlschar = True
 else:
     try: query.xdate = float(form.getvalue("julian"))
@@ -105,4 +106,6 @@
 if badls: 
     errormess = errormess+"<li>Solar longitude must be between 0 and 360."
+if badlschar:
+    errormess = errormess+"<li>Solar longitude is in the wrong format. It should be a positive number between 0 and 360. Intervals of solar longitude are not allowed."
 badloct = (isloctfree == 0 and query.loct > 24.) \
        or (isloctfree == 1 and (query.locts > 24. or query.locte > 24.)) \
@@ -153,4 +156,13 @@
 except: query.colorm = "jet"
 
+try: query.min2d = float(form.getvalue("minval"))
+except: query.min2d = None
+try: query.max2d = float(form.getvalue("maxval"))
+except: query.max2d = None
+
+try: query.dpi = float(form.getvalue("dpi"))
+except: query.dpi = 80.
+
+
 # Get variables to plot
 var1 = form.getvalue("var1")
@@ -182,5 +194,5 @@
 
  # reference name (to test which figures are already in the database)
- reference = query.getnameset()+str(var1)+str(var2)+str(var3)+str(var4)+str(iswind)+str(isfixedlt)+str(iszonmean)+query.colorm
+ reference = query.getnameset()+str(var1)+str(var2)+str(var3)+str(var4)+str(iswind)+str(isfixedlt)+str(iszonmean)+query.colorm+str(query.min2d)+str(query.max2d)+str(query.dpi)
  figname = '../img/'+reference+'.png'
  txtname = '../txt/'+reference+'.txt'
Index: trunk/UTIL/PYTHON/mcd/proto/index.html
===================================================================
--- trunk/UTIL/PYTHON/mcd/proto/index.html	(revision 824)
+++ trunk/UTIL/PYTHON/mcd/proto/index.html	(revision 827)
@@ -107,6 +107,5 @@
 <td align="center">
 <ul>
-<li>High resolution mode? <input type="radio" name="hrkey" value="1" checked /> Yes <input type="radio" name="hrkey" value="0" /> No </li>
-<li>Dust scenario? <select name="dust">
+<li>Dust scenario <select name="dust">
 <option value="1"         >MY24 min solar</option>
 <option value="2" selected>MY24 ave solar</option>
@@ -118,4 +117,5 @@
 <option value="8"         >cold scenario (low dust, min solar)</option>
 </select></li>
+<li>Interpolate using MOLA topography <input type="radio" name="hrkey" value="1" checked /> on <input type="radio" name="hrkey" value="0" /> off </li>
 </ul>
 </td>
@@ -254,7 +254,7 @@
 <td align="center">
 <ul>
-<li> Add wind vectors
-<input type="radio" name="iswind" value="off" checked /> No
-<input type="radio" name="iswind" value="on"          /> Yes</li>  
+<li> Set picture resolution
+<input type="radio" name="dpi" value="80" checked> medium
+<input type="radio" name="dpi" value="160"> high
 </li>
 <li> Set colormap
@@ -269,7 +269,15 @@
 </select>
 </li>
-<li> Ask for zonal mean in lat/alt plot<br />
-<input type="radio" name="zonmean" value="off" checked /> No
-<input type="radio" name="zonmean" value="on"          /> Yes (please be patient)
+<li> Set bounds in 2D plots
+<input type="text" size="2" name="minval"> min
+<input type="text" size="2" name="maxval"> max
+</li>
+<li> Wind vectors in lat/lon plot
+<input type="radio" name="iswind" value="off" checked /> off
+<input type="radio" name="iswind" value="on"          /> on</li>  
+</li>
+<li> Zonal average in lat/alt plot
+<input type="radio" name="zonmean" value="off" checked /> off
+<input type="radio" name="zonmean" value="on"          /> on
 </li>
 </ul>
