Changeset 1276 for trunk/UTIL
- Timestamp:
- Jun 2, 2014, 10:30:18 AM (11 years ago)
- Location:
- trunk/UTIL/PYTHON/mcd
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/fmcd5_gfortran.sh
r943 r1276 14 14 ### LINKS 15 15 NETCDF=/home/marshttp/NETCDF/netcdf64-4.0.1_gfortran_fPIC/ 16 wheremcd=/home/marshttp/MCD_v5.0//mcd/ 16 wheremcd=/home/marshttp/MCD_v5.1//mcd/ 17 num="5" 18 #num="5_dev" 17 19 18 20 ### LOG FILE 19 touch fmcd 5.log20 \rm fmcd 5.log21 touch fmcd$num.log 22 \rm fmcd$num.log 21 23 22 24 ### COPY/PREPARE SOURCES … … 28 30 29 31 ### BUILD THROUGH f2py WHAT IS NECESSARY TO CREATE THE PYTHON FUNCTIONS 30 touch fmcd 5.pyf31 \rm fmcd 5.pyf32 f2py -h fmcd 5.pyf -m fmcd5 tmp.call_mcd.F tmp.julian.F tmp.heights.F > fmcd5.log 2>&132 touch fmcd$num.pyf 33 \rm fmcd$num.pyf 34 f2py -h fmcd$num.pyf -m fmcd$num tmp.call_mcd.F tmp.julian.F tmp.heights.F > fmcd$num.log 2>&1 33 35 34 36 #### IMPORTANT: we teach f2py about variables in the call_mcd subroutines which are intended to be out 35 sed s/"real :: pres"/"real, intent(out) :: pres"/g fmcd 5.pyf | \37 sed s/"real :: pres"/"real, intent(out) :: pres"/g fmcd$num.pyf | \ 36 38 sed s/"real :: dens"/"real, intent(out) :: dens"/g | \ 37 39 sed s/"real :: temp"/"real, intent(out) :: temp"/g | \ … … 41 43 sed s/"real dimension(100) :: extvar"/"real dimension(100),intent(out) :: extvar"/g | \ 42 44 sed s/"real :: seedout"/"real, intent(out) :: seedout"/g | \ 43 sed s/"integer :: ier"/"integer, intent(out) :: ier"/g > fmcd 5.pyf.modif44 mv fmcd 5.pyf.modif fmcd5.pyf45 sed s/"integer :: ier"/"integer, intent(out) :: ier"/g > fmcd$num.pyf.modif 46 mv fmcd$num.pyf.modif fmcd$num.pyf 45 47 46 48 ### BUILD 47 f2py -c fmcd 5.pyf tmp.call_mcd.F tmp.julian.F tmp.heights.F --fcompiler=gnu95 \49 f2py -c fmcd$num.pyf tmp.call_mcd.F tmp.julian.F tmp.heights.F --fcompiler=gnu95 \ 48 50 -L$NETCDF/lib -lnetcdf \ 49 51 -lm -I$NETCDF/include \ … … 51 53 --f77flags="-fPIC" \ 52 54 --verbose \ 53 > fmcd 5.log 2>&155 > fmcd$num.log 2>&1 54 56 # --include-paths $NETCDF/include:$NETCDF/lib \ ---> makes it fail 55 57 -
trunk/UTIL/PYTHON/mcd/mcd.py
r1077 r1276 85 85 86 86 def toversion5(self): 87 self.name = "MCD v5. 0"88 self.dset = '/home/marshttp/MCD_v5. 0/data/'87 self.name = "MCD v5.1" 88 self.dset = '/home/marshttp/MCD_v5.1/data/' 89 89 self.extvarkey = np.ones(100) 90 90 … … 187 187 ### MCD version 5 new variables. AS 12/2012. 188 188 if "v5" in self.name: 189 whichfield[29] = "not used (set to zero)" 190 whichfield[30] = "Surface roughness length z0 (m)" 189 whichfield[30] = whichfield[34] 190 whichfield[34] = "surface H2O ice layer (kg/m2, 0.5: perennial)" 191 whichfield[29] = "Surface roughness length z0 (m)" 191 192 whichfield[37] = "DOD RMS day to day variations" 192 193 whichfield[38] = "Dust mass mixing ratio (kg/kg)" … … 218 219 whichfield[64] = "[H] vol. mixing ratio (mol/mol)" 219 220 whichfield[65] = "[H2] vol. mixing ratio (mol/mol)" 220 whichfield[66] = " [electron] vol. mixing ratio (mol/mol)"221 whichfield[66] = "electron number density (cm-3)" 221 222 whichfield[67] = "CO2 column (kg/m2)" 222 223 whichfield[68] = "N2 column (kg/m2)" … … 228 229 whichfield[74] = "H column (kg/m2)" 229 230 whichfield[75] = "H2 column (kg/m2)" 230 whichfield[76] = " electron column (kg/m2)"231 whichfield[76] = "Total Electronic Content (TEC) (m-2)" 231 232 if num not in whichfield: myplot.errormess("Incorrect subscript in extvar.") 232 233 dastuff = whichfield[num] … … 276 277 elif num == "swdown": num = 32 277 278 elif num == "lwup": num = 33 278 elif num == "swup": num = 34 279 elif num == "swup": 280 if "v5" in self.name: num = 30 281 else: num = 34 279 282 elif num == "tau": num = 36 280 283 elif num == "tau_ddv": … … 300 303 else: num = 50 301 304 elif num == "co2ice": num = 35 305 elif num == "n2": 306 if "v5" in self.name: num = 58 307 else: num = 47 308 elif num == "n2col": 309 if "v5" in self.name: num = 68 310 else: num = 11 # an undefined variable to avoid misleading output 302 311 elif num == "rdust": 303 312 if "v5" in self.name: num = 39 304 else: num = 30# an undefined variable to avoid misleading output313 else: num = 11 # an undefined variable to avoid misleading output 305 314 elif num == "sdust": 306 315 if "v5" in self.name: num = 40 307 else: num = 30# an undefined variable to avoid misleading output316 else: num = 11 # an undefined variable to avoid misleading output 308 317 elif num == "pbl": 309 318 if "v5" in self.name: num = 46 310 else: num = 30# an undefined variable to avoid misleading output319 else: num = 11 # an undefined variable to avoid misleading output 311 320 elif num == "updraft": 312 321 if "v5" in self.name: num = 47 313 else: num = 30# an undefined variable to avoid misleading output322 else: num = 11 # an undefined variable to avoid misleading output 314 323 elif num == "downdraft": 315 324 if "v5" in self.name: num = 48 316 else: num = 30# an undefined variable to avoid misleading output325 else: num = 11 # an undefined variable to avoid misleading output 317 326 elif num == "pblwvar": 318 327 if "v5" in self.name: num = 49 319 else: num = 30# an undefined variable to avoid misleading output328 else: num = 11 # an undefined variable to avoid misleading output 320 329 elif num == "pblhvar": 321 330 if "v5" in self.name: num = 50 322 else: num = 30# an undefined variable to avoid misleading output331 else: num = 11 # an undefined variable to avoid misleading output 323 332 elif num == "stress": 324 333 if "v5" in self.name: num = 51 325 else: num = 30# an undefined variable to avoid misleading output334 else: num = 11 # an undefined variable to avoid misleading output 326 335 elif num == "ar": 327 336 if "v5" in self.name: num = 59 328 else: num = 30# an undefined variable to avoid misleading output337 else: num = 11 # an undefined variable to avoid misleading output 329 338 elif num == "o2": 330 339 if "v5" in self.name: num = 62 331 else: num = 30# an undefined variable to avoid misleading output340 else: num = 11 # an undefined variable to avoid misleading output 332 341 elif num == "co2col": 333 342 if "v5" in self.name: num = 67 334 else: num = 30# an undefined variable to avoid misleading output343 else: num = 11 # an undefined variable to avoid misleading output 335 344 elif num == "arcol": 336 345 if "v5" in self.name: num = 69 337 else: num = 30# an undefined variable to avoid misleading output346 else: num = 11 # an undefined variable to avoid misleading output 338 347 elif num == "cocol": 339 348 if "v5" in self.name: num = 70 340 else: num = 30# an undefined variable to avoid misleading output349 else: num = 11 # an undefined variable to avoid misleading output 341 350 elif num == "o3col": 342 351 if "v5" in self.name: num = 73 343 else: num = 30# an undefined variable to avoid misleading output352 else: num = 11 # an undefined variable to avoid misleading output 344 353 elif num == "hydro": 345 354 if "v5" in self.name: num = 64 346 else: num = 30# an undefined variable to avoid misleading output355 else: num = 11 # an undefined variable to avoid misleading output 347 356 elif num == "hydro2": 348 357 if "v5" in self.name: num = 65 349 else: num = 30# an undefined variable to avoid misleading output358 else: num = 11 # an undefined variable to avoid misleading output 350 359 elif num == "e": 351 360 if "v5" in self.name: num = 66 352 else: num = 30# an undefined variable to avoid misleading output361 else: num = 11 # an undefined variable to avoid misleading output 353 362 elif num == "ecol": 354 363 if "v5" in self.name: num = 76 355 else: num = 30 # an undefined variable to avoid misleading output 364 else: num = 11 # an undefined variable to avoid misleading output 365 elif num == "groundice": 366 if "v5" in self.name: num = 34 367 else: num = 11 # an undefined variable to avoid misleading output 356 368 elif not isinstance(num, np.int): myplot.errormess("field reference not found.") 357 369 return num -
trunk/UTIL/PYTHON/mcd/proto/index5.html
r1077 r1276 9 9 </head> 10 10 11 <body onload="DefaultDateValues();DefaultTimeValues();Convert2Ls();PlaceValues(0.,0.);DefaultSpaceTime()"> 12 13 <form name="calendar" action="./cgi-bin/mcdcgi.py" method="post" target="_blank"> 11 <body onload="DefaultDateValues();DefaultTimeValues();Convert2Ls();PlaceValues('all','all');DefaultSpaceTime()"> 12 13 <!--<form name="calendar" action="./cgi-bin/mcdcgi.py" method="post" target="_blank"> --> 14 <form name="calendar" action="./cgi-bin/mcdcgi.py" method="get" target="_blank"> 14 15 <!-- aussi possible: get a la place de post. pour avoir un beau lien --> 15 16 16 17 <center> 17 18 <b style="font-size: 125%;">Mars Climate Database: The Web Interface</b><br> 18 <a href=" index5.html"><img src="PIA03610_red.jpg" height=80 width=1200></a><br>19 <a href="#" onclick="window.location.reload(true);"><img src="PIA03610_red.jpg" height=80 width=1200></a><br> 19 20 </center> 20 21 … … 50 51 Solar longitude <input type="text" size="3" name="ls"> degrees<br /> 51 52 Local Time <input type="text" size="3" name="localtime" value="0."> Martian hour<br /> 52 <span style="font-size: 80%;">write a value (or) a range val1;val2(or) 'all'</span><br />53 <span style="font-size: 80%;">write a value (or) a range 'val1 val2' (or) 'all'</span><br /> 53 54 <br /> 54 55 <input type="radio" name="datekeyhtml" value="0"> … … 90 91 <td align="center"> 91 92 <b>CUSTOMIZE COORDINATES ON MARS</b><br /> 92 <span style="font-size: 80%;">write a value (or) a range val1;val2(or) 'all'</span><br />93 <span style="font-size: 80%;">write a value (or) a range 'val1 val2' (or) 'all'</span><br /> 93 94 <ul> 94 95 <li>Latitude <input type="text" size="7" name="latitude" value="0."> degree North … … 122 123 <li>Interpolate using MOLA topography <input type="radio" name="hrkey" value="1" checked /> on <input type="radio" name="hrkey" value="0" /> off </li> 123 124 <li> MCD version 124 <input type="radio" name="betatest" value="on" checked /> 5. 0125 <input type="radio" name="betatest" value="on" checked /> 5.1 125 126 </span> 126 127 </li> … … 163 164 <option value="h2oice" >Water ice mixing ratio (mol/mol)</option> 164 165 <option value="co2ice" >surface CO2 ice layer (kg/m2)</option> 166 <option value="groundice" >surface H2O ice layer (kg/m2, 0.5: perennial)</option> 165 167 <option value="pbl" >Convective PBL height (m)</option> 166 168 <option value="stress" >Surf. wind stress (Kg/m/s2)</option> … … 182 184 <option value="co2col" >CO2 column (kg/m2)</option> 183 185 <option value="arcol" >Ar column (kg/m2)</option> 186 <option value="n2col" >N2 column (kg/m2)</option> 184 187 <option value="cocol" >CO column (kg/m2)</option> 185 188 <option value="o3col" >O3 column (kg/m2)</option> 186 189 <option value="co2" >[CO2] vol. mixing ratio (mol/mol)</option> 187 190 <option value="ar" >[Ar] vol. mixing ratio (mol/mol)</option> 191 <option value="n2" >[N2] vol. mixing ratio (mol/mol)</option> 188 192 <option value="co" >[CO] vol. mixing ratio (mol/mol)</option> 189 193 <option value="o3" >[O3] ozone vol. mixing ratio (mol/mol)</option> … … 192 196 <option value="hydro" >[H] vol. mixing ratio (mol/mol)</option> 193 197 <option value="hydro2" >[H2] vol. mixing ratio (mol/mol)</option> 194 <option value="e" > [e-] vol. mixing ratio (mol/mol)</option>195 <option value="ecol" > e- column (kg/m2)</option>198 <option value="e" >electron number density (cm-3)</option> 199 <option value="ecol" >Total Electronic Content (TEC) (m-2)</option> 196 200 <option value="cp" >Air heat capacity Cp (J kg-1 K-1)</option> 197 201 <option value="visc" >Air viscosity estimation (N s m-2)</option> … … 218 222 <option value="h2oice" >Water ice mixing ratio (mol/mol)</option> 219 223 <option value="co2ice" >surface CO2 ice layer (kg/m2)</option> 224 <option value="groundice" >surface H2O ice layer (kg/m2, 0.5: perennial)</option> 220 225 <option value="pbl" >Convective PBL height (m)</option> 221 226 <option value="stress" >Surf. wind stress (Kg/m/s2)</option> … … 237 242 <option value="co2col" >CO2 column (kg/m2)</option> 238 243 <option value="arcol" >Ar column (kg/m2)</option> 244 <option value="n2col" >N2 column (kg/m2)</option> 239 245 <option value="cocol" >CO column (kg/m2)</option> 240 246 <option value="o3col" >O3 column (kg/m2)</option> 241 247 <option value="co2" >[CO2] vol. mixing ratio (mol/mol)</option> 242 248 <option value="ar" >[Ar] vol. mixing ratio (mol/mol)</option> 249 <option value="n2" >[N2] vol. mixing ratio (mol/mol)</option> 243 250 <option value="co" >[CO] vol. mixing ratio (mol/mol)</option> 244 251 <option value="o3" >[O3] ozone vol. mixing ratio (mol/mol)</option> … … 247 254 <option value="hydro" >[H] vol. mixing ratio (mol/mol)</option> 248 255 <option value="hydro2" >[H2] vol. mixing ratio (mol/mol)</option> 249 <option value="e" > [e-] vol. mixing ratio (mol/mol)</option>250 <option value="ecol" > e- column (kg/m2)</option>256 <option value="e" >electron number density (cm-3)</option> 257 <option value="ecol" >Total Electronic Content (TEC) (m-2)</option> 251 258 <option value="cp" >Air heat capacity Cp (J kg-1 K-1)</option> 252 259 <option value="visc" >Air viscosity estimation (N s m-2)</option> … … 273 280 <option value="h2oice" >Water ice mixing ratio (mol/mol)</option> 274 281 <option value="co2ice" >surface CO2 ice layer (kg/m2)</option> 282 <option value="groundice" >surface H2O ice layer (kg/m2, 0.5: perennial)</option> 275 283 <option value="pbl" >Convective PBL height (m)</option> 276 284 <option value="stress" >Surf. wind stress (Kg/m/s2)</option> … … 292 300 <option value="co2col" >CO2 column (kg/m2)</option> 293 301 <option value="arcol" >Ar column (kg/m2)</option> 302 <option value="n2col" >N2 column (kg/m2)</option> 294 303 <option value="cocol" >CO column (kg/m2)</option> 295 304 <option value="o3col" >O3 column (kg/m2)</option> 296 305 <option value="co2" >[CO2] vol. mixing ratio (mol/mol)</option> 297 306 <option value="ar" >[Ar] vol. mixing ratio (mol/mol)</option> 307 <option value="n2" >[N2] vol. mixing ratio (mol/mol)</option> 298 308 <option value="co" >[CO] vol. mixing ratio (mol/mol)</option> 299 309 <option value="o3" >[O3] ozone vol. mixing ratio (mol/mol)</option> … … 302 312 <option value="hydro" >[H] vol. mixing ratio (mol/mol)</option> 303 313 <option value="hydro2" >[H2] vol. mixing ratio (mol/mol)</option> 304 <option value="e" > [e-] vol. mixing ratio (mol/mol)</option>305 <option value="ecol" > e- column (kg/m2)</option>314 <option value="e" >electron number density (cm-3)</option> 315 <option value="ecol" >Total Electronic Content (TEC) (m-2)</option> 306 316 <option value="cp" >Air heat capacity Cp (J kg-1 K-1)</option> 307 317 <option value="visc" >Air viscosity estimation (N s m-2)</option> … … 328 338 <option value="h2oice" >Water ice mixing ratio (mol/mol)</option> 329 339 <option value="co2ice" >surface CO2 ice layer (kg/m2)</option> 340 <option value="groundice" >surface H2O ice layer (kg/m2, 0.5: perennial)</option> 330 341 <option value="pbl" >Convective PBL height (m)</option> 331 342 <option value="stress" >Surf. wind stress (Kg/m/s2)</option> … … 347 358 <option value="co2col" >CO2 column (kg/m2)</option> 348 359 <option value="arcol" >Ar column (kg/m2)</option> 360 <option value="n2col" >N2 column (kg/m2)</option> 349 361 <option value="cocol" >CO column (kg/m2)</option> 350 362 <option value="o3col" >O3 column (kg/m2)</option> 351 363 <option value="co2" >[CO2] vol. mixing ratio (mol/mol)</option> 352 364 <option value="ar" >[Ar] vol. mixing ratio (mol/mol)</option> 365 <option value="n2" >[N2] vol. mixing ratio (mol/mol)</option> 353 366 <option value="co" >[CO] vol. mixing ratio (mol/mol)</option> 354 367 <option value="o3" >[O3] ozone vol. mixing ratio (mol/mol)</option> … … 357 370 <option value="hydro" >[H] vol. mixing ratio (mol/mol)</option> 358 371 <option value="hydro2" >[H2] vol. mixing ratio (mol/mol)</option> 359 <option value="e" > [e-] vol. mixing ratio (mol/mol)</option>360 <option value="ecol" > e- column (kg/m2)</option>372 <option value="e" >electron number density (cm-3)</option> 373 <option value="ecol" >Total Electronic Content (TEC) (m-2)</option> 361 374 <option value="cp" >Air heat capacity Cp (J kg-1 K-1)</option> 362 375 <option value="visc" >Air viscosity estimation (N s m-2)</option> … … 402 415 <tr> 403 416 <td align="center"> 404 <input type="button" value="Values" style="font-weight:bold" onClick=" submit_form_beginner()"/>405 <input type="button" value="Daily cycle" style="font-weight:bold" onClick=" PlaceValues2('all');submit_form_beginner()"/><br />406 <input type="button" value="Vertical profile" style="font-weight:bold" onClick=" PlaceValues3('all');submit_form_beginner()"/>417 <input type="button" value="Values" style="font-weight:bold" onClick="CorrectValue();submit_form_beginner()"/> 418 <input type="button" value="Daily cycle" style="font-weight:bold" onClick="CorrectValue();PlaceValues2('all');submit_form_beginner()"/><br /> 419 <input type="button" value="Vertical profile" style="font-weight:bold" onClick="CorrectValue();PlaceValues3('all');submit_form_beginner()"/> 407 420 <input type="button" value="Global map" style="font-weight:bold" onClick="PlaceValues('all','all');submit_form_beginner()"/><br /> 408 421 </td> 409 422 <td align="center"> 410 423 <input type="button" value="SUBMIT" style="font-weight:bold" onClick="submit_form()"/> 411 <input type="button" value="RESET" style="font-weight:bold" onClick="window. open('index5.html','_self')"/><br />424 <input type="button" value="RESET" style="font-weight:bold" onClick="window.location.reload(true);"/><br /> 412 425 </td> 413 426 <td align="center"> -
trunk/UTIL/PYTHON/mcd/proto/martian_time.js
r859 r1276 363 363 } 364 364 365 366 function CorrectValue(){ 367 if ( document.calendar.longitude.value == "all") { 368 document.calendar.longitude.value = 0. 369 } 370 if ( document.calendar.latitude.value == "all") { 371 document.calendar.latitude.value = 0. 372 } 373 } 365 374 366 375 function PlaceValues(lon,lat){
Note: See TracChangeset
for help on using the changeset viewer.