source: trunk/src/paper01/fig3/statistics_3var_v1.pro @ 97

Last change on this file since 97 was 97, checked in by pinsard, 13 years ago

suppress blank lines trailing blank

  • Property svn:keywords set to URL
File size: 2.2 KB
Line 
1;+
2; .. _statistics_3var_v1.pro:
3;
4; ======================
5; statistics_3var_v1.pro
6; ======================
7;
8; DESCRIPTION
9; ===========
10;
11; SEE ALSO
12; ========
13;
14; :ref:`project_profile.sh`
15;
16; :ref:`net_flux_validation_scatter_2000_2007.pro`
17; :ref:`air_validation_scatter_2000_2009_v50.pro`
18; :ref:`q2m_validation_scatter_2000_2009_v50.pro`
19; :ref:`sst_validation_scatter_2000_2009_v50.pro`
20; :ref:`ws_validation_scatter_2000_2009_v50.pro`
21; :ref:`air_validation_scatter_2000_2009_basin.pro`
22; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
23; :ref:`sst_validation_scatter_2000_2009_basin.pro`
24; :ref:`ws_validation_scatter_2000_2009_basin.pro`
25; :ref:`lhf_validation_scatter_2000_2009.pro`
26; :ref:`shf_validation_scatter_2000_2009.pro`
27; :ref:`lwr_validation_scatter_2000_2007.pro`
28; :ref:`swr_validation_scatter_2000_2007.pro`
29;
30; EXAMPLES
31; ========
32;
33; ::
34;
35;  IDL> tao=++
36;  IDL> ++
37;  IDL> statistics_3var_v1, tao, var1, var2, cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2
38;
39; EVOLUTIONS
40; ==========
41;
42; $Id$
43;
44; $URL$
45;
46; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
47;
48;   * minimal header
49;
50;-
51pro statistics_3var_v1, tao,var1,var2, $
52    cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2
53;
54@cm_project
55x=tao
56y=var1
57z=var2
58;
59ind1=where(finite(x,/nan))
60ind2=where(finite(y,/nan))
61ind3=where(finite(z,/nan))
62ind=inter(ind1,union(ind2,ind3))
63;
64if (ind ne -1.) then begin
65   x(ind)=!Values.f_nan
66   y(ind)=!Values.f_nan
67   z(ind)=!Values.f_nan
68endif
69;
70nsmooth=5   ; applying a 5 day smoothing
71;
72x=ts_smooth(x,nsmooth,/nan)
73y=ts_smooth(y,nsmooth,/nan)
74z=ts_smooth(z,nsmooth,/nan)
75;
76ind1=where(finite(x))
77ind2=where(finite(y))
78ind3=where(finite(z))
79ind=inter(ind1,inter(ind2,ind3))
80x=x(ind)
81y=y(ind)
82z=z(ind)
83nn=n_elements(ind)
84;
85cor1=correlate(x,y)
86cor2=correlate(x,z)
87; cor1=correlation(tropflux,tao) cor2=correlation(tropflux,rec)
88xxx=moment(x)
89; mean1 and std1 --> for tropflux
90mean1=xxx(0)
91std1=sqrt(xxx(1))
92xxx=moment(y)
93; mean2 and std2 --> for tao
94mean2=xxx(0)
95std2=sqrt(xxx(1))
96xxx=moment(z)
97; mean3 and std3 --> for rec
98mean3=xxx(0)
99std3=sqrt(xxx(1))
100;
101bias1=mean2-mean1
102st1=std2/std1
103bias2=mean3-mean1
104st2=std3/std1
105;
106std1=st1
107std2=st2
108rmsd1=sqrt(total((x-y)*(x-y))/n_elements(x))
109rmsd2=sqrt(total((x-z)*(x-z))/n_elements(x))
110;
111end
Note: See TracBrowser for help on using the repository browser.