source: trunk/UTIL/PYTHON/mcd/examples/test_mcd_alt.py @ 1007

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

clean and organized UTIL/PYTHON folder

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#! /usr/bin/env python
2
3from fmcd import call_mcd
4import numpy as np
5
6lon = float(raw_input('Longitude?'))
7lat = float(raw_input('Latitude?'))
8xdate = float(raw_input('Ls?'))
9loct = float(raw_input('Local time?'))
10xz = float(raw_input('Altitude?'))
11
12dset = '/home/aymeric/Science/MCD_v4.3/data/'
13
14zkey      = 3  # specify that xz is the altitude above surface (m)
15datekey   = 1  # 1 = "Mars date": xdate is the value of Ls
16dust      = 2  #our best guess MY24 scenario, with solar average conditions
17hrkey     = 1  #set high resolution mode on (hrkey=0 to set high resolution off)
18perturkey = 0  #integer perturkey ! perturbation type (0: none)
19seedin    = 1  #random number generator seed (unused if perturkey=0)
20gwlength  = 0. #gravity Wave wavelength (unused if perturkey=0)
21extvarkey = 1
22#extvarkeys = np.ones(100)
23
24(pres, dens, temp, zonwind, merwind, \
25 meanvar, extvar, seedout, ierr) \
26 = \
27call_mcd(zkey,xz,lon,lat,hrkey, \
28 datekey,xdate,loct,dset,dust, \
29 perturkey,seedin,gwlength,extvarkey )
30
31print "temperature is %.0f K, pressure is %.0f Pa, density is %5.3e kg/m3, zonal wind is %.1f m/s, meridional wind is %.1f m/s" % (temp,pres,dens,zonwind,merwind)
32
Note: See TracBrowser for help on using the repository browser.