source: trunk/src/paper01/fig2/fig2_timeline_diagram.pro @ 182

Last change on this file since 182 was 182, checked in by pinsard, 12 years ago

fix some svn propset

  • Property svn:keywords set to Id URL
File size: 6.4 KB
Line 
1;+
2; .. _fig2_timeline_diagram.pro:
3;
4; =========================
5; fig2_timeline_diagram.pro
6; =========================
7;
8; DESCRIPTION
9; ===========
10;
11; Figure of
12; ++
13; is saved in
14; :file:`${PROJECT_OD}/fig2_timeline_diagram.ps`.
15;
16; .. graphviz::
17;
18;    digraph fig2_timeline_diagram  {
19;
20;       qlat [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/qlat*_dy.cdf"];
21;       lwnet [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lwnet*_dy.cdf"];
22;       swnet [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/swnet*_dy.cdf"];
23;
24;       fig2_timeline_diagram [shape=box,
25;       fontname=Courier,
26;       color=blue,
27;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/fig2_timeline_diagram.pro",
28;       label="${TROPFLUX}/src/paper01/fig2/fig2_timeline_diagram.pro"];
29;
30;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/fig2_timeline_diagram.ps"];
31;
32;       {qlat lwnet swnet} -> {fig2_timeline_diagram} -> {figure}
33;    }
34;
35; SEE ALSO
36; ========
37;
38; :ref:`project_profile.sh`
39; :ref:`project_init.pro`
40;
41; :ref:`read_lh.pro`
42; :ref:`read_lw.pro`
43; :ref:`read_sw.pro`
44;
45; :func:`x_site_location`
46; :func:`y_site_location`
47;
48; EXAMPLES
49; ========
50;
51; ::
52;
53;  fig2_timeline_diagram
54;
55; TODO
56; ====
57;
58; make it work on cratos and loholt1::
59;
60;    % Error:
61;    % the vector size (7670) is incompatible
62;    % with the domain dimensions
63;    % [jpi/nx, jpj/ny, jpk/nz, jpt] = [1/1, 1/1, 1/1, 1]
64;
65; missing cdf files : where are they coming from
66;
67; coding rules
68;
69; complete description
70;
71; handle IO error
72;
73; EVOLUTIONS
74; ==========
75;
76; $Id$
77;
78; $URL$
79;
80; - fplod 20110817T104854Z aedon.locean-ipsl.upmc.fr (Darwin)
81;
82;   * get rid of spawn
83;
84; - fplod 20110412T084618Z aedon.locean-ipsl.upmc.fr (Darwin)
85;
86;   * remove hard coding path
87;   * add graphviz
88;   * externalize function
89;
90; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
91;
92;   * minimal header
93;
94;-
95pro fig2_timeline_diagram
96;
97@cm_4cal
98@cm_4data
99@cm_4mesh
100@cm_4data
101@cm_project
102;
103reinitplt, /z,/invert
104key_portrait = 1
105coefpalit=.9
106;
107openps, FILENAME = project_od_env + 'fig2_timeline_diagram.ps'
108;
109; site locations
110sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $
111           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $
112           '8s165e', '8s180w',  '8s155w', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $
113          '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $
114          '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $
115          '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $
116          '2n95w', '5n147e', '5n156e', '5n165e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $
117          '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $
118          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $
119          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w']
120;
121nn=n_elements(sitelist)
122date1=19890101
123date2=20091231
124;
125no_obs_lh=findgen(7670.)*0.
126no_obs_lw=findgen(7670.)*0.
127no_obs_sw=findgen(7670.)*0.
128;
129for n=0, nn-1 do begin
130;
131; reading data from mooring
132;
133    site=sitelist(n)
134    csite=site
135    print, csite
136    x=x_site_location(site)
137    y=y_site_location(site)
138    if (y ge 0. and y le 30.) then y=y+360.
139    dx=0.5
140    dy=0.5
141    box=[y-dy, y+dy, x-dx, x+dx]
142;
143    nsmooth=1.
144    print, csite
145    print, date1
146    print, date2
147    read_lh, csite, date1, date2, nsmooth, lh
148;
149    ind=where(finite(lh))
150    lh[ind]=1.
151    ind=where(finite(lh,/nan))
152    lh[ind]=0.
153    no_obs_lh=no_obs_lh+lh
154;
155endfor
156;
157sitelist=['5n165e','8s67e','12s55e', '8s55e', '8s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $
158           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $
159           '8s165e', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $
160          '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $
161          '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $
162          '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $
163          '2n95w', '5n147e', '5n156e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $
164          '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $
165          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $
166          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w']
167;
168nn=n_elements(sitelist)
169;
170for n=0, nn-1 do begin
171;
172; reading data from mooring
173;
174    site=sitelist(n)
175    csite=site
176    print, csite
177    x=x_site_location(site)
178    y=y_site_location(site)
179    if (y ge 0. and y le 30.) then y=y+360.
180    dx=0.5
181    dy=0.5
182    box=[y-dy, y+dy, x-dx, x+dx]
183;
184    nsmooth=1.
185    read_sw, csite, date1, date2, box, sw
186    swr=sw
187    ind=where(finite(swr))
188    valid=n_elements(ind)
189    if (valid ge 10) then begin
190       ind=where(finite(sw))
191       sw[ind]=1.
192       ind=where(finite(sw,/nan))
193       sw[ind]=0.
194       no_obs_sw=no_obs_sw+sw
195    endif
196endfor
197help, no_obs_sw
198;
199sitelist=['0n110w', '0n140w', '0n165e', '0n170w', '0n23w', '0n80.5e', '0n95w', '10s10w', '12n23w', '15n38w', $
200          '15n90e', '2n95w', '2s95w', '5n95w', '5s95w', '8n95w', '8s67e', '8s95w']
201;
202nn=n_elements(sitelist)
203;
204for n=0, nn-1 do begin
205;
206; reading data from mooring
207;
208    site=sitelist(n)
209    csite=site
210    print, csite
211    x=x_site_location(site)
212    y=y_site_location(site)
213    if (y ge 0. and y le 30.) then y=y+360.
214    dx=0.5
215    dy=0.5
216    box=[y-dy, y+dy, x-dx, x+dx]
217;
218    nsmooth=1.
219    read_lw, csite, date1, date2, box, lw
220    lwr=lw
221    ind=where(finite(lwr))
222    valid=n_elements(ind)
223    if (valid ge 10) then begin
224       ind=where(finite(lw))
225       lw[ind]=1.
226       ind=where(finite(lw,/nan))
227       lw[ind]=0.
228       no_obs_lw=no_obs_lw+lw
229    endif
230;
231endfor
232;
233help,no_obs_lw
234pltt, no_obs_lh, "t", small=[1,3,1],/rempl,0,80, $
235     title='No of valid observations for turbulent flux validation', charsize=1., $
236     ytitle="No. of observations",subtitle='black(turbulent), red(SWR), blue(LWR)'
237pltt, no_obs_sw, "t",/ov1d, color=250
238pltt, no_obs_lw, "t",/ov1d, color=50
239pltt, no_obs_lh, "t",/ov1d
240;
241closeps
242;
243end
Note: See TracBrowser for help on using the repository browser.