Changeset 806 for trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
- Timestamp:
- Oct 15, 2012, 2:01:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
r805 r806 59 59 else: isloctfree = 0 ; query.loct = float(getloct) 60 60 61 try: query.zkey = int(form.getvalue("zkey")) 62 except: query.zkey = int(3) 63 61 64 query.xz = -9999. 62 65 getalt = form.getvalue("altitude") 63 66 if getalt == None: getalt = "1" 64 if getalt == "all": isaltfree = 1 ; query.xzs = 0. ; query.xze = 120000. 67 if getalt == "all": 68 isaltfree = 1 69 if query.zkey == 2: query.xzs = -5000. ; query.xze = 100000. 70 elif query.zkey == 3: query.xzs = 0. ; query.xze = 120000. 71 elif query.zkey == 5: query.xzs = -5000. ; query.xze = 100000. 72 elif query.zkey == 4: query.xzs = 1000. ; query.xze = 0.001 73 elif query.zkey == 1: query.xzs = 3396000. ; query.xze = 3596000. 65 74 elif ";" in getalt: isaltfree = 1 ; ind = getalt.find(";") ; query.xzs = float(getalt[:ind]) ; query.xze = float(getalt[ind+1:]) 66 75 else: isaltfree = 0 ; query.xz = float(getalt) … … 83 92 try: query.dust = int(form.getvalue("dust")) 84 93 except: query.dust = int(1) 85 try: query.zkey = int(form.getvalue("zkey"))86 except: query.zkey = int(3)87 94 # self.perturkey = 0 #integer perturkey ! perturbation type (0: none) 88 95 # self.seedin = 1 #random number generator seed (unused if perturkey=0) … … 141 148 142 149 ### getting data 143 if islatfree == 1 and islonfree == 1: query.latlon() 144 else: exit() 145 146 ### figure 147 query.htmlmap2d(vartoplot,incwind=iswindlog,fixedlt=input_fixedlt,figname=figname) 148 #mpl.savefig("img/temp.png",dpi=110,bbox_inches='tight',pad_inches=0.4) 149 #Image.open("img/temp.png").save(figname,'JPEG') ##lighter images 150 ### http://www.pythonware.com/library/pil/handbook/introduction.htm 150 if islatfree == 1 and islonfree == 1: 151 query.htmlmap2d(vartoplot,incwind=iswindlog,fixedlt=input_fixedlt,figname=figname) 152 #mpl.savefig("img/temp.png",dpi=110,bbox_inches='tight',pad_inches=0.4) 153 #Image.open("img/temp.png").save(figname,'JPEG') ##lighter images 154 ### http://www.pythonware.com/library/pil/handbook/introduction.htm 155 elif isaltfree == 1 and islonfree == 1: 156 query.htmlplot2d(vartoplot,fixedlt=input_fixedlt,figname=figname) 157 elif isaltfree == 1 and islatfree == 1: 158 query.htmlplot2d(vartoplot,fixedlt=input_fixedlt,figname=figname) 159 else: 160 exit() 151 161 152 162 ## This is quite common
Note: See TracChangeset
for help on using the changeset viewer.