Changeset 859 for trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
- Timestamp:
- Jan 8, 2013, 9:33:07 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
r827 r859 73 73 query=mcd.mcd() 74 74 75 # set MCD version changes if needed 76 betatest = form.getvalue("betatest") 77 if betatest == "on": query.toversion5() 78 75 79 # Get the kind of vertical coordinates and choose default behavior for "all" 76 80 try: query.zkey = int(form.getvalue("zkey")) … … 93 97 if query.datekey == 1: 94 98 try: query.xdate = float(form.getvalue("ls")) 95 except: query.xdate = float(1) ; badlschar = True 99 except: query.xdate = float(1) ; badlschar = True # comment the second part if in debug command line mode 96 100 else: 97 101 try: query.xdate = float(form.getvalue("julian")) … … 161 165 except: query.max2d = None 162 166 163 try: query.dpi = f loat(form.getvalue("dpi"))167 try: query.dpi = form.getvalue("dpi") 164 168 except: query.dpi = 80. 165 169 if query.dpi == "eps": yeaheps = True ; query.dpi = 300. 170 else: yeaheps = False ; query.dpi = float(query.dpi) 166 171 167 172 # Get variables to plot … … 194 199 195 200 # reference name (to test which figures are already in the database) 196 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) 197 figname = '../img/'+reference+'.png' 201 try: 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) 202 except: reference = "test" 203 if yeaheps: figname = '../img/'+reference+'.eps' 204 else: figname = '../img/'+reference+'.png' 198 205 txtname = '../txt/'+reference+'.txt' 199 206 testexist = daos.path.isfile(figname) … … 234 241 235 242 header="""<html><head><title>Mars Climate Database: The Web Interface</title></head><body>""" 243 if betatest == "on": 244 print "<b>!!! THIS IS A BETA VERSION. RESULTS ARE NOT VALIDATED !!!</b>" 245 if sumfree == 2: print "<br>" 236 246 237 247 print header … … 248 258 else: 249 259 if sumfree == 0: query.update() ; query.htmlprinttabextvar(vartoplot) 250 elif sumfree == 2: print "<img src='"+figname+"'><br />" 260 elif sumfree == 2: 261 if yeaheps: print "<hr><a href='"+figname+"'>!!!! Click here to download the EPS figure file !!!!</a><br /><hr>" 262 else: print "<img src='"+figname+"'><br />" 251 263 elif sumfree == 1: 252 264 print "<a href='"+txtname+"'>Click here to download an ASCII file containing data</a><br />" 253 265 print "<hr>" 254 print "<img src='"+figname+"'><br />" 266 if yeaheps: print "<hr><a href='"+figname+"'>!!!! Click here to download the EPS figure file !!!!</a><br /><hr>" 267 else: print "<img src='"+figname+"'><br />" 255 268 256 269 ## This is quite common
Note: See TracChangeset
for help on using the changeset viewer.