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
RevLine 
[43]1;+
2; .. _fig2_timeline_diagram.pro:
3;
4; =========================
5; fig2_timeline_diagram.pro
6; =========================
7;
8; DESCRIPTION
9; ===========
10;
[97]11; Figure of
[85]12; ++
13; is saved in
14; :file:`${PROJECT_OD}/fig2_timeline_diagram.ps`.
15;
[44]16; .. graphviz::
17;
18;    digraph fig2_timeline_diagram  {
19;
[50]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"];
[85]23;
[44]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;
[50]30;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/fig2_timeline_diagram.ps"];
[44]31;
32;       {qlat lwnet swnet} -> {fig2_timeline_diagram} -> {figure}
33;    }
34;
[43]35; SEE ALSO
36; ========
37;
[50]38; :ref:`project_profile.sh`
39; :ref:`project_init.pro`
[43]40;
[44]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;
[43]48; EXAMPLES
49; ========
50;
51; ::
52;
[180]53;  fig2_timeline_diagram
[43]54;
[44]55; TODO
56; ====
57;
[47]58; make it work on cratos and loholt1::
[85]59;
[46]60;    % Error:
[44]61;    % the vector size (7670) is incompatible
[46]62;    % with the domain dimensions
[44]63;    % [jpi/nx, jpj/ny, jpk/nz, jpt] = [1/1, 1/1, 1/1, 1]
64;
[85]65; missing cdf files : where are they coming from
[47]66;
[44]67; coding rules
68;
69; complete description
70;
71; handle IO error
72;
[43]73; EVOLUTIONS
74; ==========
75;
76; $Id$
77;
[85]78; $URL$
79;
80; - fplod 20110817T104854Z aedon.locean-ipsl.upmc.fr (Darwin)
81;
82;   * get rid of spawn
83;
[44]84; - fplod 20110412T084618Z aedon.locean-ipsl.upmc.fr (Darwin)
85;
86;   * remove hard coding path
87;   * add graphviz
88;   * externalize function
89;
[43]90; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
91;
92;   * minimal header
93;
94;-
[41]95pro fig2_timeline_diagram
[85]96;
97@cm_4cal
98@cm_4data
99@cm_4mesh
100@cm_4data
[50]101@cm_project
[85]102;
[41]103reinitplt, /z,/invert
104key_portrait = 1
105coefpalit=.9
[97]106;
[85]107openps, FILENAME = project_od_env + 'fig2_timeline_diagram.ps'
[97]108;
[44]109; site locations
[41]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']
[97]120;
[41]121nn=n_elements(sitelist)
122date1=19890101
123date2=20091231
[97]124;
[41]125no_obs_lh=findgen(7670.)*0.
126no_obs_lw=findgen(7670.)*0.
127no_obs_sw=findgen(7670.)*0.
[97]128;
[41]129for n=0, nn-1 do begin
[97]130;
131; reading data from mooring
132;
133    site=sitelist(n)
[94]134    csite=site
[41]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.
[97]139    dx=0.5
140    dy=0.5
[94]141    box=[y-dy, y+dy, x-dx, x+dx]
[97]142;
[41]143    nsmooth=1.
[44]144    print, csite
145    print, date1
146    print, date2
147    read_lh, csite, date1, date2, nsmooth, lh
[97]148;
149    ind=where(finite(lh))
[94]150    lh[ind]=1.
[97]151    ind=where(finite(lh,/nan))
[94]152    lh[ind]=0.
[41]153    no_obs_lh=no_obs_lh+lh
[97]154;
[41]155endfor
[97]156;
[41]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']
[97]167;
[41]168nn=n_elements(sitelist)
[97]169;
[41]170for n=0, nn-1 do begin
[97]171;
172; reading data from mooring
173;
174    site=sitelist(n)
[94]175    csite=site
[41]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.
[97]180    dx=0.5
181    dy=0.5
[94]182    box=[y-dy, y+dy, x-dx, x+dx]
[97]183;
[41]184    nsmooth=1.
[44]185    read_sw, csite, date1, date2, box, sw
[97]186    swr=sw
187    ind=where(finite(swr))
[94]188    valid=n_elements(ind)
[41]189    if (valid ge 10) then begin
[97]190       ind=where(finite(sw))
[94]191       sw[ind]=1.
[97]192       ind=where(finite(sw,/nan))
[94]193       sw[ind]=0.
[41]194       no_obs_sw=no_obs_sw+sw
195    endif
196endfor
197help, no_obs_sw
[97]198;
[41]199sitelist=['0n110w', '0n140w', '0n165e', '0n170w', '0n23w', '0n80.5e', '0n95w', '10s10w', '12n23w', '15n38w', $
200          '15n90e', '2n95w', '2s95w', '5n95w', '5s95w', '8n95w', '8s67e', '8s95w']
[97]201;
[41]202nn=n_elements(sitelist)
[97]203;
[41]204for n=0, nn-1 do begin
[97]205;
206; reading data from mooring
207;
208    site=sitelist(n)
[94]209    csite=site
[41]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.
[97]214    dx=0.5
215    dy=0.5
[94]216    box=[y-dy, y+dy, x-dx, x+dx]
[97]217;
[41]218    nsmooth=1.
[44]219    read_lw, csite, date1, date2, box, lw
[97]220    lwr=lw
221    ind=where(finite(lwr))
[94]222    valid=n_elements(ind)
[41]223    if (valid ge 10) then begin
[97]224       ind=where(finite(lw))
[94]225       lw[ind]=1.
[97]226       ind=where(finite(lw,/nan))
[94]227       lw[ind]=0.
[41]228       no_obs_lw=no_obs_lw+lw
229    endif
[97]230;
[41]231endfor
[97]232;
[41]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
[97]240;
[41]241closeps
[97]242;
[41]243end
Note: See TracBrowser for help on using the repository browser.