Changeset 796 for trunk/UTIL/PYTHON/mcd/proto
- Timestamp:
- Oct 1, 2012, 1:29:35 AM (12 years ago)
- Location:
- trunk/UTIL/PYTHON/mcd/proto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
r794 r796 1 ###!/usr/bin/env python 1 2 #!/usr/bin/python 2 3 ###!/home/aymeric/Software/epd-7.0-2-rh5-x86/bin/python … … 12 13 ################################################## 13 14 ### ajouts et corrections par Franck Guyon 09/2012 15 ### ajouts suite a brainstorm equipe AS 10/2012 14 16 15 17 import cgi, cgitb … … 36 38 # Get data from user-defined fields and define free dimensions 37 39 # FG: add tests if var==None to have values in local without forms ones 40 query.lat = -9999. 38 41 getlat = form.getvalue("latitude") 39 if getlat == None: getlat = 1 40 if getlat == "all": islatfree = 1 ; query.lat = -9999. 42 if getlat == None: getlat = "1" 43 if getlat == "all": islatfree = 1 ; query.lats = -90. ; query.late = 90. 44 elif ";" in getlat: islatfree = 1 ; ind = getlat.find(";") ; query.lats = float(getlat[:ind]) ; query.late = float(getlat[ind+1:]) 41 45 else: islatfree = 0 ; query.lat = float(getlat) 42 46 47 query.lon = -9999. 43 48 getlon = form.getvalue("longitude") 44 if getlon == None: getlon = 1 45 if getlon == "all": islonfree = 1 ; query.lon = -9999. 49 if getlon == None: getlon = "1" 50 if getlon == "all": islonfree = 1 ; query.lons = -180. ; query.lone = 180. 51 elif ";" in getlon: islonfree = 1 ; ind = getlon.find(";") ; query.lons = float(getlon[:ind]) ; query.lone = float(getlon[ind+1:]) 46 52 else: islonfree = 0 ; query.lon = float(getlon) 47 53 54 query.loct = -9999. 48 55 getloct = form.getvalue("localtime") 49 if getloct == None: getloct = 1 50 if getloct == "all": isloctfree = 1 ; query.loct = -9999. 56 if getloct == None: getloct = "1" 57 if getloct == "all": isloctfree = 1 ; query.locts = 0. ; query.locte = 24. 58 elif ";" in getloct: isloctfree = 1 ; ind = getloct.find(";") ; query.locts = float(getloct[:ind]) ; query.locte = float(getloct[ind+1:]) 51 59 else: isloctfree = 0 ; query.loct = float(getloct) 52 60 61 query.xz = -9999. 53 62 getalt = form.getvalue("altitude") 54 if getalt == None: getalt = 1 55 if getalt == "all": isaltfree = 1 ; query.xz = -9999. 63 if getalt == None: getalt = "1" 64 if getalt == "all": isaltfree = 1 ; query.xzs = 0. ; query.xze = 120000. 65 elif ";" in getalt: isaltfree = 1 ; ind = getalt.find(";") ; query.xzs = float(getalt[:ind]) ; query.xze = float(getalt[ind+1:]) 56 66 else: isaltfree = 0 ; query.xz = float(getalt) 57 67 … … 96 106 97 107 # reference name (to test which figures are already in the database) 98 reference = str(islatfree)+str(islonfree)+str(isloctfree)+str(isaltfree)+query.getnameset()+str(var1)+str(var2)+str(var3)+str(var4)+str(iswind)+str(isfixedlt)108 reference = query.getnameset()+str(var1)+str(var2)+str(var3)+str(var4)+str(iswind)+str(isfixedlt) 99 109 figname = '../img/'+reference+'.png' 100 110 … … 127 137 128 138 ### figure 129 query.htmlmap2d(vartoplot,incwind=iswindlog,fixedlt=input_fixedlt,figname=figname) 139 zetitle = "MCD v4.3 - Dust scenario "+str(query.dust)+" - Date is "+str(query.xdate) 140 query.htmlmap2d(vartoplot,incwind=iswindlog,fixedlt=input_fixedlt,figname=figname,title=zetitle) 130 141 #mpl.savefig("img/temp.png",dpi=110,bbox_inches='tight',pad_inches=0.4) 131 142 #Image.open("img/temp.png").save(figname,'JPEG') ##lighter images -
trunk/UTIL/PYTHON/mcd/proto/index.html
r793 r796 96 96 <td align="center"> 97 97 <b>CUSTOMIZE COORDINATES ON MARS</b><br /> 98 please give: a value (or) a range val1;val2 (or) 'all'<br /> 98 99 <ul> 99 <li> Latitude <input type="text" size="3" name="latitude" value="0."> (write a value or 'all')100 <li> Longitude <input type="text" size="3" name="longitude" value="0."> (write a value or 'all')101 <li>Local Time <input type="text" size=" 2" name="localtime" value="0."> (write a value or 'all')102 <li>Altitude (m) <input type="text" size=" 3" name="altitude" value="10."> (write a value or 'all')100 <li>North Latitude <input type="text" size="7" name="latitude" value="0."> 101 <li>East Longitude <input type="text" size="7" name="longitude" value="0."> 102 <li>Local Time <input type="text" size="7" name="localtime" value="0."> 103 <li>Altitude (m) <input type="text" size="7" name="altitude" value="10."> 103 104 <!-- 104 105 <li>Latitude
Note: See TracChangeset
for help on using the changeset viewer.