source: trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro

Last change on this file was 203, checked in by pinsard, 10 years ago

fix thanks to coding rules

  • Property svn:keywords set to Id URL
File size: 13.4 KB
Line 
1;+
2; .. _subdctn_ses_validation_net_1991_93_all_v10.pro:
3;
4; ==============================================
5; subdctn_ses_validation_net_1991_93_all_v10.pro
6; ==============================================
7;
8; DESCRIPTION
9; ===========
10;
11; .. graphviz::
12;
13;    digraph subdctn_ses_validation_net_1991_93_all_v10 {
14;
15;       met_data [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/met_data_subduct_ses_9*.txt"];
16;       swr_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
17;       lwr_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
18;       lhf_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
19;       shf_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
20;       tropflux_general [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/TropFlux_19890101_20091231.nc"];
21;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
22;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/swr_oafluxgrid_1985_2007.nc"];
23;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lwr_oafluxgrid_1985_2007.nc"];
24;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_oafluxgrid_1985_2007.nc"];
25;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/shf_oafluxgrid_1985_2007.nc"];
26;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
27;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/NCEP2_flux_19890101_20090729.nc"];
28;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
29;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
30;
31;       ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ncep1_flux_19890101_20091231.nc"];
32;
33;       figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/subdctn_ses_validation_net_1991_93_all_v10.ps"];
34;
35;       subdctn_ses_validation_net_1991_93_all_v10 [shape=box,
36;       fontname=Courier,
37;       color=blue,
38;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro",
39;       label="${TROPFLUX}/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro"];
40;
41;       {met_data swr_erai  lwr_erai lhf_erai shf_erai tropflux_general swr_tropflux_nrt swr_oafluxgrid lwr_oafluxgrid lhf_oafluxgrid shf_oafluxgrid swr_ncep2 lwr_ncep2 lhf_ncep2 shf_ncep2 ncep1} -> {subdctn_ses_validation_net_1991_93_all_v10} -> {figure}
42;    }
43;
44; SEE ALSO
45; ========
46;
47; :ref:`project_profile.sh`
48; :ref:`project_init.pro`
49; :ref:`cm_project.pro`
50;
51; :ref:`statistics.pro`
52;
53; EXAMPLES
54; ========
55;
56; .. code-block:: idl
57;
58;    subdctn_ses_validation_net_1991_93_all_v10
59;
60; TODO
61; ====
62;
63; make it work on cratos : missing data
64;
65; coding rules
66;
67; complete description
68;
69; handle IO error
70;
71; EVOLUTIONS
72; ==========
73;
74; $Id$
75;
76; $URL$
77;
78; - fplod 20110420T121359Z aedon.locean-ipsl.upmc.fr (Darwin)
79;
80;   * remove hard coding path
81;   * add graphviz
82;
83; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
84;
85;   * minimal header
86;
87;-
88pro subdctn_ses_validation_net_1991_93_all_v10
89@cm_general
90@cm_project
91reinitplt, /z,/invert
92key_portrait = 1
93coefpalit=.9
94;
95openps, FILENAME = project_od_env+"subdctn_ses_validation_net_1991_93_all_v10.ps"
96; partie a changer
97;
98; subduction experiment in the atlantic in 1991-93
99box=[337.5, 338.5, 17.5, 18.5]
100;
101; first leg
102;
103; second leg
104;
105fi=project_id_env+"met_data_subduct_ses_92.txt"
106res=read_ascii(fi,data_start=1)
107ff=res.field1
108swr_92=reform(ff(7,*))
109lhf_92=reform(ff(5,*))
110shf_92=reform(ff(6,*))
111lwr_92=reform(ff(8,*))
112net_92=[swr_92+lwr_92+shf_92+lhf_92]
113help, net_92
114;
115; second leg
116;
117fi=project_id_env+"met_data_subduct_ses_93.txt"
118res=read_ascii(fi,data_start=1)
119ff=res.field1
120swr_93=reform(ff(7,*))
121lhf_93=reform(ff(5,*))
122shf_93=reform(ff(6,*))
123lwr_93=reform(ff(8,*))
124net_93=[swr_93+lwr_93+shf_93+lhf_93]
125help, net_93
126;
127net=[net_92, net_93]
128help, net
129;
130; reading other data sets
131;
132st1=19920209
133en1=19920911
134st2=19920921
135en2=19930618
136;
137file=project_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
138initncdf, file
139swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box)
140swr1=grossemoyenne(swr1, "xy", box=box,/nan)
141swr1=reform(swr1)
142swr2=read_ncdf('swr',st2,en2,file=file,/nostr, box=box)
143swr2=grossemoyenne(swr2, "xy", box=box,/nan)
144swr2=reform(swr2)
145;
146file=project_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
147initncdf, file
148lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box)
149lhf1=grossemoyenne(lhf1, "xy", box=box,/nan)
150lhf1=reform(lhf1)
151lhf2=-1*read_ncdf('lhf',st2,en2,file=file,/nostr, box=box)
152lhf2=grossemoyenne(lhf2, "xy", box=box,/nan)
153lhf2=reform(lhf2)
154;
155file=project_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
156initncdf, file
157shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box)
158shf1=grossemoyenne(shf1, "xy", box=box,/nan)
159shf1=reform(shf1)
160shf2=-1*read_ncdf('shf',st2,en2,file=file,/nostr, box=box)
161shf2=grossemoyenne(shf2, "xy", box=box,/nan)
162shf2=reform(shf2)
163;
164file=project_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
165initncdf, file
166lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box)
167lwr1=grossemoyenne(lwr1, "xy", box=box,/nan)
168lwr1=reform(lwr1)
169lwr2=read_ncdf('lwr',st2-1,en2,file=file,/nostr, box=box)
170lwr2=grossemoyenne(lwr2, "xy", box=box,/nan)
171lwr2=reform(lwr2)
172;
173net1=swr1+(lwr1+shf1+lhf1)
174net2=swr2+(lwr2+shf2+lhf2)
175era=[net1,net2]
176help, era
177;
178lhf1=0.
179lhf2=0.
180shf1=0.
181shf2=0.
182lwr1=0.
183lwr2=0.
184swr1=0.
185swr2=0.
186net1=0.
187net2=0.
188;
189file=project_id_env+"TropFlux_19890101_20091231.nc"
190initncdf, file
191lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box)
192lhf1=grossemoyenne(lhf1, "xy", box=box,/nan)
193lhf1=reform(lhf1)
194lhf2=read_ncdf('lhf',st2,en2,file=file,/nostr, box=box)
195lhf2=grossemoyenne(lhf2, "xy", box=box,/nan)
196lhf2=reform(lhf2)
197shf1=read_ncdf('shf',st1,en1,file=file,/nostr, box=box)
198shf1=grossemoyenne(shf1, "xy", box=box,/nan)
199shf1=reform(shf1)
200shf2=read_ncdf('shf',st2,en2,file=file,/nostr, box=box)
201shf2=grossemoyenne(shf2, "xy", box=box,/nan)
202shf2=reform(shf2)
203lwr1=read_ncdf('lwr',st1,en1,file=file,/nostr, box=box)
204lwr1=grossemoyenne(lwr1, "xy", box=box,/nan)
205lwr1=reform(lwr1)
206lwr2=read_ncdf('lwr',st2,en2,file=file,/nostr, box=box)
207lwr2=grossemoyenne(lwr2, "xy", box=box,/nan)
208lwr2=reform(lwr2)
209swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box)
210swr1=grossemoyenne(swr1, "xy", box=box,/nan)
211swr1=reform(swr1)
212swr2=read_ncdf('swr',st2,en2,file=file,/nostr, box=box)
213swr2=grossemoyenne(swr2, "xy", box=box,/nan)
214swr2=reform(swr2)
215;
216file=project_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
217initncdf, file
218olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box)
219olr1=grossemoyenne(olr1, "xy",/nan, box=box)
220olr1=reform(olr1)
221olr2=read_ncdf("sw", st2-1, en2, file=file,/nostr, box=box)
222olr2=grossemoyenne(olr2, "xy",/nan, box=box)
223olr2=reform(olr2)
224;
225net1=swr1+lwr1+(shf1+lhf1)
226net2=swr2+lwr2+(shf2+lhf2)
227neto_1=olr1+lwr1+lhf1+shf1
228neto_2=olr2+lwr2+lhf2+shf2
229trop=[net1,net2]
230olr=[neto_1,neto_2]
231help, trop, olr
232;
233file=project_id_env+'swr_oafluxgrid_1985_2007.nc'
234initncdf, file
235swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box)
236swr1=grossemoyenne(swr1, "xy",/nan, box=box)
237swr1=reform(swr1)
238swr2=read_ncdf("swr", st2, en2, file=file,/nostr, box=box)
239swr2=grossemoyenne(swr2, "xy",/nan, box=box)
240swr2=reform(swr2)
241;
242file=project_id_env+'lwr_oafluxgrid_1985_2007.nc'
243initncdf, file
244lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box)
245lwr1=grossemoyenne(lwr1, "xy",/nan, box=box)
246lwr1=reform(lwr1)
247lwr2=-1*read_ncdf("lwr", st2, en2, file=file,/nostr, box=box)
248lwr2=grossemoyenne(lwr2, "xy",/nan, box=box)
249lwr2=reform(lwr2)
250;
251file=project_id_env+'lhf_oafluxgrid_1985_2009.nc'
252initncdf, file
253lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box)
254lhf1=grossemoyenne(lhf1, "xy",/nan, box=box)
255lhf1=reform(lhf1)
256lhf2=-1*read_ncdf("lhf", st2, en2, file=file,/nostr, box=box)
257lhf2=grossemoyenne(lhf2, "xy",/nan, box=box)
258lhf2=reform(lhf2)
259;
260file=project_id_env+'shf_oafluxgrid_1985_2009.nc'
261initncdf, file
262shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box)
263shf1=grossemoyenne(shf1, "xy",/nan, box=box)
264shf1=reform(shf1)
265shf2=-1*read_ncdf("shf", st2, en2, file=file,/nostr, box=box)
266shf2=grossemoyenne(shf2, "xy",/nan, box=box)
267shf2=reform(shf2)
268;
269net1=swr1+lwr1+lhf1+shf1
270net2=swr2+lwr2+lhf2+shf2
271oaf=[net1,net2]
272help, oaf
273;
274fi=project_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
275initncdf, fi
276swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box)
277swr1=grossemoyenne(swr1, "xy",/nan, box=box)
278swr1=reform(swr1)
279swr2=read_ncdf("swr", st2, en2, file=fi,/nostr, box=box)
280swr2=grossemoyenne(swr2, "xy",/nan, box=box)
281swr2=reform(swr2)
282;
283fi=project_id_env+"NCEP2_flux_19890101_20090729.nc"
284initncdf, fi
285lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box)
286lwr1=grossemoyenne(lwr1, "xy",/nan, box=box)
287lwr1=reform(lwr1)
288lwr2=-1*read_ncdf("lwr", st2, en2, file=fi,/nostr, box=box)
289lwr2=grossemoyenne(lwr2, "xy",/nan, box=box)
290lwr2=reform(lwr2)
291;
292fi=project_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
293initncdf, fi
294lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box)
295lhf1=grossemoyenne(lhf1, "xy",/nan, box=box)
296lhf1=reform(lhf1)
297lhf2=-1*read_ncdf("lhf", st2, en2, file=fi,/nostr, box=box)
298lhf2=grossemoyenne(lhf2, "xy",/nan, box=box)
299lhf2=reform(lhf2)
300;
301fi=project_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
302initncdf, fi
303shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box)
304shf1=grossemoyenne(shf1, "xy",/nan, box=box)
305shf1=reform(shf1)
306shf2=-1*read_ncdf("shf", st2, en2, file=fi,/nostr, box=box)
307shf2=grossemoyenne(shf2, "xy",/nan, box=box)
308shf2=reform(shf2)
309;
310net1=swr1+lwr1+lhf1+shf1
311net2=swr2+lwr2+lhf2+shf2
312nce2=[net1,net2]
313help, nce2
314;
315file=project_id_env+"ncep1_flux_19890101_20091231.nc"
316initncdf, file
317lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box)
318lhf1=grossemoyenne(lhf1, "xy", box=box,/nan)
319lhf1=reform(lhf1)
320lhf2=read_ncdf('lhf',st2,en2,file=file,/nostr, box=box)
321lhf2=grossemoyenne(lhf2, "xy", box=box,/nan)
322lhf2=reform(lhf2)
323shf1=read_ncdf('shf',st1,en1,file=file,/nostr, box=box)
324shf1=grossemoyenne(shf1, "xy", box=box,/nan)
325shf1=reform(shf1)
326shf2=read_ncdf('shf',st2,en2,file=file,/nostr, box=box)
327shf2=grossemoyenne(shf2, "xy", box=box,/nan)
328shf2=reform(shf2)
329lwr1=read_ncdf('lwr',st1,en1,file=file,/nostr, box=box)
330lwr1=grossemoyenne(lwr1, "xy", box=box,/nan)
331lwr1=reform(lwr1)
332lwr2=read_ncdf('lwr',st2,en2,file=file,/nostr, box=box)
333lwr2=grossemoyenne(lwr2, "xy", box=box,/nan)
334lwr2=reform(lwr2)
335swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box)
336swr1=grossemoyenne(swr1, "xy", box=box,/nan)
337swr1=reform(swr1)
338swr2=read_ncdf('swr',st2,en2,file=file,/nostr, box=box)
339swr2=grossemoyenne(swr2, "xy", box=box,/nan)
340swr2=reform(swr2)
341net1=swr1+(lwr1+shf1+lhf1)
342net2=swr2+(lwr2+shf2+lhf2)
343nce1=[net1,net2]
344;
345help, nce1
346;
347ind=where(finite(net))
348net=net(ind)
349era=era(ind)
350trop=trop(ind)
351oaf=oaf(ind)
352nce2=nce2(ind)
353nce1=nce1(ind)
354olr=olr(ind)
355;
356statistics, net, era, $
357                 cor, bias, std, rmsd
358print, cor, bias, std,  rmsd
359cstat_era=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
360;
361statistics, net, trop, $
362                 cor, bias, std, rmsd
363print, cor, bias, std,  rmsd
364cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
365;
366statistics, net, oaf, $
367                 cor, bias, std, rmsd
368print, cor, bias, std,  rmsd
369cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
370;
371statistics, net, nce1, $
372                 cor, bias, std, rmsd
373print, cor, bias, std,  rmsd
374cstat_nce1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
375;
376statistics, net, nce2, $
377                 cor, bias, std, rmsd
378print, cor, bias, std,  rmsd
379cstat_nce2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
380;
381statistics, net, olr, $
382                 cor, bias, std, rmsd
383print, cor, bias, std,  rmsd
384cstat_olr=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)')
385;
386splot, net, era, charsize=1.1, title='Net Flux - Subdn. ses Vs ERAI', $
387     xrange=[-200,200], yrange=[-200,200], small=[2,3,1], psym=2, xmin=1, ymin=1
388oplot, [-200,200], [-200,200]
389xyouts, 0,-175, cstat_era, charsize=1.
390;
391splot, net, trop, charsize=1.1, title='Net Flux - Subdn. ses Vs TropFlux',/noer, $
392     xrange=[-200,200], yrange=[-200,200], small=[2,3,2], psym=2, xmin=1, ymin=1
393oplot, [-200,200], [-200,200]
394xyouts, 0,-175, cstat_trop, charsize=1.
395;
396splot, net, oaf, charsize=1.1, title='Net Flux - Subdn. ses Vs OAFlux',/noer, $
397     xrange=[-200,200], yrange=[-200,200], small=[2,3,3], psym=2, xmin=1, ymin=1
398oplot, [-200,200], [-200,200]
399xyouts, 0,-175, cstat_oaf, charsize=1.
400;
401splot, net, nce1, charsize=1.1, title='Net Flux - Subdn. ses Vs NCEP1',/noer, $
402     xrange=[-200,200], yrange=[-200,200], small=[2,3,4], psym=2, xmin=1, ymin=1
403oplot, [-200,200], [-200,200]
404xyouts, 0,-175, cstat_nce1, charsize=1.
405;
406splot, net, nce2, charsize=1.1, title='Net Flux - Subdn. ses Vs NCEP2',/noer, $
407     xrange=[-200,200], yrange=[-200,200], small=[2,3,5], psym=2, xmin=1, ymin=1
408oplot, [-200,200], [-200,200]
409xyouts, 0,-175, cstat_nce2, charsize=1.
410;
411splot, net, olr, charsize=1.1, title='Net Flux - Subdn. ses Vs TropFlux_NRT',/noer, $
412     xrange=[-200,200], yrange=[-200,200], small=[2,3,6], psym=2, xmin=1, ymin=1
413oplot, [-200,200], [-200,200]
414xyouts, 0,-175, cstat_olr, charsize=1.
415;
416closeps
417;
418end
Note: See TracBrowser for help on using the repository browser.