Changeset 1197 for trunk/UTIL/PYTHON/mcd


Ignore:
Timestamp:
Mar 4, 2014, 12:00:10 PM (11 years ago)
Author:
aslmd
Message:

PYTHON. updated analysis tools for dust devil analysis.

File:
1 edited

Legend:

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

    r1007 r1197  
    99
    1010from ppplot import writeascii
     11
     12
     13from scipy import stats
    1114
    1215
     
    5356## constant_heights
    5457#for heights in [20.,100.,500.,1000.,2000.,5000.,7000.,10000.,20000.]:
    55 for heights in [10.]:
     58#for heights in [10.]:
    5659
    5760## multiple_obsheight
    5861#for heights in [0.1,0.2,0.5,0.75,1.0,1.5,2.0,10.]:
     62for heights in [1.0]:
    5963
    6064 query = mcd()
     
    7276
    7377    ## constant_heights
    74     query.xz = heights
    75 
     78    #query.xz = heights
    7679    ## multiple_obsheight
    77     #query.xz = ddheight[i-1]*heights
     80    query.xz = ddheight[i-1]*heights
    7881
    7982    query.update() ; uu = query.zonwind ; vv = query.merwind
     
    8790       if angle < 0.: angle = angle + 360.
    8891
    89        #query.xzs = max(ddheight[i-1] - 2.*ddheighterror[i-1],10.)
    90        #query.xze = ddheight[i-1] + 2.*ddheighterror[i-1]
    91        query.xzs = max(query.xz - 0.1*query.xz,10.)
    92        query.xze = query.xz + 0.1*query.xz
     92       ## multiple_obsheight
     93       query.xzs = max(ddheight[i-1] - 2.*ddheighterror[i-1],10.)
     94       query.xze = ddheight[i-1] + 2.*ddheighterror[i-1]
     95       ## constant_heights
     96       #query.xzs = max(query.xz - 0.1*query.xz,10.)
     97       #query.xze = query.xz + 0.1*query.xz
    9398
    9499       query.profile()
     
    130135 writeascii(field=mcdwind,absc=ddwind,name=str(heights)+'.txt')
    131136
     137 #ind = np.isnan(ddwind)
     138 #y = ddwind
     139 #y[ind] = -9999.
     140 #xi = mcdwind[y > -9999.]
     141 #y = ddwind[y > -9999.]
     142 #slope, intercept, r_value, p_value, std_err = stats.linregress(xi,y)
     143 #linear = slope*xi+intercept
     144 #mpl.plot(xi,linear)
     145 #ecart = y - linear
     146 #print np.std(ecart)
    132147
    133148 mpl.errorbar(mcdwind, ddwind, yerr=[ddwinderror,ddwinderror], xerr=[mcdwindle,mcdwindhe], fmt='bo')
Note: See TracChangeset for help on using the changeset viewer.