source: trunk/UTIL/PYTHON/powerlaw/ddstat.py @ 1142

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

PYTHON. updated analysis tools for dust devils.

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#! /usr/bin/env python
2import ppplot
3import numpy as np
4
5##########################################################
6namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm1_2.txt"
7namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm2_2.txt"
8##########################################################
9namefile = "/home/aymeric/Big_Data/LES_dd/psfc.LMD_LES_MARS.160564.ncm1_2.txt"
10#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc.LMD_LES_MARS.160564.ncm2_2.txt"
11##########################################################
12#namefile = "/home/aymeric/Big_Data/LES_dd/psfc_oldinsight100m.ncm1_2.txt"
13##########################################################
14
15
16 
17
18#case = "188324p"
19#case = "191798"
20#case = "160564p"
21#case = "156487"
22#case = "2007p"
23#case = "13526p"
24#case = "172097"
25
26
27namefile = "/planeto/aslmd/LESdata/"+case+".ncm1_2.txt"
28
29
30
31
32
33# load data
34data = np.loadtxt(namefile,delimiter=";")
35t = data[:,0] ; n = data[:,1] ; s = data[:,2] ; d = data[:,3]
36
37# remove size and drop point when no vortex detected
38d[np.where(n==0)] = np.nan
39s[np.where(n==0)] = np.nan
40
41## PLOTS
42
43number = ppplot.plot1d()
44number.f = n
45number.x = t
46number.linestyle = ''
47number.marker = '.'
48number.color = 'b'
49number.xlabel = "Local time (hour)"
50number.ylabel = "Detected vortices"
51number.makeshow()
52
53drop = ppplot.plot1d()
54drop.f = d
55drop.x = t
56drop.linestyle = ''
57drop.marker = '.'
58drop.color = 'r'
59drop.fmt = "%.1f"
60drop.xlabel = "Local time (hour)"
61drop.ylabel = "Maximum drop of detected vortices (Pa)"
62drop.makeshow()
63
64size = ppplot.plot1d()
65size.f = s
66size.x = t
67size.linestyle = ''
68size.marker = '.'
69size.color = 'g'
70size.xlabel = "Local time (hour)"
71size.ylabel = "Maximum size of detected vortices (m)"
72size.makeshow()
Note: See TracBrowser for help on using the repository browser.