source: trunk/UTIL/PYTHON/mcd/proto/index.html @ 812

Last change on this file since 812 was 812, checked in by aslmd, 12 years ago

UTIL PYTHON
MCD interface and online version.

  • corrected a bug introduced recently for fixed / not fixed LT
  • clearer location for the fixed LT / not fixed LT option
  • submitting with a button on the beginner's column automatically reset the form with default values so that no risk to make mistake
  • now the button reset is a real reset. clicking on the Mars panorama also reset
  • display MCD version, coordinates etc... for values-only output
  • the plot is shown on a new window
  • added Ls or julian date in the title (automatic)
  • made the title to be on two lines
  • displayed values on colorbars are now adapted. e.g. if the unit is K then we use the format "%.0f"
  • clearer mention of vertical coordinates on the webpage. removed the possibility for above 3396 km from Mars Center
  • more points on vertical profiles and sections
  • added separator : and rewrote this part of the code so that it is easy to add othe separators
  • added a protection so that slightly negative values from the MCD are set to 0 (apply to mol/mol, kg/kg, kg/m2, W/m2 quantities)
  • better naming for RMS values

TODO (from easier to more difficult i.e. requiring more work)

  • more color palettes
  • fix ugly spacing when asking for 4 sections
  • zonal means
  • alert to user rather than modulo or bounds for time and coordinates
  • Hovmoller plots
  • test to prevent user to use a bad separator (for instance -)
File size: 19.4 KB
Line 
1
2<!-- Author Aymeric Spiga LMD -->
3
4<!DOCTYPE html>
5<html>
6
7<head>
8<meta charset="utf-8" />
9<title>Mars Climate Database: The Web Interface</title>
10<script language="JavaScript" type="text/JavaScript" src="martian_time.js"></script>
11</head>
12
13<body onload="DefaultDateValues();DefaultTimeValues();Convert2Ls();PlaceValues(0.,0.);DefaultSpaceTime()">
14
15<!-- aussi possible: get a la place de post. pour avoir un beau lien -->
16
17<!--<form name="calendar" action="/marscgi-bin/mcdcgi.py" method="post"-->
18<form name="calendar" action="./cgi-bin/mcdcgi.py" method="post" target="_blank"> <!--target="_new">-->
19
20<center>
21<b style="font-size: 125%;">Mars Climate Database: The Web Interface</b><br>
22<!--Welcome! To reset your query, click on the Mars panorama.-->
23<a href="index.html"><img src="PIA03610_red.jpg" height=80 width=1200></a><br>
24</center>
25
26<table align="center" border="1" width="1200" bgcolor="#F5DEB3">
27
28<tr>
29<td align="center">
30<i>Beginners' column (1-click presets)</i>
31</td>
32<td align="center">
33<i>Regular users' column</i>
34</td>
35<td align="center">
36<i>Advanced settings and information</i>
37</td>
38</tr>
39<tr><td align="center"></td><td align="center"></td><td align="center"></td></tr>
40<tr>
41<td align="center">
42<b>1) LANDING DATE</b>
43<input type="radio" name="lander" value="Now!" onClick="DefaultDateValues();DefaultTimeValues();Convert2Ls();PlaceValues(0.0,0.0)" checked>Land now!<br />
44<input type="radio" name="lander" value="Curiosity" onClick="DateAndTimeValues(2012,8,6,05,17,57);Convert2Ls();PlaceValues(137.4,-4.6)">Curiosity
45<input type="radio" name="lander" value="Phoenix" onClick="DateAndTimeValues(2008,5,25,23,38,23);Convert2Ls();PlaceValues(234.25,68.22)">Phoenix<br />
46<input type="radio" name="lander" value="Opportunity" onClick="DateAndTimeValues(2004,1,25,4,55,0);Convert2Ls();PlaceValues(354.47,-1.95)">Opportunity
47<input type="radio" name="lander" value="Spirit" onClick="DateAndTimeValues(2004,1,4,4,26,0);Convert2Ls();PlaceValues(175.48,-14.57)">Spirit
48<input type="radio" name="lander" value="Pathfinder" onClick="DateAndTimeValues(1997,7,4,16,56,55);Convert2Ls();PlaceValues(-33.22,19.13)">Pathfinder <br />
49<input type="radio" name="lander" value="Viking Lander 2" onClick="DateAndTimeValues(1976,9,3,22,58,20);Convert2Ls();PlaceValues(-225.74,47.97)">Viking Lander 2
50<input type="radio" name="lander" value="Viking Lander 1" onClick="DateAndTimeValues(1976,7,20,11,53,6);Convert2Ls();PlaceValues(-49.97,22.48)">Viking Lander 1<br />
51</td>
52<td align="center">
53<input type="radio" name="datekeyhtml" value="1" checked>
54<b><font color="red">MARS date</font></b> 
55Solar longitude <input type="text" size="3" name="ls"> degrees<br />
56Local Time <input type="text" size="4" name="localtime" value="0."> Martian hour<br />
57<br />
58<input type="radio" name="datekeyhtml" value="0">
59<b><font color="blue">EARTH date</font></b> 
60YY / MM / DD @ hh:mm:ss<br />
61<input type="text" size="3" name="year"> / <input type="text" size="1" name="month"> / <input type="text" size="1" name="day"> @
62<input type="text" size="1" name="hours">:<input type="text" size="1" name="minutes">:<input type="text" size="1" name="seconds">
63UTC<br />
64</td>
65<td align="center">
66Option for 2D maps: local time value is<br />
67<input type="radio" name="isfixedlt" value="off" checked /> at longitude 0
68<input type="radio" name="isfixedlt" value="on"          /> fixed for the whole planet<br />
69<hr>
70Earth Julian Date <input type="text" size="6" name="julian" readonly="readonly"><br />
71Mars year <input type="text" size="1" name="martianyear" readonly="readonly"> 
72 - month <input type="text" size="1" name="martianmonth" readonly="readonly"><span style="font-size: 75%;"> / 12</span>
73 - sol <input type="text" size="2" name="sol" readonly="readonly"><span style="font-size: 75%;"> / 669</span><br />
74<input type="button" value="EARTH DATE >>> MARS DATE" onClick="Convert2Ls();"><br />
75</td>
76</tr>
77<tr>
78<td align="center">
79<hr>
80<b>2) TIME</b>
81<input type="radio" name="tata" value="Morning" onClick="PlaceValues2(9.)" checked>Morning
82<input type="radio" name="tata" value="Afternoon" onClick="PlaceValues2(15.)">Afternoon<br />
83<input type="radio" name="tata" value="Evening" onClick="PlaceValues2(21.)">Evening
84<input type="radio" name="tata" value="Night" onClick="PlaceValues2(3.)">Night<br />
85<!--<input type="radio" name="tata" value="Whole day!" onClick="PlaceValues2('all')"><i>Whole day!</i><br />-->
86<hr>
87<b>3) ALTITUDE</b>
88<input type="radio" name="toto" value="Near surface" onClick="PlaceValues3(2.)" checked>Near-surface<br />
89<input type="radio" name="toto" value="Boundary layer" onClick="PlaceValues3(1000.)">Boundary layer
90<input type="radio" name="toto" value="Troposphere" onClick="PlaceValues3(10000.)">Troposphere<br/>
91<input type="radio" name="toto" value="Mesophere" onClick="PlaceValues3(80000.)">Mesosphere<br />
92<!--<input type="radio" name="toto" value="Whole profile!" onClick="PlaceValues3('all')"><i>Whole profile!</i><br />-->
93<hr>
94<!--
95<b>4) COORDINATES</b> Automatic! <br />
96<input type="button" value="... or click here for global map!" onClick="PlaceValues('all','all')"><br />
97-->
98<!--
99<b>4)</b>
100<input type="button" value="Click here for a global map!" onClick="PlaceValues('all','all')"><br />
101-->
102<!--
103<input type="radio" name="titi" value="Global map" onClick="PlaceValues('all','all')">Global map<br />
104<input type="radio" name="toto" value="Vertical profile" onClick="PlaceValues3('all')">Vertical profile
105<input type="radio" name="tata" value="Diurnal cycle" onClick="PlaceValues2('all')">Diurnal cycle<br />
106-->
107</td>
108<td align="center">
109<b>CUSTOMIZE COORDINATES ON MARS</b><br />
110write a value (or) a range val1;val2 (or) 'all'<br />
111<ul>
112<li>Latitude <input type="text" size="7" name="latitude" value="0."> degree North
113<li>Longitude <input type="text" size="7" name="longitude" value="0."> degree East
114<li>Altitude <input type="text" size="9" name="altitude" value="10."> <select name="zkey">
115<option value="3" selected>m above surface</option>
116<option value="2"         >m above "sea level"</option>
117<option value="1"         >m from Mars center</option>
118<option value="4"         >Pa (pressure level)</option>
119<!--
120<option value="5"         >above 3396 km from Mars center</option>
121-->
122</select>
123<!--
124<li>Latitude   
125<input type="radio" name="islatfree" value="0" checked> Value: <input type="text" size="2" name="latitude" value="0.">
126<input type="radio" name="islatfree" value="1"> All [-90 ; 90]
127</li>
128<li>Longitude
129<input type="radio" name="islonfree" value="0" checked> Value: <input type="text" size="2" name="longitude" value="0.">
130<input type="radio" name="islonfree" value="1"> All [-180 ; 180]
131</li>
132<li>Local Time 
133<input type="radio" name="isloctfree" value="0" checked> Value: <input type="text" size="2" name="localtime" value="0.">
134<input type="radio" name="isloctfree" value="1"> All [0 ; 24]
135</li>
136<li>Altitude   
137<input type="radio" name="isaltfree" value="0" checked> Value: <input type="text" size="2" name="altitude" value="10.">
138<input type="radio" name="isaltfree" value="1"> All [0 ; 100000] m
139</li>
140-->
141</ul>
142</td>
143<td align="center">
144<!--[Advanced settings for well-informed Martians]<br />-->
145<ul>
146<li>High resolution topography? <input type="radio" name="hrkey" value="1" checked /> Yes <input type="radio" name="hrkey" value="0" /> No </li>
147<li>Dust scenario? <select name="dust">
148<option value="1"         >MY24 min solar</option>
149<option value="2" selected>MY24 ave solar</option>
150<option value="3"         >MY24 max solar</option>
151<option value="4"         >dust storm tau=4 min solar</option>
152<option value="5"         >dust storm tau=4 ave solar</option>
153<option value="6"         >dust storm tau=4 max solar</option>
154<option value="7"         >warm scenario (dusty, max solar)</option>
155<option value="8"         >cold scenario (low dust, min solar)</option>
156</select></li>
157<!--<li>Presets
158<input type="button" value="Now!" onClick="DefaultDateValues();DefaultTimeValues();Convert2Ls();">
159<input type="button" value="Curiosity" onClick="DateAndTimeValues(2012,8,6,05,30,00);Convert2Ls();PlaceValues(137.4,-4.6)">
160<input type="button" value="Phoenix" onClick="DateAndTimeValues(2008,5,25,23,38,23);Convert2Ls();PlaceValues(234.25,68.22)">
161<input type="button" value="Opportunity" onClick="DateAndTimeValues(2004,1,25,4,55,0);Convert2Ls();PlaceValues(354.47,-1.95)">
162<input type="button" value="Spirit" onClick="DateAndTimeValues(2004,1,4,4,26,0);Convert2Ls();PlaceValues(175.48,-14.57)">
163<input type="button" value="Pathfinder" onClick="DateAndTimeValues(1997,7,4,16,56,55);Convert2Ls();PlaceValues(-33.22,19.13)">
164<input type="button" value="Viking Lander 2" onClick="DateAndTimeValues(1976,9,3,22,58,20);Convert2Ls();PlaceValues(-225.74,47.97)">
165<input type="button" value="Viking Lander 1" onClick="DateAndTimeValues(1976,7,20,11,53,6);Convert2Ls();PlaceValues(-49.97,22.48)">
166</li>-->
167</ul>
168</td>
169</tr>
170<tr>
171<td align="center">
172<b>4) INTEREST</b>
173<input type="radio" name="yeah" value="Atmosphere" onClick="PlaceVar('t','p','none','none')" checked>Atmosphere<br />
174<input type="radio" name="yeah" value="Winds" onClick="PlaceVar('u','v','none','none')">Winds
175<input type="radio" name="yeah" value="Weather" onClick="PlaceVar('ps_ddv','t','none','none')">Weather<br />
176<input type="radio" name="yeah" value="Water clouds" onClick="PlaceVar('h2ovap','mtot','h2oice','icetot')">Water clouds
177<input type="radio" name="yeah" value="Chemistry" onClick="PlaceVar('o3','h2ovap','o','co')">Chemistry<br />
178<input type="radio" name="yeah" value="Landing engineering" onClick="PlaceVar('rho','rho_ddv','cp','visc')">Landing engineering<br />
179<input type="radio" name="yeah" value="Glaciology" onClick="PlaceVar('tsurfmn','tsurfmx','co2ice','icetot')">Glaciology
180<input type="radio" name="yeah" value="Surface meteorology" onClick="PlaceVar('ps','tsurf','none','none')">Surface meteorology<br />
181<input type="radio" name="yeah" value="Radiative balance" onClick="PlaceVar('lwdown','swdown','lwup','swup')">Radiative balance<br />
182<!--<input type="button" value="Surface data" onClick="PlaceVar('ps','tsurf','none','none')">-->
183</td>
184<td align="center">
185<b>CUSTOMIZE VARIABLE(S) TO BE DISPLAYED</b><br />
186<br />
187Variable 1 <select name="var1">
188<option value="t"     selected>Temperature (K)</option>
189<option value="p"             >Pressure (Pa)</option>
190<option value="rho"           >Density (kg/m3)</option>
191<option value="u"             >W-E wind component (m/s)</option>
192<option value="v"             >S-N wind component (m/s)</option>
193<option value="tsurf"         >Surface temperature (K)</option>
194<option value="ps"            >Surface pressure (Pa)</option>
195<option value="mtot"          >Water vapor column (kg/m2)</option>
196<option value="icetot"        >Water ice column (kg/m2)</option>
197<option value="h2ovap"        >Water vapor vol. mixing ratio (mol/mol)</option>
198<option value="h2oice"        >Water ice mixing ratio (mol/mol)</option>
199<option value="ps_ddv"        >Surf. pres. day to day variability (Pa)</option>
200<option value="co2ice"        >surface CO2 ice layer (kg/m2)</option>
201<option value="cp"            >Air heat capacity Cp (J kg-1 K-1)</option>
202<option value="rho_ddv"       >density day to day variability (kg/m^3)</option>
203<option value="tsurfmx"       >daily max mean surf temperature (K)</option>
204<option value="tsurfmn"       >daily min mean surf temperature (K)</option>
205<option value="lwdown"        >thermal IR flux to surface (W/m2)</option>
206<option value="swdown"        >solar flux to surface (W/m2)</option>
207<option value="lwup"          >thermal IR flux to space (W/m2)</option>
208<option value="swup"          >solar flux reflected to space (W/m2)</option>
209<option value="o3"            >O3 ozone vol. mixing ratio (mol/mol)</option>
210<option value="o"             >[O] vol. mixing ratio (mol/mol)</option>
211<option value="co"            >[CO] vol. mixing ratio (mol/mol)</option>
212<option value="visc"          >Air viscosity estimation (N s m-2)</option>
213</select>
214<br />
215Variable 2 <select name="var2">
216<option value="none"          >(None)</option>
217<option value="t"             >Temperature (K)</option>
218<option value="p"     selected>Pressure (Pa)</option>
219<option value="rho"           >Density (kg/m3)</option>
220<option value="u"             >W-E wind component (m/s)</option>
221<option value="v"             >S-N wind component (m/s)</option>
222<option value="tsurf"         >Surface temperature (K)</option>
223<option value="ps"            >Surface pressure (Pa)</option>
224<option value="mtot"          >Water vapor column (kg/m2)</option>
225<option value="icetot"        >Water ice column (kg/m2)</option>
226<option value="h2ovap"        >Water vapor vol. mixing ratio (mol/mol)</option>
227<option value="h2oice"        >Water ice mixing ratio (mol/mol)</option>
228<option value="ps_ddv"        >Surf. pres. day to day variability (Pa)</option>
229<option value="co2ice"        >surface CO2 ice layer (kg/m2)</option>
230<option value="cp"            >Air heat capacity Cp (J kg-1 K-1)</option>
231<option value="rho_ddv"       >density day to day variability (kg/m^3)</option>
232<option value="tsurfmx"       >daily max mean surf temperature (K)</option>
233<option value="tsurfmn"       >daily min mean surf temperature (K)</option>
234<option value="lwdown"        >thermal IR flux to surface (W/m2)</option>
235<option value="swdown"        >solar flux to surface (W/m2)</option>
236<option value="lwup"          >thermal IR flux to space (W/m2)</option>
237<option value="swup"          >solar flux reflected to space (W/m2)</option>
238<option value="o3"            >O3 ozone vol. mixing ratio (mol/mol)</option>
239<option value="o"             >[O] vol. mixing ratio (mol/mol)</option>
240<option value="co"            >[CO] vol. mixing ratio (mol/mol)</option>
241<option value="visc"          >Air viscosity estimation (N s m-2)</option>
242</select>
243<br />
244Variable 3 <select name="var3">
245<option value="none"  selected>(None)</option>
246<option value="t"             >Temperature (K)</option>
247<option value="p"             >Pressure (Pa)</option>
248<option value="rho"           >Density (kg/m3)</option>
249<option value="u"             >W-E wind component (m/s)</option>
250<option value="v"             >S-N wind component (m/s)</option>
251<option value="tsurf"         >Surface temperature (K)</option>
252<option value="ps"            >Surface pressure (Pa)</option>
253<option value="mtot"          >Water vapor column (kg/m2)</option>
254<option value="icetot"        >Water ice column (kg/m2)</option>
255<option value="h2ovap"        >Water vapor vol. mixing ratio (mol/mol)</option>
256<option value="h2oice"        >Water ice mixing ratio (mol/mol)</option>
257<option value="ps_ddv"        >Surf. pres. day to day variability (Pa)</option>
258<option value="co2ice"        >surface CO2 ice layer (kg/m2)</option>
259<option value="cp"            >Air heat capacity Cp (J kg-1 K-1)</option>
260<option value="rho_ddv"       >density day to day variability (kg/m^3)</option>
261<option value="tsurfmx"       >daily max mean surf temperature (K)</option>
262<option value="tsurfmn"       >daily min mean surf temperature (K)</option>
263<option value="lwdown"        >thermal IR flux to surface (W/m2)</option>
264<option value="swdown"        >solar flux to surface (W/m2)</option>
265<option value="lwup"          >thermal IR flux to space (W/m2)</option>
266<option value="swup"          >solar flux reflected to space (W/m2)</option>
267<option value="o3"            >O3 ozone vol. mixing ratio (mol/mol)</option>
268<option value="o"             >[O] vol. mixing ratio (mol/mol)</option>
269<option value="co"            >[CO] vol. mixing ratio (mol/mol)</option>
270<option value="visc"          >Air viscosity estimation (N s m-2)</option>
271</select>
272<br />
273Variable 4 <select name="var4">
274<option value="none"  selected>(None)</option>
275<option value="t"             >Temperature (K)</option>
276<option value="p"             >Pressure (Pa)</option>
277<option value="rho"           >Density (kg/m3)</option>
278<option value="u"             >W-E wind component (m/s)</option>
279<option value="v"             >S-N wind component (m/s)</option>
280<option value="tsurf"         >Surface temperature (K)</option>
281<option value="ps"            >Surface pressure (Pa)</option>
282<option value="mtot"          >Water vapor column (kg/m2)</option>
283<option value="icetot"        >Water ice column (kg/m2)</option>
284<option value="h2ovap"        >Water vapor vol. mixing ratio (mol/mol)</option>
285<option value="h2oice"        >Water ice mixing ratio (mol/mol)</option>
286<option value="ps_ddv"        >Surf. pres. day to day variability (Pa)</option>
287<option value="co2ice"        >surface CO2 ice layer (kg/m2)</option>
288<option value="cp"            >Air heat capacity Cp (J kg-1 K-1)</option>
289<option value="rho_ddv"       >density day to day variability (kg/m^3)</option>
290<option value="tsurfmx"       >daily max mean surf temperature (K)</option>
291<option value="tsurfmn"       >daily min mean surf temperature (K)</option>
292<option value="lwdown"        >thermal IR flux to surface (W/m2)</option>
293<option value="swdown"        >solar flux to surface (W/m2)</option>
294<option value="lwup"          >thermal IR flux to space (W/m2)</option>
295<option value="swup"          >solar flux reflected to space (W/m2)</option>
296<option value="o3"            >O3 ozone vol. mixing ratio (mol/mol)</option>
297<option value="o"             >[O] vol. mixing ratio (mol/mol)</option>
298<option value="co"            >[CO] vol. mixing ratio (mol/mol)</option>
299<option value="visc"          >Air viscosity estimation (N s m-2)</option>
300</select>
301</td>
302<td align="center">
303<!--[Additional settings]<br />-->
304<ul>
305<li> Add wind vectors
306<input type="radio" name="iswind" value="off" checked /> No
307<input type="radio" name="iswind" value="on"          /> Yes</li> 
308<!--
309<li> Set same LT on whole planet
310<input type="radio" name="isfixedlt" value="off" checked /> No
311<input type="radio" name="isfixedlt" value="on" /> Yes</li>
312-->
313<!--
314<li> Add another variable
315<input type="radio" name="superimposed" value="0" checked /> side-by-side
316<input type="radio" name="superimposed" value="1" /> superimposed</li>
317-->
318<!--
319<li>
320Presets
321<input type="button" value="Usual meteorology" onClick="PlaceVar('p','t','u','v')">
322<input type="button" value="Surface data" onClick="PlaceVar('ps','tsurf','none','none')">
323<input type="button" value="Water cycle" onClick="PlaceVar('mtot','icetot','none','none')">
324</select>
325-->
326</li>
327</ul>
328</td>
329</tr>
330<tr>
331<td align="center">
332<input type="button" value="Values" style="font-weight:bold" onClick="submit_form_beginner()"/>
333<input type="button" value="Daily cycle" style="font-weight:bold" onClick="PlaceValues2('all');submit_form_beginner()"/><br />
334<input type="button" value="Vertical profile" style="font-weight:bold" onClick="PlaceValues3('all');submit_form_beginner()"/>
335<input type="button" value="Global map" style="font-weight:bold" onClick="PlaceValues('all','all');submit_form_beginner()"/><br />
336</td>
337<td align="center">
338<input type="submit" value="SUBMIT" style="font-weight:bold"/>
339<!--<input type="button" value="RESET" style="font-weight:bold" onClick="DefaultDateValues();DefaultTimeValues();Convert2Ls();PlaceValues(0.,0.);DefaultSpaceTime()"/><br />-->
340<input type="button" value="RESET" style="font-weight:bold" onClick="window.open('index.html','_self')"/><br />
341</td>
342<td align="center">
343<a href="http://www-mars.lmd.jussieu.fr">Mars Climate Database</a> (c) LMD/OU/IAA/ESA/CNES.<br />
344Python-based interface by <a href="http://www.lmd.jussieu.fr/~aslmd/">Aymeric Spiga</a> (LMD).<br />
345</td>
346</tr>
347
348
349</table>
350
351
352
353</body>
354</html>
355
356<!--
357<form action="/cgi-bin/checkbox.cgi" method="POST" target="_blank">
358<input type="checkbox" name="maths" value="on" /> Maths
359<input type="checkbox" name="physics" value="on" /> Physics
360<input type="submit" value="Select Subject" />
361</form>
362-->
Note: See TracBrowser for help on using the repository browser.