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 | ;- |
---|
51 | pro statistics_3var_v1, tao,var1,var2, $ |
---|
52 | cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 |
---|
53 | ; |
---|
54 | @cm_project |
---|
55 | x=tao |
---|
56 | y=var1 |
---|
57 | z=var2 |
---|
58 | ; |
---|
59 | ind1=where(finite(x,/nan)) |
---|
60 | ind2=where(finite(y,/nan)) |
---|
61 | ind3=where(finite(z,/nan)) |
---|
62 | ind=inter(ind1,union(ind2,ind3)) |
---|
63 | ; |
---|
64 | if (ind ne -1.) then begin |
---|
65 | x(ind)=!Values.f_nan |
---|
66 | y(ind)=!Values.f_nan |
---|
67 | z(ind)=!Values.f_nan |
---|
68 | endif |
---|
69 | ; |
---|
70 | nsmooth=5 ; applying a 5 day smoothing |
---|
71 | ; |
---|
72 | x=ts_smooth(x,nsmooth,/nan) |
---|
73 | y=ts_smooth(y,nsmooth,/nan) |
---|
74 | z=ts_smooth(z,nsmooth,/nan) |
---|
75 | ; |
---|
76 | ind1=where(finite(x)) |
---|
77 | ind2=where(finite(y)) |
---|
78 | ind3=where(finite(z)) |
---|
79 | ind=inter(ind1,inter(ind2,ind3)) |
---|
80 | x=x(ind) |
---|
81 | y=y(ind) |
---|
82 | z=z(ind) |
---|
83 | nn=n_elements(ind) |
---|
84 | ; |
---|
85 | cor1=correlate(x,y) |
---|
86 | cor2=correlate(x,z) |
---|
87 | ; cor1=correlation(tropflux,tao) cor2=correlation(tropflux,rec) |
---|
88 | xxx=moment(x) |
---|
89 | ; mean1 and std1 --> for tropflux |
---|
90 | mean1=xxx(0) |
---|
91 | std1=sqrt(xxx(1)) |
---|
92 | xxx=moment(y) |
---|
93 | ; mean2 and std2 --> for tao |
---|
94 | mean2=xxx(0) |
---|
95 | std2=sqrt(xxx(1)) |
---|
96 | xxx=moment(z) |
---|
97 | ; mean3 and std3 --> for rec |
---|
98 | mean3=xxx(0) |
---|
99 | std3=sqrt(xxx(1)) |
---|
100 | ; |
---|
101 | bias1=mean2-mean1 |
---|
102 | st1=std2/std1 |
---|
103 | bias2=mean3-mean1 |
---|
104 | st2=std3/std1 |
---|
105 | ; |
---|
106 | std1=st1 |
---|
107 | std2=st2 |
---|
108 | rmsd1=sqrt(total((x-y)*(x-y))/n_elements(x)) |
---|
109 | rmsd2=sqrt(total((x-z)*(x-z))/n_elements(x)) |
---|
110 | ; |
---|
111 | end |
---|