Changeset 1077 for trunk/UTIL/PYTHON


Ignore:
Timestamp:
Oct 18, 2013, 6:33:56 PM (11 years ago)
Author:
aslmd
Message:

UTIL PYTHON MCD ONLINE. various improvements and bug fixes: notably altitude 0, wind modulus.

Location:
trunk/UTIL/PYTHON/mcd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/mcd/mcd.py

    r1075 r1077  
    133133        94: "W-E wind component (m/s)", \
    134134        95: "S-N wind component (m/s)", \
     135        96: "Horizontal wind speed (m/s)", \
    135136        1: "Radial distance from planet center (m)",\
    136137        2: "Altitude above areoid (Mars geoid) (m)",\
     
    246247        elif num == "u": num = 94
    247248        elif num == "v": num = 95
     249        elif num == "wind": num = 96
    248250        elif num == "tsurf": num = 15
    249251        elif num == "topo": num = 4
     
    379381        self.extvar[90] = self.pres ; self.extvar[91] = self.dens
    380382        self.extvar[92] = self.temp ; self.extvar[93] = self.zonwind ; self.extvar[94] = self.merwind
     383        self.extvar[95] = np.sqrt(self.extvar[93]**2 + self.extvar[94]**2) # calculate wind modulus
    381384        ## treat missing values
    382385        if self.temp == -999: self.extvar[:] = np.NaN ; self.meanvar[:] = np.NaN
  • trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py

    r1075 r1077  
    9292isloctfree, query.loct, query.locts, query.locte = gethtmlcoord( form.getvalue("localtime"),    0.,  24. )
    9393isaltfree,  query.xz,   query.xzs,   query.xze   = gethtmlcoord( form.getvalue("altitude"),  minxz, maxxz)
     94if minxz < 0.1: minxz=0.1 # otherwise bug with values smaller than 0.1m
     95
     96
    9497
    9598try: query.datekey = int(form.getvalue("datekeyhtml"))
     
    168171except: query.max2d = None
    169172
    170 try: query.dpi = form.getvalue("dpi")
    171 except: query.dpi = 80.
    172 if query.dpi == "eps":  yeaheps = True  ; query.dpi = 300.
    173 else:                   yeaheps = False ; query.dpi = float(query.dpi)
     173try:
     174  query.dpi = form.getvalue("dpi")
     175  if query.dpi == "eps":  yeaheps = True  ; query.dpi = 300.
     176  else:                   yeaheps = False ; query.dpi = float(query.dpi)
     177except:
     178  query.dpi = 80
     179  yeaheps = False
    174180
    175181# Get variables to plot
  • trunk/UTIL/PYTHON/mcd/proto/index5.html

    r1075 r1077  
    132132<b>4) INTEREST</b>
    133133<input type="radio" name="yeah" value="Atmosphere" onClick="PlaceVar('t','p','none','none');ChooseColor('jet')" checked>Atmosphere<br />
    134 <input type="radio" name="yeah" value="Winds" onClick="PlaceVar('u','v','none','none');ChooseColor('RdBu_r')">Winds
     134<input type="radio" name="yeah" value="Winds" onClick="PlaceVar('wind','w','u','v');ChooseColor('RdBu_r')">Winds
    135135<input type="radio" name="yeah" value="Weather" onClick="PlaceVar('ps_ddv','rho_ddv','none','none');ChooseColor('RdBu_r')">Weather<br />
    136136<input type="radio" name="yeah" value="Water cycle" onClick="PlaceVar('h2ovap','mtot','h2oice','icetot');ChooseColor('Blues')">Water cycle
     
    148148<option value="p"             >Pressure (Pa)</option>
    149149<option value="rho"           >Density (kg/m3)</option>
     150<option value="wind"          >Horizontal wind (m/s)</option>
     151<option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    150152<option value="u"             >W-E wind component (m/s)</option>
    151153<option value="v"             >S-N wind component (m/s)</option>
    152 <option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    153154<option value="tsurf"         >Surface temperature (K)</option>
    154155<option value="ps"            >Surface pressure (Pa)</option>
     
    202203<option value="p"             >Pressure (Pa)</option>
    203204<option value="rho"           >Density (kg/m3)</option>
     205<option value="wind"          >Horizontal wind (m/s)</option>
     206<option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    204207<option value="u"             >W-E wind component (m/s)</option>
    205208<option value="v"             >S-N wind component (m/s)</option>
    206 <option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    207209<option value="tsurf"         >Surface temperature (K)</option>
    208210<option value="ps"            >Surface pressure (Pa)</option>
     
    256258<option value="p"             >Pressure (Pa)</option>
    257259<option value="rho"           >Density (kg/m3)</option>
     260<option value="wind"          >Horizontal wind (m/s)</option>
     261<option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    258262<option value="u"             >W-E wind component (m/s)</option>
    259263<option value="v"             >S-N wind component (m/s)</option>
    260 <option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    261264<option value="tsurf"         >Surface temperature (K)</option>
    262265<option value="ps"            >Surface pressure (Pa)</option>
     
    310313<option value="p"             >Pressure (Pa)</option>
    311314<option value="rho"           >Density (kg/m3)</option>
     315<option value="wind"          >Horizontal wind (m/s)</option>
     316<option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    312317<option value="u"             >W-E wind component (m/s)</option>
    313318<option value="v"             >S-N wind component (m/s)</option>
    314 <option value="w"             >Vertical wind (m/s, pos. when downward)</option>
    315319<option value="tsurf"         >Surface temperature (K)</option>
    316320<option value="ps"            >Surface pressure (Pa)</option>
Note: See TracChangeset for help on using the changeset viewer.