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

Last change on this file since 1062 was 1053, checked in by aslmd, 11 years ago

UTIL PYTHON. tools to study dust devils in LES.

  • Property svn:executable set to *
File size: 1.5 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# load data
16data = np.loadtxt(namefile,delimiter=";")
17t = data[:,0] ; n = data[:,1] ; s = data[:,2] ; d = data[:,3]
18
19# remove size and drop point when no vortex detected
20d[np.where(n==0)] = np.nan
21s[np.where(n==0)] = np.nan
22
23## PLOTS
24
25number = ppplot.plot1d()
26number.f = n
27number.x = t
28number.linestyle = ''
29number.marker = '.'
30number.color = 'b'
31number.xlabel = "Local time (hour)"
32number.ylabel = "Detected vortices"
33number.makeshow()
34
35drop = ppplot.plot1d()
36drop.f = d
37drop.x = t
38drop.linestyle = ''
39drop.marker = '.'
40drop.color = 'r'
41drop.fmt = "%.1f"
42drop.xlabel = "Local time (hour)"
43drop.ylabel = "Maximum drop of detected vortices (Pa)"
44drop.makeshow()
45
46size = ppplot.plot1d()
47size.f = s
48size.x = t
49size.linestyle = ''
50size.marker = '.'
51size.color = 'g'
52size.xlabel = "Local time (hour)"
53size.ylabel = "Maximum size of detected vortices (m)"
54size.makeshow()
Note: See TracBrowser for help on using the repository browser.