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
RevLine 
[43]1;+
[44]2; .. _statistics_3var_v1.pro:
[43]3;
4; ======================
5; statistics_3var_v1.pro
6; ======================
7;
8; DESCRIPTION
9; ===========
10;
11; SEE ALSO
12; ========
13;
[50]14; :ref:`project_profile.sh`
[43]15;
[46]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;
[43]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;
[85]44; $URL$
45;
[43]46; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
47;
48;   * minimal header
49;
50;-
[41]51pro statistics_3var_v1, tao,var1,var2, $
52    cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2
[97]53;
[50]54@cm_project
[97]55x=tao
56y=var1
[94]57z=var2
[97]58;
59ind1=where(finite(x,/nan))
60ind2=where(finite(y,/nan))
[94]61ind3=where(finite(z,/nan))
[41]62ind=inter(ind1,union(ind2,ind3))
[97]63;
[41]64if (ind ne -1.) then begin
[97]65   x(ind)=!Values.f_nan
66   y(ind)=!Values.f_nan
[94]67   z(ind)=!Values.f_nan
[41]68endif
[97]69;
70nsmooth=5   ; applying a 5 day smoothing
71;
[41]72x=ts_smooth(x,nsmooth,/nan)
73y=ts_smooth(y,nsmooth,/nan)
74z=ts_smooth(z,nsmooth,/nan)
[97]75;
[94]76ind1=where(finite(x))
77ind2=where(finite(y))
78ind3=where(finite(z))
[41]79ind=inter(ind1,inter(ind2,ind3))
[94]80x=x(ind)
81y=y(ind)
82z=z(ind)
[41]83nn=n_elements(ind)
[97]84;
[94]85cor1=correlate(x,y)
[97]86cor2=correlate(x,z)
87; cor1=correlation(tropflux,tao) cor2=correlation(tropflux,rec)
[41]88xxx=moment(x)
[94]89; mean1 and std1 --> for tropflux
[97]90mean1=xxx(0)
91std1=sqrt(xxx(1))
[41]92xxx=moment(y)
[97]93; mean2 and std2 --> for tao
94mean2=xxx(0)
[94]95std2=sqrt(xxx(1))
[41]96xxx=moment(z)
[97]97; mean3 and std3 --> for rec
98mean3=xxx(0)
99std3=sqrt(xxx(1))
100;
[94]101bias1=mean2-mean1
102st1=std2/std1
[97]103bias2=mean3-mean1
[94]104st2=std3/std1
[97]105;
106std1=st1
[94]107std2=st2
[41]108rmsd1=sqrt(total((x-y)*(x-y))/n_elements(x))
109rmsd2=sqrt(total((x-z)*(x-z))/n_elements(x))
[97]110;
[41]111end
Note: See TracBrowser for help on using the repository browser.