Index: /trunk/src/paper01/fig1/fig1_no_obs_map.pro
===================================================================
--- /trunk/src/paper01/fig1/fig1_no_obs_map.pro	(revision 45)
+++ /trunk/src/paper01/fig1/fig1_no_obs_map.pro	(revision 46)
@@ -42,4 +42,7 @@
 ; :ref:`tropflux_init.pro`
 ;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
 ; :ref:`oaflux_mask_30N30S.pro`
 ;
@@ -69,4 +72,8 @@
 ;
 ; $Id$
+;
+; - fplod 20110420T134821Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * externalize functions
 ;
 ; - fplod 20110412T073818Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -222,43 +229,2 @@
 spawn, 'gv '+fig
 end
-
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig10/fig10_swr_correction.pro
===================================================================
--- /trunk/src/paper01/fig10/fig10_swr_correction.pro	(revision 45)
+++ /trunk/src/paper01/fig10/fig10_swr_correction.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _fig10_swr_correction.pro
+; .. _fig10_swr_correction.pro:
 ;
 ; ========================
@@ -9,8 +9,31 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph fig10_swr_correction {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       swr_isccp [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_isccp_correction.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig10_swr_correction.ps"];
+;
+;       fig10_swr_correction [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig10/fig10_swr_correction.pro",
+;       label="${TROPFLUX}/src/paper01/fig10/fig10_swr_correction.pro"];
+;
+;       {swr_isccp} -> {fig10_swr_correction} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`significance_test_99.pro`
 ;
 ; EXAMPLES
@@ -22,8 +45,33 @@
 ;  IDL> fig10_swr_correction
 ;
+; TODO
+; ====
+;
+; check results
+;
+; improve plot
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T140853Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * make it work on cratos
+;   * replace significance_test by significance_test_99
+;
+; - fplod 20110420T105744Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -32,7 +80,7 @@
 ;
 ;-
-
 pro fig10_swr_correction
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -41,5 +89,5 @@
 close,/all
 
-fi='/Users/pkb/work/MY_SAXO/flux_automat/swr_isccp_correction.txt'
+fi=tropflux_id_env+'swr_isccp_correction.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -61,5 +109,5 @@
 significance_test_99,mean,bias
 
-fi='/Users/pkb/work/MY_SAXO/flux_automat/swr_isccp_correction.txt'
+fi=tropflux_id_env+'swr_isccp_correction.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -78,11 +126,11 @@
 
 ;; significant test
-significance_test,mean,std
+significance_test_99,mean,std
 
 closeps
 
-fig='fig10_swr_correction.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
+fig=tropflux_od_env+'fig10_swr_correction.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 
 end
Index: /trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro
===================================================================
--- /trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro	(revision 45)
+++ /trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro	(revision 46)
@@ -9,8 +9,29 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph swr_isccp_tropflux_correlation_fig10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_sst_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/correlation_rmsd_olra_swra_smooth.ps"];
+;
+;       swr_isccp_tropflux_correlation_fig10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro",
+;       label="${TROPFLUX}/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro"];
+;
+;       {sst} -> {swr_isccp_tropflux_correlation_fig10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
 ;
 ; EXAMPLES
@@ -22,8 +43,26 @@
 ;  IDL> swr_isccp_tropflux_correlation_fig10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : get rid of restore
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T110411Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -33,5 +72,6 @@
 ;-
 pro swr_isccp_tropflux_correlation_fig10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -42,5 +82,5 @@
 restore, "/Users/pkb/work/MY_SAXO/correlation_isccp_olr.idl"
 
-file="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc"
+file=tropflux_id_env+'TropFlux_sst_19890101_20091231.nc"
 initncdf, file
 sst=read_ncdf("sst", 20000101, 20091231, file=file,/nostr)
@@ -56,8 +96,6 @@
 
 closeps
-fig='correlation_rmsd_olra_swra_smooth.ps'
-spawn, 'mv '+psdir+'idl.ps '+psdir+fig
-spawn, 'gv '+psdir+fig
-
-stop
+fig=tropflux_od_env+'correlation_rmsd_olra_swra_smooth.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro
===================================================================
--- /trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro	(revision 45)
+++ /trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro	(revision 46)
@@ -10,8 +10,32 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph swr_isccp_tropflux_new_v1 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       swr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       sw [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sw_reconstred_1989_2009.nc"];
+;       olr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/olr_oafluxgrid_30n30s.nc"];
+;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_sst_19890101_20091231_v20.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/correlation_rmsd_olra_swra_smooth.ps"];
+;
+;       swr_isccp_tropflux_new_v1 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro",
+;       label="${TROPFLUX}/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro"];
+;
+;       {swr sw olr sst} -> {swr_isccp_tropflux_new_v1} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
 ;
 ; EXAMPLES
@@ -23,8 +47,26 @@
 ;  IDL> swr_isccp_tropflux_new_v1
 ;
+; TODO
+; ====
+;
+; make it work on cratos : mising data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T113330Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -34,5 +76,6 @@
 ;-
 pro swr_isccp_tropflux_new_v1
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -41,13 +84,13 @@
 st=19890101 & en=20071231
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 sw_isccp=read_ncdf("swr", st, en, file=file,/nostr)
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/basic_data/sw_reconstred_1989_2009.nc'
+file=tropflux_id_env+'sw_reconstred_1989_2009.nc'
 initncdf, file
 sw_trop=read_ncdf("sw", st, en+1, file=file,/nostr)
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/basic_data/olr_oafluxgrid_30n30s.nc'
+file=tropflux_id_env+'olr_oafluxgrid_30n30s.nc'
 initncdf, file
 olr=read_ncdf("olr", st, en, file=file,/nostr)
@@ -132,5 +175,5 @@
      subt='',title='a) Correlation (OLRA, SWRA)',xminor=1,yminor=1
 
-file="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231_v20.nc"
+file=tropflux_id_env+'TropFlux_sst_19890101_20091231_v20.nc"
 initncdf, file
 sst=read_ncdf("sst", 19890101, 20091231, file=file,/nostr)
@@ -149,9 +192,6 @@
 
 closeps
-fig='correlation_rmsd_olra_swra_smooth.ps'
-spawn, 'mv '+psdir+'idl.ps '+psdir+fig
-spawn, 'gv '+psdir+fig
-
-return
-
+fig=tropflux_od_env+'correlation_rmsd_olra_swra_smooth.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro
===================================================================
--- /trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro	(revision 45)
+++ /trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _swr_statistics_map_2000_2009_v50.pro
+; .. _swr_statistics_map_2000_2009_v50.pro:
 ;
 ; ====================================
@@ -9,8 +9,33 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph swr_statistics_map_2000_2009_v50 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_2000_2009_erai_v50.txt"];
+;       swr_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_2000_2009_trop_v50.txt"];
+;       swr_oaflx [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_2000_2009_oaflx_v50.txt"];
+;       swr_olr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_2000_2009_olr_v50.txt"];
+;       mask [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/longwave_IO_mask.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_statistics_map_2000_2009_v50.ps"];
+;
+;       swr_statistics_map_2000_2009_v50 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro",
+;       label="${TROPFLUX}/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro"];
+;
+;       {swr_erai swr_trop swr_oaflx swr_olr mask} -> {swr_statistics_map_2000_2009_v50} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
 ;
 ; EXAMPLES
@@ -22,4 +47,17 @@
 ;  IDL> swr_statistics_map_2000_2009_v50
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +65,10 @@
 ; $Id$
 ;
+; - fplod 20110420T113846Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove stop
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +77,6 @@
 ;-
 pro swr_statistics_map_2000_2009_v50
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,8 +89,8 @@
 rmsd_mi=10  & rmsd_ma=30 & rmsd_int=1.25
 cor_mi=0.5   & cor_ma=1.  & cor_int=0.02
-fi_swr_erai='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2009_erai_v50.txt'
-fi_swr_trop='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2009_trop_v50.txt'
-fi_swr_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2009_oaflx_v50.txt'
-fi_swr_olr='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2009_olr_v50.txt'
+fi_swr_erai=tropflux_id_env+'swr_2000_2009_erai_v50.txt'
+fi_swr_trop=tropflux_id_env+'swr_2000_2009_trop_v50.txt'
+fi_swr_oaflx=tropflux_id_env+'swr_2000_2009_oaflx_v50.txt'
+fi_swr_olr=tropflux_id_env+'swr_2000_2009_olr_v50.txt'
 
 res=read_ascii(fi_swr_erai,data_start=1)
@@ -92,6 +137,5 @@
 
 ;ind=where(std_olr ge std_ma) & std_olr(ind)=std_ma-0.01
-stop
-file='/Users/pkb/data/heat_budget/OAFLUX/longwave_IO_mask.nc'
+file=tropflux_id_env+'longwave_IO_mask.nc'
 initncdf, file
 domdef, 30,390,-30,30
@@ -516,7 +560,6 @@
 endfor
 closeps
-fig='swr_statistics_map_2000_2009_v50.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'swr_statistics_map_2000_2009_v50.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro
===================================================================
--- /trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro	(revision 45)
+++ /trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _net_flux_validation_scatter_2000_2007.pro
+; .. _net_flux_validation_scatter_2000_2007.pro:
 ;
 ; =========================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph net_flux_validation_scatter_2000_2007 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       tropflux_dt_swr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20071231_DT_v50.nc"];
+;       tropflux_nrt_swr [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2008.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2008.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       net_nrt_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_2000_2007_erai_v50.txt"];
+;       net_nrt_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_2000_2007_trop_v50.txt"];
+;       net_nrt_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_2000_2007_ncep_v50.txt"];
+;       net_nrt_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_2000_2007_ncep1_v50.txt"];
+;       net_nrt_tropd [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_2000_2007_tropd_v50.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/net_flux_validation_scatter_2000_2007.ps"];
+;
+;       net_flux_validation_scatter_2000_2007 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro",
+;       label="${TROPFLUX}/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro"];
+;
+;       {tropflux_general tropflux_dt_swr tropflux_nrt_swr ncep2 erai shf_oafluxgrid lhf_oafluxgrid lwr_oafluxgrid ncep1} -> {net_flux_validation_scatter_2000_2007} -> {net_nrt_erai net_nrt_trop net_nrt_ncep net_nrt_ncep1 net_nrt_tropd figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +59,20 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> net_flux_validation_scatter_2000_2007, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +81,10 @@
 ; $Id$
 ;
+; - fplod 20110420T114953Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,6 +93,6 @@
 ;-
 pro net_flux_validation_scatter_2000_2007, date1, date2
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -61,5 +119,5 @@
 nsmooth=1.
 ;;   This program will create the following text files with statistics of respective variables
-file_trop='/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc'
+file_trop=tropflux_id_env+'TropFlux_19890101_20091231.nc'
 initncdf, file_trop
 shf_trop=read_ncdf("shf", date1, date2, file=file_trop,/nostr)
@@ -67,5 +125,5 @@
 lwr_trop=read_ncdf("lwr", date1, date2, file=file_trop,/nostr)
 
-file_trop='/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc'
+file_trop=tropflux_id_env+'TropFlux_swr_19890101_20071231_DT_v50.nc'
 initncdf, file_trop
 swr_dt=read_ncdf("swr", date1, date2, file=file_trop,/nostr)
@@ -73,5 +131,5 @@
 help, trop
 
-file_trop='/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc'
+file_trop=tropflux_id_env+'TropFlux_swr_19890101_20091231_NRT_v50.nc'
 initncdf, file_trop
 swr_nrt=read_ncdf("sw", date1-1, date2, file=file_trop,/nostr)
@@ -79,5 +137,5 @@
 help, tropd
 
-file_ncep='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc'
+file_ncep=tropflux_id_env+'NCEP2_flux_19890101_20090729.nc'
 initncdf, file_ncep
 shf=read_ncdf("shf", date1, date2, file=file_ncep,/nostr)
@@ -90,5 +148,5 @@
 help, ncep
 
-file_erai='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
+file_erai=tropflux_id_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
 initncdf, file_erai
 shf=read_ncdf("shf", date1, date2, file=file_erai,/nostr)
@@ -99,14 +157,14 @@
 help, erai
 
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2008.nc'
+file_oaf=tropflux_id_env+'shf_oafluxgrid_1985_2008.nc'
 initncdf, file_oaf
 shf=read_ncdf("shf", date1, date2, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2008.nc'
+file_oaf=tropflux_id_env+'lhf_oafluxgrid_1985_2008.nc'
 initncdf, file_oaf
 lhf=read_ncdf("lhf", date1, date2, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file_oaf=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file_oaf
 lwr=read_ncdf("lwr", date1, date2, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file_oaf=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file_oaf
 swr=read_ncdf("swr", date1, date2, file=file_oaf,/nostr) & swr_trop=swr
@@ -114,5 +172,5 @@
 help, oafl
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 lwr=read_ncdf("lwr", date1, date2, file=file,/nostr)
@@ -126,15 +184,15 @@
 close,/all
 
-fi_net_NRT_erai='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_erai_v50.txt'
+fi_net_NRT_erai=tropflux_id_env+'net_2000_2007_erai_v50.txt'
 openw,1,fi_net_NRT_erai
-fi_net_NRT_trop='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_trop_v50.txt'
+fi_net_NRT_trop=tropflux_id_env+'net_2000_2007_trop_v50.txt'
 openw,2,fi_net_NRT_trop
-fi_net_NRT_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_oaflx_v50.txt'
+fi_net_NRT_oaflx=tropflux_id_env+'net_2000_2007_oaflx_v50.txt'
 openw,3,fi_net_NRT_oaflx
-fi_net_NRT_ncep='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_ncep_v50.txt'
+fi_net_NRT_ncep=tropflux_id_env+'net_2000_2007_ncep_v50.txt'
 openw,4,fi_net_NRT_ncep
-fi_net_NRT_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_ncep1_v50.txt'
+fi_net_NRT_ncep1=tropflux_id_env+'net_2000_2007_ncep1_v50.txt'
 openw,5,fi_net_NRT_ncep1
-fi_net_NRT_tropd='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_tropd_v50.txt'
+fi_net_NRT_tropd=tropflux_id_env+'net_2000_2007_tropd_v50.txt'
 openw,6,fi_net_NRT_tropd
 
@@ -149,6 +207,4 @@
 nn=n_elements(sitelist)
 
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -219,5 +275,5 @@
 close,/all
 
-fi_net_NRT_erai='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_erai_v50.txt'
+fi_net_NRT_erai=tropflux_id_env+'net_2000_2007_erai_v50.txt'
 res=read_ascii(fi_net_NRT_erai,data_start=1)
 ff=res.field1
@@ -251,5 +307,5 @@
 
 
-fi_net_NRT_trop='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_trop_v50.txt'
+fi_net_NRT_trop=tropflux_id_env+'net_2000_2007_trop_v50.txt'
 res=read_ascii(fi_net_NRT_trop,data_start=1)
 ff=res.field1
@@ -283,5 +339,5 @@
 
 
-fi_net_NRT_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_oaflx_v50.txt'
+fi_net_NRT_oaflx=tropflux_id_env+'net_2000_2007_oaflx_v50.txt'
 res=read_ascii(fi_net_NRT_oaflx,data_start=1)
 ff=res.field1
@@ -316,5 +372,5 @@
 
 
-fi_net_NRT_ncep='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_ncep_v50.txt'
+fi_net_NRT_ncep=tropflux_id_env+'net_2000_2007_ncep_v50.txt'
 res=read_ascii(fi_net_NRT_ncep,data_start=1)
 ff=res.field1
@@ -348,5 +404,5 @@
 
 
-fi_net_NRT_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_ncep1_v50.txt'
+fi_net_NRT_ncep1=tropflux_id_env+'net_2000_2007_ncep1_v50.txt'
 res=read_ascii(fi_net_NRT_ncep1,data_start=1)
 ff=res.field1
@@ -380,5 +436,5 @@
 
 
-fi_net_NRT_tropd='/Users/pkb/work/MY_SAXO/flux_automat/net_2000_2007_tropd_v50.txt'
+fi_net_NRT_tropd=tropflux_id_env+'net_2000_2007_tropd_v50.txt'
 res=read_ascii(fi_net_NRT_tropd,data_start=1)
 ff=res.field1
@@ -413,46 +469,6 @@
 closeps
 
-fig='net_flux_validation_scatter_2000_2007.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'net_flux_validation_scatter_2000_2007.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _as_validation_net_1994_95_v10.pro
+; .. _as_validation_net_1994_95_v10.pro:
 ;
 ; =================================
@@ -9,8 +9,46 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph as_validation_net_1994_95_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_as_expt_19*.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/as_validation_net_1994_95_v10.ps"];
+;
+;       as_validation_net_1994_95_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/as_validation_net_1994_95_v10.pro"];
+;
+;       {met_data swr_erai  lwr_erai lhf_erai tropflux_general swr_tropflux_nrt swr_oafluxgrid lwr_oafluxgrid lhf_oafluxgrid shf_oafluxgrid swr_ncep2 lwr_ncep2 lhf_ncep2 shf_ncep2 ncep1} -> {as_validation_net_1994_95_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -23,4 +61,16 @@
 ;
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -28,4 +78,9 @@
 ; $Id$
 ;
+; - fplod 20110420T115926Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -34,5 +89,6 @@
 ;-
 pro as_validation_net_1994_95_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,5 +100,5 @@
 date1=19941016 & date2=19951019
 
-fi="/Users/pkb/data/Mooring_data/AS_expt/met_data_as_expt_1994.txt"
+fi=tropflux_id_env+"met_data_as_expt_1994.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -53,5 +109,5 @@
 net94=swr94+lwr94+lhf94+shf94
 
-fi="/Users/pkb/data/Mooring_data/AS_expt/met_data_as_expt_1995.txt"
+fi=tropflux_id_env+"met_data_as_expt_1995.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -71,14 +127,14 @@
 help, net
 ;; reading other data sets
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr=read_ncdf('swr',date1,date2,file=file,/nostr, box=asbox) & swr=reform(swr)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr=read_ncdf('lwr',date1-1,date2,file=file,/nostr, box=asbox) & lwr=reform(lwr)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf=-1*read_ncdf('shf',date1,date2,file=file,/nostr, box=asbox) & shf=reform(shf)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf=-1*read_ncdf('lhf',date1,date2,file=file,/nostr, box=asbox) & lhf=reform(lhf)
@@ -91,5 +147,5 @@
 swr=0. & lwr=0. & shf=0. & lhf=0.
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 swr=read_ncdf('swr',date1,date2,file=file,/nostr, box=asbox) & swr=reform(swr)
@@ -100,5 +156,5 @@
 help, trop
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", date1-1, date2, file=file,/nostr, box=asbox) ;; & olr1=grossemoyenne(olr1, "xy",/nan, box=asbox) &
@@ -112,17 +168,17 @@
 help, trop, olr
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr=read_ncdf("swr", date1, date2, file=file,/nostr, box=asbox) & swr=reform(swr)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr=read_ncdf("lwr", date1, date2, file=file,/nostr, box=asbox) & lwr=-1*reform(lwr)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf=read_ncdf("lhf", date1, date2, file=file,/nostr, box=asbox) & lhf=-1*reform(lhf)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf=read_ncdf("shf", date1, date2, file=file,/nostr, box=asbox) & shf=-1*reform(shf)
@@ -134,9 +190,9 @@
 swr=0. & lwr=0. & shf=0. & lhf=0.
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr=read_ncdf("swr", date1, date2, file=fi,/nostr, box=asbox) & swr=reform(swr)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr=read_ncdf("lwr", date1, date2, file=fi,/nostr, box=asbox) & lwr=grossemoyenne(lwr, "xy",/nan, box=asbox) & lwr=reform(lwr)
@@ -144,9 +200,9 @@
 lwr=-1*lwr
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf=read_ncdf("lhf", date1, date2, file=fi,/nostr, box=asbox) & lhf=-1*reform(lhf)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf=read_ncdf("shf", date1, date2, file=fi,/nostr, box=asbox) & shf=-1*reform(shf)
@@ -159,5 +215,5 @@
 swr=0. & lwr=0. & shf=0. & lhf=0.
 
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 swr=read_ncdf("swr", date1, date2, file=file,/nostr, box=asbox) & swr=reform(swr)
@@ -235,9 +291,7 @@
 xyouts, -150,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig='as_validation_net_1994_95_v10.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'as_validation_net_1994_95_v10.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro	(revision 46)
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph coare_validation_net_1992_93_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_as_expt_199*_p*.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/coare_validation_net_1992_93_all_v11.ps"];
+;
+;       coare_validation_net_1992_93_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro"];
+;
+;       {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} -> {coare_validation_net_1992_93_all_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +61,17 @@
 ;  IDL> coare_validation_net_1992_93_all_v10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +79,9 @@
 ; $Id$
 ;
+; - fplod 20110420T120449Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +90,6 @@
 ;-
 pro coare_validation_net_1992_93_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -45,5 +103,5 @@
 ;; first leg
 ;; start data - 11/11/92 and end date 03/12/92
-fi="/Users/pkb/data/Mooring_data/COARE/met_data_coare_expt_1992_p1.txt"
+fi=tropflux_id_env+"met_data_coare_expt_1992_p1.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -60,5 +118,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/COARE/met_data_coare_expt_1992_p2.txt"
+fi=tropflux_id_env+"met_data_coare_expt_1992_p2.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -75,5 +133,5 @@
 ;; third leg
 
-fi="/Users/pkb/data/Mooring_data/COARE/met_data_coare_expt_1993_p1.txt"
+fi=tropflux_id_env+"met_data_coare_expt_1993_p1.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -90,5 +148,5 @@
 ;; fourth leg
 
-fi="/Users/pkb/data/Mooring_data/COARE/met_data_coare_expt_1993_p2.txt"
+fi=tropflux_id_env+"met_data_coare_expt_1993_p2.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -113,6 +171,5 @@
 st4=19930128 & en4=19930216
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_swr_19890101_20091231_oafluxgrid.nc'
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy", box=box,/nan) & swr1=reform(swr1)
@@ -121,5 +178,5 @@
 swr4=read_ncdf('swr',st4,en4,file=file,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy", box=box,/nan) & swr4=reform(swr4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy", box=box,/nan) & lwr1=reform(lwr1)
@@ -128,5 +185,5 @@
 lwr4=read_ncdf('lwr',st4-1,en4,file=file,/nostr, box=box) & lwr4=grossemoyenne(lwr4, "xy", box=box,/nan) & lwr4=reform(lwr4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -135,5 +192,5 @@
 lhf4=-1*read_ncdf('lhf',st4,en4,file=file,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy", box=box,/nan) & lhf4=reform(lhf4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy", box=box,/nan) & shf1=reform(shf1)
@@ -151,5 +208,5 @@
 net1=0 & net2=0 & net3=0 & net4=0
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -176,5 +233,5 @@
 net3=swr3+lwr3+lhf3+shf3 & net4=swr4+lwr4+lhf4+shf4
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -194,5 +251,5 @@
 net1=0 & net2=0 & net3=0 & net4=0 & neto_1=0 & neto_2=0 & neto_3=0 & neto_4=0
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -201,5 +258,5 @@
 swr4=read_ncdf("swr", st4, en4, file=file,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy",/nan, box=box) & swr4=reform(swr4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -208,5 +265,5 @@
 lwr4=-1*read_ncdf("lwr", st4, en4, file=file,/nostr, box=box) & lwr4=grossemoyenne(lwr4, "xy",/nan, box=box) & lwr4=reform(lwr4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -215,5 +272,5 @@
 lhf4=-1*read_ncdf("lhf", st4, en4, file=file,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy",/nan, box=box) & lhf4=reform(lhf4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -232,5 +289,5 @@
 net1=0 & net2=0 & net3=0 & net4=0
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -239,5 +296,5 @@
 swr4=read_ncdf("swr", st4, en4, file=fi,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy",/nan, box=box) & swr4=reform(swr4)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -246,5 +303,5 @@
 lwr4=-1*read_ncdf("lwr", st4, en4, file=fi,/nostr, box=box) & lwr4=grossemoyenne(lwr4, "xy",/nan, box=box) & lwr4=reform(lwr4)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -253,5 +310,5 @@
 lhf4=-1*read_ncdf("lhf", st4, en4, file=fi,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy",/nan, box=box) & lhf4=reform(lhf4)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -270,6 +327,5 @@
 net1=0 & net2=0 & net3=0 & net4=0
 
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -370,9 +426,7 @@
 xyouts, -150,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig="coare_validation_net_1992_93_all_v11.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"coare_validation_net_1992_93_all_v11.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _stratus_validation_net_2001_2002_all_v10.pro
+; .. _stratus_validation_net_2001_2002_all_v10.pro:
 ;
 ; ============================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph stratus_validation_net_2001_2002_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_stratus_2001_2002.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/stratus_validation_net_2001_2002_all_v11.ps"];
+;
+;       stratus_validation_net_2001_2002_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro"];
+;
+;       {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} -> {stratus_validation_net_2001_2002_all_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +61,19 @@
 ;  IDL> stratus_validation_net_2001_2002_all_v10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +81,9 @@
 ; $Id$
 ;
+; - fplod 20110420T120826Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +92,6 @@
 ;-
 pro stratus_validation_net_2001_2002_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -47,5 +107,5 @@
 ;; first leg
 
-fi="/Users/pkb/data/Mooring_data/stratus/met_data_stratus_2001_2002.txt"
+fi=tropflux_id_env+"met_data_stratus_2001_2002.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -62,14 +122,14 @@
 st1=20011019 & en1=20021022
 
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr=grossemoyenne(swr, "xy", box=box,/nan) & swr=reform(swr)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr=reform(lwr)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf=reform(shf)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf=reform(lhf)
@@ -80,5 +140,5 @@
 swr=0 & lwr=0 & lhf=0 & shf=0
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 swr=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr=grossemoyenne(swr, "xy",/nan, box=box) & swr=reform(swr)
@@ -87,5 +147,5 @@
 lhf=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf=grossemoyenne(lhf, "xy",/nan, box=box) & lhf=reform(lhf)
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -96,17 +156,17 @@
 swr=0 & lwr=0 & lhf=0 & shf=0 & olr1=0
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr=grossemoyenne(swr, "xy",/nan, box=box) & swr=reform(swr)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr=read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr=-1*reform(lwr)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf=read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf=-1*reform(lhf)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf=read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf=-1*reform(shf)
@@ -116,18 +176,18 @@
 swr=0 & lwr=0 & lhf=0 & shf=0
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr=grossemoyenne(swr, "xy",/nan, box=box) & swr=reform(swr)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr=read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr=grossemoyenne(lwr, "xy",/nan, box=box) & lwr=reform(lwr)
 lwr=-1*lwr
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf=read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf=-1*reform(lhf)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf=read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf=-1*reform(shf)
@@ -138,6 +198,5 @@
 swr=0 & lwr=0 & lhf=0 & shf=0
 
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 swr=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr=grossemoyenne(swr, "xy",/nan, box=box) & swr=reform(swr)
@@ -214,9 +273,7 @@
 xyouts, -150,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig="stratus_validation_net_2001_2002_all_v11.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"stratus_validation_net_2001_2002_all_v11.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _subdctn_cs_validation_net_1991_93_all_v10.pro
+; .. _subdctn_cs_validation_net_1991_93_all_v10.pro:
 ;
 ; =============================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph subdctn_cs_validation_net_1991_93_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_subduct_cs_9*.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/subdctn_cs_validation_net_1991_93_all_v10.ps"];
+;
+;       subdctn_cs_validation_net_1991_93_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro"];
+;
+;       {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_cs_validation_net_1991_93_all_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +61,17 @@
 ;  IDL> subdctn_cs_validation_net_1991_93_all_v10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +79,9 @@
 ; $Id$
 ;
+; - fplod 20110420T121121Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +90,6 @@
 ;-
 pro subdctn_cs_validation_net_1991_93_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -46,5 +104,5 @@
 ;; first leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_cs_91.txt"
+fi=tropflux_id_env+"met_data_subduct_cs_91.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -59,5 +117,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_cs_92.txt"
+fi=tropflux_id_env+"met_data_subduct_cs_92.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -70,5 +128,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_cs_93.txt"
+fi=tropflux_id_env+"met_data_subduct_cs_93.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -86,14 +144,14 @@
 st1=19910623 & en1=19930616
 
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy", box=box,/nan) & swr1=reform(swr1)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy", box=box,/nan) & shf1=reform(shf1)
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy", box=box,/nan) & lwr1=reform(lwr1)
@@ -103,5 +161,5 @@
 help, era
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -111,5 +169,5 @@
 trop=swr1+lwr1+lhf1+shf1
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -119,14 +177,14 @@
 swr1=0 & lwr1=0 & shf1=0 & lhf1=0 & olr1=0
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -136,14 +194,14 @@
 swr1=0 & lwr1=0 & shf1=0 & lhf1=0 & olr1=0
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -153,5 +211,5 @@
 swr1=0 & lwr1=0 & shf1=0 & lhf1=0 & olr1=0
 
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 
@@ -228,9 +286,7 @@
 xyouts, 0,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig="subdctn_cs_validation_net_1991_93_all_v10.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"subdctn_cs_validation_net_1991_93_all_v10.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _subdctn_ses_validation_net_1991_93_all_v10.pro
+; .. _subdctn_ses_validation_net_1991_93_all_v10.pro:
 ;
 ; ==============================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph subdctn_ses_validation_net_1991_93_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_subduct_ses_9*.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/subdctn_ses_validation_net_1991_93_all_v10.ps"];
+;
+;       subdctn_ses_validation_net_1991_93_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro"];
+;
+;       {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}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +61,16 @@
 ;  IDL> subdctn_ses_validation_net_1991_93_all_v10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -28,4 +79,9 @@
 ; $Id$
 ;
+; - fplod 20110420T121359Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -34,5 +90,6 @@
 ;-
 pro subdctn_ses_validation_net_1991_93_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -49,5 +106,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_ses_92.txt"
+fi=tropflux_id_env+"met_data_subduct_ses_92.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -61,5 +118,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_ses_93.txt"
+fi=tropflux_id_env+"met_data_subduct_ses_93.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -79,20 +136,20 @@
 st2=19920921 & en2=19930618
 
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy", box=box,/nan) & swr1=reform(swr1)
 swr2=read_ncdf('swr',st2,en2,file=file,/nostr, box=box) & swr2=grossemoyenne(swr2, "xy", box=box,/nan) & swr2=reform(swr2)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
 lhf2=-1*read_ncdf('lhf',st2,en2,file=file,/nostr, box=box) & lhf2=grossemoyenne(lhf2, "xy", box=box,/nan) & lhf2=reform(lhf2)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy", box=box,/nan) & shf1=reform(shf1)
 shf2=-1*read_ncdf('shf',st2,en2,file=file,/nostr, box=box) & shf2=grossemoyenne(shf2, "xy", box=box,/nan) & shf2=reform(shf2)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy", box=box,/nan) & lwr1=reform(lwr1)
@@ -107,5 +164,5 @@
 net1=0. & net2=0.
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -118,5 +175,5 @@
 swr2=read_ncdf('swr',st2,en2,file=file,/nostr, box=box) & swr2=grossemoyenne(swr2, "xy", box=box,/nan) & swr2=reform(swr2)
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -128,20 +185,20 @@
 help, trop, olr
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
 swr2=read_ncdf("swr", st2, en2, file=file,/nostr, box=box) & swr2=grossemoyenne(swr2, "xy",/nan, box=box) & swr2=reform(swr2)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
 lwr2=-1*read_ncdf("lwr", st2, en2, file=file,/nostr, box=box) & lwr2=grossemoyenne(lwr2, "xy",/nan, box=box) & lwr2=reform(lwr2)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
 lhf2=-1*read_ncdf("lhf", st2, en2, file=file,/nostr, box=box) & lhf2=grossemoyenne(lhf2, "xy",/nan, box=box) & lhf2=reform(lhf2)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -152,20 +209,20 @@
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
 swr2=read_ncdf("swr", st2, en2, file=fi,/nostr, box=box) & swr2=grossemoyenne(swr2, "xy",/nan, box=box) & swr2=reform(swr2)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
 lwr2=-1*read_ncdf("lwr", st2, en2, file=fi,/nostr, box=box) & lwr2=grossemoyenne(lwr2, "xy",/nan, box=box) & lwr2=reform(lwr2)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
 lhf2=-1*read_ncdf("lhf", st2, en2, file=fi,/nostr, box=box) & lhf2=grossemoyenne(lhf2, "xy",/nan, box=box) & lhf2=reform(lhf2)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -176,5 +233,5 @@
 help, nce2
 
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -256,9 +313,7 @@
 xyouts, 0,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig="subdctn_ses_validation_net_1991_93_all_v10.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"subdctn_ses_validation_net_1991_93_all_v10.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _subdctn_sws_validation_net_1991_93_all_v10.pro
+; .. _subdctn_sws_validation_net_1991_93_all_v10.pro:
 ;
 ; ==============================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph subdctn_sws_validation_net_1991_93_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_subduct_sws_9*.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/subdctn_sws_validation_net_1991_93_all_v10.ps"];
+;
+;       subdctn_sws_validation_net_1991_93_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro"];
+;
+;       {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_sws_validation_net_1991_93_all_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +61,17 @@
 ;  IDL> subdctn_sws_validation_net_1991_93_all_v10
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +79,9 @@
 ; $Id$
 ;
+; - fplod 20110420T121730Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +90,6 @@
 ;-
 pro subdctn_sws_validation_net_1991_93_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -46,5 +104,5 @@
 ;; first leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_sws_91_v1.txt"
+fi=tropflux_id_env+"met_data_subduct_sws_91_v1.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -59,5 +117,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_sws_92_v1.txt"
+fi=tropflux_id_env+"met_data_subduct_sws_92_v1.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -71,5 +129,5 @@
 ;; second leg
 
-fi="/Users/pkb/data/Mooring_data/subduction_expt_atl/met_data_subduct_sws_93_v1.txt"
+fi=tropflux_id_env+"met_data_subduct_sws_93_v1.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -89,5 +147,5 @@
 st4=19930101 & en4=19930521
 
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy", box=box,/nan) & swr1=reform(swr1)
@@ -96,5 +154,5 @@
 swr4=read_ncdf('swr',st4,en4,file=file,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy", box=box,/nan) & swr4=reform(swr4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -103,5 +161,5 @@
 lhf4=-1*read_ncdf('lhf',st4,en4,file=file,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy", box=box,/nan) & lhf4=reform(lhf4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy", box=box,/nan) & shf1=reform(shf1)
@@ -110,5 +168,5 @@
 shf4=-1*read_ncdf('shf',st4,en4,file=file,/nostr, box=box) & shf4=grossemoyenne(shf4, "xy", box=box,/nan) & shf4=reform(shf4)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy", box=box,/nan) & lwr1=reform(lwr1)
@@ -126,5 +184,5 @@
 help, era
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 lhf1=read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -148,5 +206,5 @@
 swr4=read_ncdf('swr',st4,en4,file=file,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy", box=box,/nan) & swr4=reform(swr4)
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -169,5 +227,5 @@
 help, trop, olr
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -176,5 +234,5 @@
 swr4=read_ncdf("swr", st4, en4, file=file,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy",/nan, box=box) & swr4=reform(swr4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -183,5 +241,5 @@
 lwr4=-1*read_ncdf("lwr", st4, en4, file=file,/nostr, box=box) & lwr4=grossemoyenne(lwr4, "xy",/nan, box=box) & lwr4=reform(lwr4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -190,5 +248,5 @@
 lhf4=-1*read_ncdf("lhf", st4, en4, file=file,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy",/nan, box=box) & lhf4=reform(lhf4)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -209,5 +267,5 @@
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -216,5 +274,5 @@
 swr4=read_ncdf("swr", st4, en4, file=fi,/nostr, box=box) & swr4=grossemoyenne(swr4, "xy",/nan, box=box) & swr4=reform(swr4)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+'"NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -223,5 +281,5 @@
 lwr4=-1*read_ncdf("lwr", st4, en4, file=fi,/nostr, box=box) & lwr4=grossemoyenne(lwr4, "xy",/nan, box=box) & lwr4=reform(lwr4)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -230,5 +288,5 @@
 lhf4=-1*read_ncdf("lhf", st4, en4, file=fi,/nostr, box=box) & lhf4=grossemoyenne(lhf4, "xy",/nan, box=box) & lhf4=reform(lhf4)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -248,5 +306,5 @@
 net1=0. & net2=0. & net3=0. & net4=0
 
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 
@@ -344,9 +402,7 @@
 xyouts, 0,-175, cstat_olr, charsize=1.
 
-stop
 closeps
-fig="subdctn_sws_validation_net_1991_93_all_v10.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"subdctn_sws_validation_net_1991_93_all_v10.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro
===================================================================
--- /trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro	(revision 45)
+++ /trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _whots_validation_net_2004_2007_all_v10.pro
+; .. _whots_validation_net_2004_2007_all_v10.pro:
 ;
 ; ==========================================
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph whots_validation_net_2004_2007_all_v10 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       met_data [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met_data_WHOTS_200?_200?.txt"];
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_swr_19910101_20091231_oafluxgrid.nc"];
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lwr_19910101_20091231_oafluxgrid.nc"];
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19910101_20091231_oafluxgrid.nc"];
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19910101_20091231_oafluxgrid.nc"];
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_tropflux_nrt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_NRT_v50.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2007.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       lhf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ncep1_flux_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
+;
+;       whots_validation_net_2004_2007_all_v10 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro",
+;       label="${TROPFLUX}/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro"];
+;
+;       {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} -> {whots_validation_net_2004_2007_all_v10} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,8 +61,26 @@
 ;  IDL> whots_validation_net_2004_2007_all_v10
 ;
-;  EVOLUTIONS
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
+; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T122057Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -33,5 +90,6 @@
 ;-
 pro whots_validation_net_2004_2007_all_v10
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -47,5 +105,5 @@
 ;; first leg
 
-fi="/Users/pkb/data/Mooring_data/WHOTS/met_data_WHOTS_2004_2005.txt"
+fi=tropflux_id_env+"met_data_WHOTS_2004_2005.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -56,5 +114,5 @@
 net_04=[lhf_04+shf_04+swr_04+lwr_04]
 
-fi="/Users/pkb/data/Mooring_data/WHOTS/met_data_WHOTS_2005_2006.txt"
+fi=tropflux_id_env+"met_data_WHOTS_2005_2006.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -65,5 +123,5 @@
 net_05=[lhf_05+shf_05+swr_05+lwr_05]
 
-fi="/Users/pkb/data/Mooring_data/WHOTS/met_data_WHOTS_2006_2007.txt"
+fi=tropflux_id_env+"met_data_WHOTS_2006_2007.txt"
 res=read_ascii(fi,data_start=1)
 ff=res.field1
@@ -86,5 +144,5 @@
 ;st5=20080605 & en5=20090715
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lhf1=-1*read_ncdf('lhf',st1,en1,file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy", box=box,/nan) & lhf1=reform(lhf1)
@@ -92,5 +150,5 @@
 lhf3=-1*read_ncdf('lhf',st3,en3,file=file,/nostr, box=box) & lhf3=grossemoyenne(lhf3, "xy", box=box,/nan) & lhf3=reform(lhf3)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 shf1=-1*read_ncdf('shf',st1,en1,file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy", box=box,/nan) & shf1=reform(shf1)
@@ -98,5 +156,5 @@
 shf3=-1*read_ncdf('shf',st3,en3,file=file,/nostr, box=box) & shf3=grossemoyenne(shf3, "xy", box=box,/nan) & shf3=reform(shf3)
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lwr_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lwr_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 lwr1=read_ncdf('lwr',st1-1,en1,file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy", box=box,/nan) & lwr1=reform(lwr1)
@@ -104,5 +162,5 @@
 lwr3=read_ncdf('lwr',st3-1,en3,file=file,/nostr, box=box) & lwr3=grossemoyenne(lwr3, "xy", box=box,/nan) & lwr3=reform(lwr3)
 
-file="/Users/pkb/data/ERA-I/erai_swr_19910101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+"erai_swr_19910101_20091231_oafluxgrid.nc"
 initncdf, file
 swr1=read_ncdf('swr',st1,en1,file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy", box=box,/nan) & swr1=reform(swr1)
@@ -119,5 +177,5 @@
 help, era
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 
@@ -138,5 +196,5 @@
 swr3=read_ncdf('swr',st3,en3,file=file,/nostr, box=box) & swr3=grossemoyenne(swr3, "xy", box=box,/nan) & swr3=reform(swr3)
 
-file="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"
+file=tropflux_id_env+"TropFlux_swr_19890101_20091231_NRT_v50.nc"
 initncdf, file
 olr1=read_ncdf("sw", st1-1, en1, file=file,/nostr, box=box) & olr1=grossemoyenne(olr1, "xy",/nan, box=box) & olr1=reform(olr1)
@@ -158,5 +216,5 @@
 help, trop, olr
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 swr1=read_ncdf("swr", st1, en1, file=file,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -164,5 +222,5 @@
 swr3=read_ncdf("swr", st3, en3, file=file,/nostr, box=box) & swr3=grossemoyenne(swr3, "xy",/nan, box=box) & swr3=reform(swr3)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 lwr1=-1*read_ncdf("lwr", st1, en1, file=file,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -170,5 +228,5 @@
 lwr3=-1*read_ncdf("lwr", st3, en3, file=file,/nostr, box=box) & lwr3=grossemoyenne(lwr3, "xy",/nan, box=box) & lwr3=reform(lwr3)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 lhf1=-1*read_ncdf("lhf", st1, en1, file=file,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -176,5 +234,5 @@
 lhf3=-1*read_ncdf("lhf", st3, en3, file=file,/nostr, box=box) & lhf3=grossemoyenne(lhf3, "xy",/nan, box=box) & lhf3=reform(lhf3)
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 shf1=-1*read_ncdf("shf", st1, en1, file=file,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -192,5 +250,5 @@
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 swr1=read_ncdf("swr", st1, en1, file=fi,/nostr, box=box) & swr1=grossemoyenne(swr1, "xy",/nan, box=box) & swr1=reform(swr1)
@@ -198,5 +256,5 @@
 swr3=read_ncdf("swr", st3, en3, file=fi,/nostr, box=box) & swr3=grossemoyenne(swr3, "xy",/nan, box=box) & swr3=reform(swr3)
 
-fi="/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc"
+fi=tropflux_id_env+'NCEP2_flux_19890101_20090729.nc"
 initncdf, fi
 lwr1=-1*read_ncdf("lwr", st1, en1, file=fi,/nostr, box=box) & lwr1=grossemoyenne(lwr1, "xy",/nan, box=box) & lwr1=reform(lwr1)
@@ -204,5 +262,5 @@
 lwr3=-1*read_ncdf("lwr", st3, en3, file=fi,/nostr, box=box) & lwr3=grossemoyenne(lwr3, "xy",/nan, box=box) & lwr3=reform(lwr3)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 lhf1=-1*read_ncdf("lhf", st1, en1, file=fi,/nostr, box=box) & lhf1=grossemoyenne(lhf1, "xy",/nan, box=box) & lhf1=reform(lhf1)
@@ -210,5 +268,5 @@
 lhf3=-1*read_ncdf("lhf", st3, en3, file=fi,/nostr, box=box) & lhf3=grossemoyenne(lhf3, "xy",/nan, box=box) & lhf3=reform(lhf3)
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 shf1=-1*read_ncdf("shf", st1, en1, file=fi,/nostr, box=box) & shf1=grossemoyenne(shf1, "xy",/nan, box=box) & shf1=reform(shf1)
@@ -227,5 +285,5 @@
 net1=0. & net2=0. & net3=0.
 
-file="/Users/pkb/data/heat_budget/ncep/ncep1_flux_19890101_20091231.nc"
+file=tropflux_id_env+"ncep1_flux_19890101_20091231.nc"
 initncdf, file
 
@@ -323,7 +381,6 @@
 
 closeps
-fig="WHOTS_validation_net_2004_2007_all_v10.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"WHOTS_validation_net_2004_2007_all_v10.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig15/fig15_timeseries_mjo.pro
===================================================================
--- /trunk/src/paper01/fig15/fig15_timeseries_mjo.pro	(revision 45)
+++ /trunk/src/paper01/fig15/fig15_timeseries_mjo.pro	(revision 46)
@@ -6,12 +6,40 @@
 ; ========================
 ;
-;
 ; DESCRIPTION
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph fig15_timeseries_mjo {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       tropflux_general [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;       erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc"];
+;       ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2008.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2008.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       olr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/olr_oafluxgrid_30n30s_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
+;
+;       fig15_timeseries_mjo [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig15/fig15_timeseries_mjo.pro",
+;       label="${TROPFLUX}/src/paper01/fig15/fig15_timeseries_mjo.pro"];
+;
+;       {tropflux_general swr_oafluxgrid lwr_oafluxgrid lhf_oafluxgrid shf_oafluxgrid ncep2 ncep1} -> {fig15_timeseries_mjo} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
 ;
 ; EXAMPLES
@@ -23,4 +51,17 @@
 ;  IDL> fig15_timeseries_mjo
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -28,4 +69,10 @@
 ; $Id$
 ;
+; - fplod 20110420T122720Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -34,6 +81,6 @@
 ;-
 pro fig15_timeseries_mjo
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,5 +91,5 @@
 box=[50,80,-12,-5]
 
-file_trop='/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc'
+file_trop=tropflux_id_env+'TropFlux_19890101_20091231.nc'
 initncdf, file_trop
 shf_trop=read_ncdf("shf", date1, date2, box=box, file=file_trop,/nostr)
@@ -54,5 +101,5 @@
 trop=grossemoyenne(trop, "xy",/nan)
 
-file_ncep='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc'
+file_ncep=tropflux_id_env+'NCEP2_flux_19890101_20090729.nc'
 initncdf, file_ncep
 shf=read_ncdf("shf", date1, date2, box=box, file=file_ncep,/nostr)
@@ -65,5 +112,5 @@
 help, nce2
 
-file_erai='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
+file_erai=tropflux_id_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
 initncdf, file_erai
 shf=read_ncdf("shf", date1, date2, box=box, file=file_erai,/nostr)
@@ -75,5 +122,5 @@
 help, era
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 lwr=read_ncdf("lwr", date1, date2, box=box, file=file,/nostr)
@@ -86,14 +133,14 @@
 help, nce
 
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2008.nc'
+file_oaf=tropflux_id_env+'shf_oafluxgrid_1985_2008.nc'
 initncdf, file_oaf
 shf=read_ncdf("shf", date1, date2, box=box, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2008.nc'
+file_oaf=tropflux_id_env+'lhf_oafluxgrid_1985_2008.nc'
 initncdf, file_oaf
 lhf=read_ncdf("lhf", date1, date2, box=box, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file_oaf=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file_oaf
 lwr=read_ncdf("lwr", date1, date2, box=box, file=file_oaf,/nostr)
-file_oaf='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file_oaf=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file_oaf
 swr=read_ncdf("swr", date1, date2, box=box, file=file_oaf,/nostr) & swr_trop=swr
@@ -102,5 +149,5 @@
 oafl=grossemoyenne(oafl, "xy",/nan)
 
-file="/Users/pkb/data/heat_budget/NOAA_OLR/olr_oafluxgrid_30n30s_19890101_20091231.nc"
+file=tropflux_id_env+"olr_oafluxgrid_30n30s_19890101_20091231.nc"
 initncdf, file
 olr=read_ncdf("olr", date1-1, date2, box=box, file=file,/nostr)
@@ -161,48 +208,6 @@
 
 closeps
-fig='fig15_timeseries_mjo.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'fig15_timeseries_mjo.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig16/fig16_timeseries_nino3.pro
===================================================================
--- /trunk/src/paper01/fig16/fig16_timeseries_nino3.pro	(revision 45)
+++ /trunk/src/paper01/fig16/fig16_timeseries_nino3.pro	(revision 46)
@@ -9,8 +9,32 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph fig16_timeseries_nino3 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       tropflux_sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_sst_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
+;
+;       fig16_timeseries_nino3 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig16/fig16_timeseries_nino3.pro",
+;       label="${TROPFLUX}/src/paper01/fig16/fig16_timeseries_nino3.pro"];
+;
+;       {tropflux_sst} -> {fig16_timeseries_nino3} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
 ;
 ; EXAMPLES
@@ -22,4 +46,17 @@
 ;  IDL> fig16_timeseries_nino3
 ;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +64,10 @@
 ; $Id$
 ;
+; - fplod 20110420T123110Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,6 +76,6 @@
 ;-
 pro fig16_timeseries_nino3
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -42,5 +85,5 @@
 box=[240,330,-5,5]
 
-file_trop='/Users/pkb/data/TropFlux/TropFlux_sst_19890101_20091231.nc'
+file_trop=tropflux_id_env+'TropFlux_sst_19890101_20091231.nc'
 initncdf, file_trop
 sst=read_ncdf("sst", date1, date2, box=box, file=file_trop,/nostr)
@@ -157,46 +200,6 @@
 
 closeps
-fig='fig16_timeseries_nino3.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'fig16_timeseries_nino3.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig2/fig2_timeline_diagram.pro
===================================================================
--- /trunk/src/paper01/fig2/fig2_timeline_diagram.pro	(revision 45)
+++ /trunk/src/paper01/fig2/fig2_timeline_diagram.pro	(revision 46)
@@ -55,7 +55,7 @@
 ;
 ; make it work on cratos ::
-;    % Error: 
+;    % Error:
 ;    % the vector size (7670) is incompatible
-;    % with the domain dimensions 
+;    % with the domain dimensions
 ;    % [jpi/nx, jpj/ny, jpk/nz, jpt] = [1/1, 1/1, 1/1, 1]
 ;
@@ -149,6 +149,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 
 for n=0, nn-1 do begin
Index: /trunk/src/paper01/fig2/read_lw.pro
===================================================================
--- /trunk/src/paper01/fig2/read_lw.pro	(revision 45)
+++ /trunk/src/paper01/fig2/read_lw.pro	(revision 46)
@@ -77,6 +77,4 @@
 @cm_tropflux
 
-dir='/Users/pkb/data/TPR/'
-;
 ;; DEFINE THE OUTPUT TIME AXIS
 ;
Index: /trunk/src/paper01/fig2/read_sw.pro
===================================================================
--- /trunk/src/paper01/fig2/read_sw.pro	(revision 45)
+++ /trunk/src/paper01/fig2/read_sw.pro	(revision 46)
@@ -53,5 +53,5 @@
 ; ====
 ;
-; make it work with a file 
+; make it work with a file
 ;
 ;
@@ -106,5 +106,5 @@
     sw_q(tt0(ind))=sw_q0(ind)
   endif
-endif else begin 
+endif else begin
   print, fi, ' not found'
 endelse
Index: /trunk/src/paper01/fig2/time_lec.pro
===================================================================
--- /trunk/src/paper01/fig2/time_lec.pro	(revision 45)
+++ /trunk/src/paper01/fig2/time_lec.pro	(revision 46)
@@ -1,11 +1,11 @@
 ;+
-; 
+;
 ; ============
 ; time_lec.pro
 ; ============
-; 
+;
 ; .. function:: time_lec(fi)
 ;
-;     :param fi: file 
+;     :param fi: file
 ;
 ; EXAMPLES
Index: /trunk/src/paper01/fig2/x_site_location.pro
===================================================================
--- /trunk/src/paper01/fig2/x_site_location.pro	(revision 45)
+++ /trunk/src/paper01/fig2/x_site_location.pro	(revision 46)
@@ -10,10 +10,11 @@
 ; ===========
 ;
-;     :param site: ++
+;    :param site: ++
+;
 ; EXAMPLES
 ; ========
 ;
 ; ::
-; 
+;
 ;   IDL> site=++
 ;   IDL> result=x_site_location(site)
@@ -22,5 +23,22 @@
 ; ========
 ;
+; :func:`y_site_location`
+;
+; :ref:`fig1_no_obs_map.pro`
+; :ref:`net_flux_validation_scatter_2000_2007.pro`
+; :ref:`fig16_timeseries_nino3.pro`
 ; :ref:`fig2_timeline_diagram.pro`
+; :ref:`air_validation_scatter_2000_2009_v50.pro`
+; :ref:`q2m_validation_scatter_2000_2009_v50.pro`
+; :ref:`sst_validation_scatter_2000_2009_v50.pro`
+; :ref:`ws_validation_scatter_2000_2009_v50.pro`
+; :ref:`air_validation_scatter_2000_2009_basin.pro`
+; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
+; :ref:`sst_validation_scatter_2000_2009_basin.pro`
+; :ref:`ws_validation_scatter_2000_2009_basin.pro`
+; :ref:`lhf_validation_scatter_2000_2009.pro`
+; :ref:`shf_validation_scatter_2000_2009.pro`
+; :ref:`lwr_validation_scatter_2000_2007.pro`
+; :ref:`swr_validation_scatter_2000_2007.pro`
 ;
 ; TODO
@@ -28,5 +46,5 @@
 ;
 ; coding rules
-; 
+;
 ; EVOLUTIONS
 ; ==========
@@ -35,5 +53,5 @@
 ;
 ; - fplod 20110412T083358Z aedon.locean-ipsl.upmc.fr (Darwin)
-; 
+;
 ;   * creation from fig2_timeline_diagram.pro
 ;
Index: /trunk/src/paper01/fig2/y_site_location.pro
===================================================================
--- /trunk/src/paper01/fig2/y_site_location.pro	(revision 45)
+++ /trunk/src/paper01/fig2/y_site_location.pro	(revision 46)
@@ -10,5 +10,5 @@
 ; ===========
 ;
-;     :param site: ++
+;    :param site: ++
 ;
 ; EXAMPLES
@@ -16,5 +16,5 @@
 ;
 ; ::
-; 
+;
 ;   IDL> site=++
 ;   IDL> result=y_site_location(site)
@@ -23,5 +23,22 @@
 ; ========
 ;
+; :func:`x_site_location`
+;
+; :ref:`fig1_no_obs_map.pro`
+; :ref:`net_flux_validation_scatter_2000_2007.pro`
+; :ref:`fig16_timeseries_nino3.pro`
 ; :ref:`fig2_timeline_diagram.pro`
+; :ref:`air_validation_scatter_2000_2009_v50.pro`
+; :ref:`q2m_validation_scatter_2000_2009_v50.pro`
+; :ref:`sst_validation_scatter_2000_2009_v50.pro`
+; :ref:`ws_validation_scatter_2000_2009_v50.pro`
+; :ref:`air_validation_scatter_2000_2009_basin.pro`
+; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
+; :ref:`sst_validation_scatter_2000_2009_basin.pro`
+; :ref:`ws_validation_scatter_2000_2009_basin.pro`
+; :ref:`lhf_validation_scatter_2000_2009.pro`
+; :ref:`shf_validation_scatter_2000_2009.pro`
+; :ref:`lwr_validation_scatter_2000_2007.pro`
+; :ref:`swr_validation_scatter_2000_2007.pro`
 ;
 ; TODO
@@ -29,5 +46,5 @@
 ;
 ; coding rules
-; 
+;
 ; EVOLUTIONS
 ; ==========
@@ -36,5 +53,5 @@
 ;
 ; - fplod 20110412T083358Z aedon.locean-ipsl.upmc.fr (Darwin)
-; 
+;
 ;   * creation from fig2_timeline_diagram.pro
 ;
Index: /trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro
===================================================================
--- /trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro	(revision 45)
+++ /trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro	(revision 46)
@@ -19,9 +19,9 @@
 ;       air_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_erai_v50.txt"];
 ;
-;       air_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_trop_v50.txt"];
-;       air_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_oaflx_v50.txt"];
+;       air_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_trop_v50.txt"];
+;       air_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_oaflx_v50.txt"];
 ;       air_ncep  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep_v50.txt"];
-;       air_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep1_v50.txt"];
-;       air_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep2_v50.txt"];
+;       air_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_ncep1_v50.txt"];
+;       air_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_ncep2_v50.txt"];
 ;       air_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2m_ncep2_oafluxgrid_19890101_20091231.nc"];
 ;
@@ -32,5 +32,5 @@
 ;
 ;       tropflux_t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_t2m_19890101_20091231_v50.nc"];
-;     
+;
 ;       oaflux_basic [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/OAFlux_basic_variables_1985_2009.nc"];
 ;
@@ -41,5 +41,5 @@
 ;       label="${TROPFLUX}/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro"];
 ;
-;       {air_erai air_trop air_oaflux air_ncep air_ncep1 air_ncep2 erai_t2m tropflux_t2m oaflux_basic air_ncep2_oafluxgrid t2m_ncep1} -> {air_validation_scatter_2000_2009_v50} -> {figure}
+;       {air_erai air_ncep erai_t2m tropflux_t2m oaflux_basic air_ncep2_oafluxgrid t2m_ncep1} -> {air_validation_scatter_2000_2009_v50} -> { air_trop air_oaflux air_ncep1 air_ncep2 figure}
 ;
 ;    }
@@ -49,6 +49,12 @@
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
 ;
 ; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -102,8 +108,4 @@
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
@@ -152,5 +154,4 @@
 help, unc
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_t2m_19890101_20091231_v3.nc'
 file=tropflux_id_env+'TropFlux_t2m_19890101_20091231_v50.nc'
 initncdf, file
@@ -176,6 +177,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
Index: /trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro
===================================================================
--- /trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro	(revision 45)
+++ /trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro	(revision 46)
@@ -19,8 +19,8 @@
 ;       q2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_erai_v50.txt"];
 ;
-;       q2m_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_trop_v50.txt"];
-;       q2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_oaflx_v50.txt"];
-;       q2m_ncep  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_ncep_v50.txt"];
-;       q2m_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_ncep1_v50.txt"];
+;       q2m_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_trop_v50.txt"];
+;       q2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_oaflx_v50.txt"];
+;       q2m_ncep  [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_ncep_v50.txt"];
+;       q2m_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_ncep1_v50.txt"];
 ;
 ;       erai_q2m_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc"];
@@ -40,5 +40,5 @@
 ;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_validation_scatter_2000_2009_v50.ps"];
 ;
-;       {q2m_erai q2m_trop q2m_oaflux q2m_ncep q2m_ncep1 erai_q2m_oafluxgrid tropflux_q2m oaflux_basic sphum_ncep2_oafluxgrid} -> {q2m_validation_scatter_2000_2009_v50} -> {figure}
+;       {q2m_erai erai_q2m_oafluxgrid tropflux_q2m oaflux_basic sphum_ncep2_oafluxgrid} -> {q2m_validation_scatter_2000_2009_v50} -> {q2m_trop q2m_oaflux q2m_ncep q2m_ncep1 figure}
 ;
 ;     }
@@ -48,4 +48,12 @@
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -99,8 +107,4 @@
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
@@ -165,5 +169,5 @@
 help, nce
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/q2m_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+''q2m_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=read_ncdf("q2m", date1, date2, file=file,/nostr)
@@ -172,6 +176,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -241,5 +243,5 @@
 close,/all
 
-fi_q2m_erai='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_erai_v50.txt'
+fi_q2m_erai=tropflux_id_env+'q2m_2000_2009_erai_v50.txt'
 res=read_ascii(fi_q2m_erai,data_start=1)
 ff=res.field1
@@ -267,5 +269,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_trop='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_trop_v50.txt'
+fi_q2m_trop=tropflux_id_env+'q2m_2000_2009_trop_v50.txt'
 res=read_ascii(fi_q2m_trop,data_start=1)
 ff=res.field1
@@ -294,5 +296,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_oaflx_v50.txt'
+fi_q2m_oaflx=tropflux_id_env+'q2m_2000_2009_oaflx_v50.txt'
 res=read_ascii(fi_q2m_oaflx,data_start=1)
 ff=res.field1
@@ -322,5 +324,5 @@
 
 
-fi_q2m_ncep='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep_v50.txt'
+fi_q2m_ncep=tropflux_id_env+'q2m_2000_2009_ncep_v50.txt'
 res=read_ascii(fi_q2m_ncep,data_start=1)
 ff=res.field1
@@ -349,5 +351,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep1_v50.txt'
+fi_q2m_ncep1=tropflux_id_env+'q2m_2000_2009_ncep1_v50.txt'
 res=read_ascii(fi_q2m_ncep1,data_start=1)
 ff=res.field1
Index: /trunk/src/paper01/fig3/read_variables_v2.pro
===================================================================
--- /trunk/src/paper01/fig3/read_variables_v2.pro	(revision 45)
+++ /trunk/src/paper01/fig3/read_variables_v2.pro	(revision 46)
@@ -48,4 +48,10 @@
 ; :ref:`sst_validation_scatter_2000_2009_v50.pro`
 ; :ref:`ws_validation_scatter_2000_2009_v50.pro`
+; :ref:`air_validation_scatter_2000_2009_basin.pro`
+; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
+; :ref:`sst_validation_scatter_2000_2009_basin.pro`
+; :ref:`ws_validation_scatter_2000_2009_basin.pro`
+; :ref:`lhf_validation_scatter_2000_2009.pro`
+; :ref:`shf_validation_scatter_2000_2009.pro`
 ;
 ; EXAMPLES
@@ -61,5 +67,5 @@
 ; TODO
 ; ====
-; 
+;
 ; externalize function
 ;
Index: /trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro
===================================================================
--- /trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro	(revision 45)
+++ /trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro	(revision 46)
@@ -9,8 +9,47 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph sst_validation_scatter_2000_2009_v50 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;
+;       sst_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_2000_2009_erai_v50.txt"];
+;       sst_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_trop_v50.txt"];
+;       sst_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_oaflx_v50.txt"];
+;       sst_tmi [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_tmi_v50.txt"];
+;       sst_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep_v50.txt"];
+;       sst_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep1_v50.txt"];
+;       sst_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_sst_19890101_20091231_oafluxgrid.nc"];
+;       sst_tropflux_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_sst_19890101_20091231_v20.nc"];
+;       oaflux_basic [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/OAFlux_basic_variables_1985_2009.nc"];
+;       sst_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_NCEP2_global_monthly_1989_2009.nc"];
+;       sst_tmi_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/tmi_OI_oafluxgrid_30N30S.nc"];
+;       sst_ncep1_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_ncep1_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/WHOTS_validation_net_2004_2007_all_v10.ps"];
+;
+;       sst_validation_scatter_2000_2009_v50 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro",
+;       label="${TROPFLUX}/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro"];
+;
+;       {sst_erai sst_erai_oafluxgrid sst_tropflux_2 oaflux_basic sst_ncep2 sst_tmi_2 sst_ncep1_2} -> {sst_validation_scatter_2000_2009_v50} -> {sst_tropflux sst_oaflux sst_tmi sst_ncep sst_ncep figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +59,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> sst_validation_scatter_2000_2009_v50, date1, date2
+;
+; TODO
+; ====
+;
+; ++ plus de licences sur cratos
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +83,10 @@
 ; $Id$
 ;
+; - fplod 20110420T131533Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,14 +95,10 @@
 ;-
 pro sst_validation_scatter_2000_2009_v50, date1, date2
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
@@ -66,15 +122,15 @@
 close,/all
 
-fi_sst_erai='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_erai_v50.txt'
+fi_sst_erai=tropflux_id_env+'sst_2000_2009_erai_v50.txt'
 openw,1,fi_sst_erai
-fi_sst_trop='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_trop_v50.txt'
+fi_sst_trop=tropflux_id_env+'sst_2000_2009_trop_v50.txt'
 openw,2,fi_sst_trop
-fi_sst_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_oaflx_v50.txt'
+fi_sst_oaflx=tropflux_id_env+'sst_2000_2009_oaflx_v50.txt'
 openw,3,fi_sst_oaflx
-fi_sst_ncep='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep_v50.txt'
+fi_sst_ncep=tropflux_id_env+'sst_2000_2009_ncep_v50.txt'
 openw,4,fi_sst_ncep
-fi_sst_tmi='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_tmi_v50.txt'
+fi_sst_tmi=tropflux_id_env+'sst_2000_2009_tmi_v50.txt'
 openw,5,fi_sst_tmi
-fi_sst_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep1_v50.txt'
+fi_sst_ncep1=tropflux_id_env+'sst_2000_2009_ncep1_v50.txt'
 openw,6,fi_sst_ncep1
 
@@ -90,20 +146,20 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_sst_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_sst_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('sst',date1,date2,file=file,/nostr) & unc=unc-273.15
 help, unc
 
-file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231_v20.nc'
+file=tropflux_id_env+'TropFlux_sst_19890101_20091231_v20.nc'
 initncdf, file
 cor=read_ncdf('sst',date1,date2,file=file,/nostr) & cor=cor-273.15
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
+file=tropflux_id_env+'OAFlux_basic_variables_1985_2009.nc'
 initncdf, file
 oaf=read_ncdf("sst", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/sst_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'sst_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 nce=read_ncdf("sst", date1-1, date2, file=fi,/nostr)
@@ -111,10 +167,10 @@
 help, nce
 
-fi='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/tmi_OI_oafluxgrid_30N30S.nc'
+fi=tropflux_id_env+'tmi_OI_oafluxgrid_30N30S.nc'
 initncdf, fi
 sst_tmi=read_ncdf("sst", date1, date2, file=fi,/nostr)
 help, sst_tmi
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/sst_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'sst_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=read_ncdf("sst", date1, date2, file=file,/nostr)
@@ -123,6 +179,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -196,5 +250,5 @@
 close,/all
 
-fi_sst_erai='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_erai.txt'
+fi_sst_erai=tropflux_id_env+'sst_2000_2009_v50_erai.txt'
 res=read_ascii(fi_sst_erai,data_start=1)
 ff=res.field1
@@ -222,5 +276,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_trop='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_trop.txt'
+fi_sst_trop=tropflux_id_env+'sst_2000_2009_v50_trop.txt'
 res=read_ascii(fi_sst_trop,data_start=1)
 ff=res.field1
@@ -249,5 +303,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_oaflx.txt'
+fi_sst_oaflx=tropflux_id_env+'sst_2000_2009_v50_oaflx.txt'
 res=read_ascii(fi_sst_oaflx,data_start=1)
 ff=res.field1
@@ -278,5 +332,5 @@
 
 
-fi_sst_ncep='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_ncep.txt'
+fi_sst_ncep=tropflux_id_env+'sst_2000_2009_v50_ncep.txt'
 res=read_ascii(fi_sst_ncep,data_start=1)
 ff=res.field1
@@ -306,5 +360,5 @@
 
 
-fi_sst_tmi='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_tmi.txt'
+fi_sst_tmi=tropflux_id_env+'sst_2000_2009_v50_tmi.txt'
 res=read_ascii(fi_sst_tmi,data_start=1)
 ff=res.field1
@@ -333,5 +387,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_v50_ncep1.txt'
+fi_sst_ncep1=tropflux_id_env+'sst_2000_2009_v50_ncep1.txt'
 res=read_ascii(fi_sst_ncep1,data_start=1)
 ff=res.field1
@@ -365,43 +419,3 @@
 spawn, 'mv '+psdir+'idl.ps '+fig
 spawn, 'gv '+fig
-return
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig3/statistics_3var_v1.pro
===================================================================
--- /trunk/src/paper01/fig3/statistics_3var_v1.pro	(revision 45)
+++ /trunk/src/paper01/fig3/statistics_3var_v1.pro	(revision 46)
@@ -13,4 +13,18 @@
 ;
 ; :ref:`tropflux_profile.sh`
+;
+; :ref:`net_flux_validation_scatter_2000_2007.pro`
+; :ref:`air_validation_scatter_2000_2009_v50.pro`
+; :ref:`q2m_validation_scatter_2000_2009_v50.pro`
+; :ref:`sst_validation_scatter_2000_2009_v50.pro`
+; :ref:`ws_validation_scatter_2000_2009_v50.pro`
+; :ref:`air_validation_scatter_2000_2009_basin.pro`
+; :ref:`q2m_validation_scatter_2000_2009_basin.pro`
+; :ref:`sst_validation_scatter_2000_2009_basin.pro`
+; :ref:`ws_validation_scatter_2000_2009_basin.pro`
+; :ref:`lhf_validation_scatter_2000_2009.pro`
+; :ref:`shf_validation_scatter_2000_2009.pro`
+; :ref:`lwr_validation_scatter_2000_2007.pro`
+; :ref:`swr_validation_scatter_2000_2007.pro`
 ;
 ; EXAMPLES
@@ -34,11 +48,8 @@
 ;
 ;-
-
-
 pro statistics_3var_v1, tao,var1,var2, $
     cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2
 
-
-@common
+@cm_tropflux
 x=tao & y=var1 & z=var2
 
Index: /trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro
===================================================================
--- /trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro	(revision 45)
+++ /trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro	(revision 46)
@@ -9,8 +9,46 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph ws_validation_scatter_2000_2009_v50 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;
+;       ws_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_2000_2009_erai_v50.txt"];
+;       ws_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_trop_v50.txt"];
+;       ws_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_oaflx_v50.txt"];
+;       ws_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_ncep_v50.txt"];
+;       ws_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_ncep1_v50.txt"];
+;       ws_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_ws_19890101_20091231_oafluxgrid.nc"];
+;       ws_tropflux_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_ws_19890101_20091231_v20.nc"];
+;       oaflux_basic [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/OAFlux_basic_variables_1985_2009.nc"];
+;       uwind_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/uwind_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       vwind_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/bwind_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       ws_tmi [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/zonal_wind_speed_oafluxgrid_30N30S.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_validation_scatter_2000_2009_v50.ps"];
+;
+;       ws_validation_scatter_2000_2009_v50 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro",
+;       label="${TROPFLUX}/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro"];
+;
+;       {ws_erai ws_erai_oafluxgrid ws_tropflux_2 oaflux_basic ws_ncep2 ws_tmi_2 ws_ncep1_2} -> {ws_validation_scatter_2000_2009_v50} -> {ws_tropflux ws_oaflux ws_tmi ws_ncep ws_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +58,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> ws_validation_scatter_2000_2009_v50, date1, date2
+;
+; TODO
+; ====
+;
+; ++ plus de licences sur cratos
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ;
@@ -30,4 +83,10 @@
 ; $Id$
 ;
+; - fplod 20110420T132401Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,15 +94,11 @@
 ;
 ;-
-pro ws_validation_scatter_2000_2009_v50,date1,date2
-@common
-
+pro ws_validation_scatter_2000_2009_v50, date1, date2
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
@@ -68,15 +123,15 @@
 close,/all
 
-fi_ws_erai='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_erai_v50.txt'
+fi_ws_erai=tropflux_id_env+'ws_2000_2009_erai_v50.txt'
 openw,1,fi_ws_erai
-fi_ws_trop='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_trop_v50.txt'
+fi_ws_trop=tropflux_id_env+'ws_2000_2009_trop_v50.txt'
 openw,2,fi_ws_trop
-fi_ws_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_oaflx_v50.txt'
+fi_ws_oaflx=tropflux_id_env+'ws_2000_2009_oaflx_v50.txt'
 openw,3,fi_ws_oaflx
-fi_ws_ncep='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep_v50.txt'
+fi_ws_ncep=tropflux_id_env+'ws_2000_2009_ncep_v50.txt'
 openw,4,fi_ws_ncep
-fi_ws_tmi='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_tmi_v50.txt'
+fi_ws_tmi=tropflux_id_env+'ws_2000_2009_tmi_v50.txt'
 openw,5,fi_ws_tmi
-fi_ws_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep1_v50.txt'
+fi_ws_ncep1=tropflux_id_env+'ws_2000_2009_ncep1_v50.txt'
 openw,6,fi_ws_ncep1
 
@@ -91,5 +146,5 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_ws_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 u=read_ncdf('u10',date1,date2,file=file,/nostr)
@@ -98,18 +153,18 @@
 help, unc
 
-file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_ws_19890101_20091231_v20.nc'
+file=tropflux_id_env+'TropFlux_ws_19890101_20091231_v20.nc'
 initncdf, file
 cor=read_ncdf('ws',date1,date2,file=file,/nostr)
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
+file=tropflux_id_env+'OAFlux_basic_variables_1985_2009.nc'
 initncdf, file
 oaf=read_ncdf("wind", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/uwind_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'uwind_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 u=read_ncdf("u", date1-1, date2, file=fi,/nostr)
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/vwind_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'vwind_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 v=read_ncdf("v", date1-1, date2, file=fi,/nostr)
@@ -126,5 +181,5 @@
 help, ws_tmi
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/wind_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'wind_ncep1_19890101_20091231.nc'
 initncdf, file
 u=read_ncdf("u", date1, date2, file=file,/nostr)
@@ -134,6 +189,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -201,5 +254,5 @@
 endfor
 close,/all
-fi_ws_erai='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_erai_v50.txt'
+fi_ws_erai=tropflux_id_env+'ws_2000_2009_erai_v50.txt'
 res=read_ascii(fi_ws_erai,data_start=1)
 ff=res.field1
@@ -227,5 +280,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_trop='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_trop_v50.txt'
+fi_ws_trop=tropflux_id_env+'ws_2000_2009_trop_v50.txt'
 res=read_ascii(fi_ws_trop,data_start=1)
 ff=res.field1
@@ -254,5 +307,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_oaflx_v50.txt'
+fi_ws_oaflx=tropflux_id_env+'ws_2000_2009_oaflx_v50.txt'
 res=read_ascii(fi_ws_oaflx,data_start=1)
 ff=res.field1
@@ -283,5 +336,5 @@
 
 
-fi_ws_ncep='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep_v50.txt'
+fi_ws_ncep=tropflux_id_env+'ws_2000_2009_ncep_v50.txt'
 res=read_ascii(fi_ws_ncep,data_start=1)
 ff=res.field1
@@ -310,5 +363,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_tmi='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_tmi_v50.txt'
+fi_ws_tmi=tropflux_id_env+'ws_2000_2009_tmi_v50.txt'
 res=read_ascii(fi_ws_tmi,data_start=1)
 ff=res.field1
@@ -338,5 +391,5 @@
 
 
-fi_ws_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep1_v50.txt'
+fi_ws_ncep1=tropflux_id_env+'ws_2000_2009_ncep1_v50.txt'
 res=read_ascii(fi_ws_ncep1,data_start=1)
 ff=res.field1
@@ -370,43 +423,3 @@
 spawn, 'mv '+psdir+'idl.ps '+fig
 spawn, 'gv '+fig
-return
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro
===================================================================
--- /trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro	(revision 45)
+++ /trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _fig4_met_var_correction_scatter.pro
+; .. _fig4_met_var_correction_scatter.pro:
 ;
 ; ===================================
@@ -9,8 +9,33 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph fig4_met_var_correction_scatter {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_correction_final.txt"];
+;       t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_correction_final.txt"];
+;       q2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_correction_final.txt"];
+;       ws  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_correction_final.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig4_met_var_correction_scatter.ps"];
+;
+;       fig4_met_var_correction_scatter [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro",
+;       label="${TROPFLUX}/src/paper01/fig4/fig4_met_var_correction_scatter.pro"];
+;
+;       {sst t2m q2m ws} -> {fig4_met_var_correction_scatter} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+;
+; :ref:`significance_test_99.pro`
 ;
 ; EXAMPLES
@@ -22,8 +47,25 @@
 ;  IDL> fig4_met_var_correction_scatter
 ;
+; TODO
+; ====
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T085113Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * make it work on cratos
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -32,12 +74,12 @@
 ;
 ;-
-
 pro fig4_met_var_correction_scatter
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-fi='/Users/pkb/work/MY_SAXO/flux_automat/sst_correction_final.txt'
+fi=tropflux_id_env+'sst_correction_final.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -66,5 +108,5 @@
 significance_test_99,mean,bias
 
-fi='/Users/pkb/work/MY_SAXO/flux_automat/t2m_correction_final.txt'
+fi=tropflux_id_env+'t2m_correction_final.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -94,5 +136,5 @@
 significance_test_99,mean,bias
 
-fi='/Users/pkb/work/MY_SAXO/flux_automat/q2m_correction_final.txt'
+fi=tropflux_id_env+'q2m_correction_final.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -120,5 +162,5 @@
 ;; significant test
 significance_test_99,mean,bias
-fi='/Users/pkb/work/MY_SAXO/flux_automat/ws_correction_final.txt'
+fi=tropflux_id_env+'ws_correction_final.txt'
 res=read_ascii(fi,data_start=0)
 ff=res.field1
@@ -150,7 +192,7 @@
 closeps
 
-fig='fig4_met_var_correction_scatter.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
+fig=tropflux_od_env+'fig4_met_var_correction_scatter.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 
 end
Index: /trunk/src/paper01/fig4/significance_test_99.pro
===================================================================
--- /trunk/src/paper01/fig4/significance_test_99.pro	(revision 45)
+++ /trunk/src/paper01/fig4/significance_test_99.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _significance_test_99.pro
+; .. _significance_test_99.pro:
 ;
 ; ========================
@@ -14,4 +14,7 @@
 ; :ref:`tropflux_profile.sh`
 ;
+; :ref:`fig10_swr_correction.pro`
+; :ref:`fig4_met_var_correction_scatter.pro`
+;
 ; EXAMPLES
 ; ========
@@ -24,4 +27,13 @@
 ;  IDL> sig_value=++
 ;  IDL> significance_test_99, x, y, sig_value
+;
+; TODO
+; ====
+;
+; coding rules
+;
+; complete description
+;
+; complete example
 ;
 ; EVOLUTIONS
Index: /trunk/src/paper01/fig5/fig5_gustiness_scatter.pro
===================================================================
--- /trunk/src/paper01/fig5/fig5_gustiness_scatter.pro	(revision 45)
+++ /trunk/src/paper01/fig5/fig5_gustiness_scatter.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _fig5_gustiness_scatter.pro
+; .. _fig5_gustiness_scatter.pro:
 ;
 ; ==========================
@@ -6,7 +6,26 @@
 ; ==========================
 ;
-; ;
 ; DESCRIPTION
 ; ===========
+;
+; .. graphviz::
+;
+;    digraph fig5_gustiness_scatter {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       ws  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_gustiness_bias.txt"];
+;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/raw_sst_2000_2008_gustiness.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig5_gustiness_scatter.ps"];
+;
+;       fig5_gustiness_scatter [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig5/fig5_gustiness_scatter.pro",
+;       label="${TROPFLUX}/src/paper01/fig5/fig5_gustiness_scatter.pro"];
+;
+;       {ws sst} -> {fig5_gustiness_scatter} -> {figure}
+;    }
 ;
 ; SEE ALSO
@@ -14,4 +33,5 @@
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
 ;
 ; EXAMPLES
@@ -23,8 +43,25 @@
 ;  IDL> fig5_gustiness_scatter
 ;
+; TODO
+; ====
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
 ;
 ; $Id$
+;
+; - fplod 20110420T090057Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * make it work on cratos
+;   * remove hard coding path
+;   * add graphviz
 ;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -34,10 +71,11 @@
 ;-
 pro fig5_gustiness_scatter
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-fi_ws='/Users/pkb/work/MY_SAXO/flux_automat/wind_gustiness_bias.txt'
+fi_ws=tropflux_id_env+'wind_gustiness_bias.txt'
 res=read_ascii(fi_ws,data_start=1)
 ff=res.field01
@@ -47,5 +85,5 @@
 print, correlate(erai_wind,gust)
 
-fi_sst='/Users/pkb/work/MY_SAXO/flux_automat/raw_sst_2000_2008_gustiness.txt'
+fi_sst=tropflux_id_env+'raw_sst_2000_2008_gustiness.txt'
 res=read_ascii(fi_sst,data_start=1)
 ff=res.field1
@@ -76,6 +114,6 @@
 print, a,b
 closeps
-fig='fig5_gustiness_scatter.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
+fig=tropflux_od_env+'fig5_gustiness_scatter.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro
===================================================================
--- /trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro	(revision 45)
+++ /trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _icoads_q2m_stats_paper.pro
+; .. _icoads_q2m_stats_paper.pro:
 ;
 ; ==========================
@@ -9,8 +9,35 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph icoads_q2m_stats_paper {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       sphum [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sphum_monthly_1960_2010_oafluxgrid.nc"];
+;       q2m_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_TropFlux_global_monthly_1989_2009.nc"];
+;       q2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_OAFlux_global_monthly_1989_2009.nc"];
+;       q2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_ERAI_global_monthly_1989_2009.nc"];
+;       q2m_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_NCEP2_global_monthly_1989_2009.nc"];
+;       q2m_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_NCEP1_global_monthly_1989_2009.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/icoads_q2m_stats_paper.ps"];
+;
+;       icoads_q2m_stats_paper [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro",
+;       label="${TROPFLUX}/src/paper01/fig6/icoads_q2m_stats_paper.pro"];
+;
+;       {sphum q2m_tropflux q2m_oaflux q2m_erai q2m_ncep2 q2m_ncep1} -> {icoads_q2m_stats_paper} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +49,17 @@
 ;  IDL> icoads_q2m_stats_paper
 ;
+; TODO
+; ====
+;
+; make it work (missing data)
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +67,9 @@
 ; $Id$
 ;
+; - fplod 20110420T090949Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +78,6 @@
 ;-
 pro icoads_q2m_stats_paper
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,31 +90,30 @@
 domdef, box
 
-file="/Volumes/Sanathana/ICOADS/Median/sphum_monthly_1960_2010_oafluxgrid.nc"
+file=tropflux_id_env+'sphum_monthly_1960_2010_oafluxgrid.nc'
 initncdf, file
 icoads=read_ncdf("sphum", st, en , file=file,/nostr, box=box)
 help, icoads
 
-dir="/Volumes/Sanathana/monthly_met_var/"
-file=dir+"q2m_TropFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+'q2m_TropFlux_global_monthly_1989_2009.nc'
 initncdf, file
 trop=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
 help, trop
 
-file=dir+"q2m_OAFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"q2m_OAFlux_global_monthly_1989_2009.nc"
 initncdf, file
 oaf=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
 help, oaf
 
-file=dir+"q2m_ERAI_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"q2m_ERAI_global_monthly_1989_2009.nc"
 initncdf, file
 erai=read_ncdf("q2m", st, en , file=file,/nostr, box=box)
 help, erai
 
-file=dir+"q2m_NCEP2_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"q2m_NCEP2_global_monthly_1989_2009.nc"
 initncdf, file
 ncep2=1000*read_ncdf("q2m", st, en , file=file,/nostr, box=box)
 help, ncep2
 
-file=dir+"q2m_NCEP1_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"q2m_NCEP1_global_monthly_1989_2009.nc"
 initncdf, file
 ncep1=1000*read_ncdf("q2m", st, en , file=file,/nostr, box=box)
@@ -209,7 +254,7 @@
 
 closeps
-fig="icoads_q2m_stats_paper.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
+fig=tropflux_od_env+"icoads_q2m_stats_paper.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 return
 end
Index: /trunk/src/paper01/fig6/icoads_sst_stats_paper.pro
===================================================================
--- /trunk/src/paper01/fig6/icoads_sst_stats_paper.pro	(revision 45)
+++ /trunk/src/paper01/fig6/icoads_sst_stats_paper.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _icoads_sst_stats_paper.pro
+; .. _icoads_sst_stats_paper.pro:
 ;
 ; ==========================
@@ -9,8 +9,36 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph icoads_sst_stats_paper {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       sst [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_monthly_1960_2010_oafluxgrid.nc"];
+;       sst_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_TropFlux_global_monthly_1989_2009.nc"];
+;       sst_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_OAFlux_global_monthly_1989_2009.nc"];
+;       sst_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_ERAI_global_monthly_1989_2009.nc"];
+;       sst_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_NCEP2_global_monthly_1989_2009.nc"];
+;       sst_noc [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/nocv2_sst_19890101_20091231_oafluxgrid.nc"];
+;       sst_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_NCEP1_global_monthly_1989_2009.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/icoads_sst_stats_paper.ps"];
+;
+;       icoads_sst_stats_paper [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_sst_stats_paper.pro",
+;       label="${TROPFLUX}/src/paper01/fig6/icoads_sst_stats_paper.pro"];
+;
+;       {sst sst_tropflux sst_oaflux sst_erai sst_ncep2 sst_noc sst_ncep1} -> {icoads_sst_stats_paper} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +50,17 @@
 ;  IDL> icoads_sst_stats_paper
 ;
+; TODO
+; ====
+;
+; make it work (missing data)
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +68,9 @@
 ; $Id$
 ;
+; - fplod 20110420T091734Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +79,5 @@
 ;-
 pro icoads_sst_stats_paper
-@common
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,36 +90,35 @@
 domdef, box
 
-file="/Volumes/Sanathana/ICOADS/Median/sst_monthly_1960_2010_oafluxgrid.nc"
+file=tropflux_id_env+'sst_monthly_1960_2010_oafluxgrid.nc'
 initncdf, file
 icoads=read_ncdf("sst", st-1, en , file=file,/nostr, box=box)
 help, icoads
 
-dir="/Volumes/Sanathana/monthly_met_var/"
-file=dir+"sst_TropFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+'sst_TropFlux_global_monthly_1989_2009.nc'
 initncdf, file
 trop=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
 help, trop
 
-file=dir+"sst_OAFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"sst_OAFlux_global_monthly_1989_2009.nc"
 initncdf, file
 oaf=read_ncdf("sst", st, en , file=file,/nostr, box=box)
 help, oaf
 
-file=dir+"sst_ERAI_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"sst_ERAI_global_monthly_1989_2009.nc"
 initncdf, file
 erai=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
 help, erai
 
-file=dir+"sst_NCEP2_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"sst_NCEP2_global_monthly_1989_2009.nc"
 initncdf, file
 ncep2=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
 help, ncep2
 
-file="/Volumes/Sanathana/NOC_v2/oaflux_grid/nocv2_sst_19890101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+'nocv2_sst_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 noc=read_ncdf("sst", st, en , file=file,/nostr, box=box)
 help, noc
 
-file=dir+"sst_NCEP1_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"sst_NCEP1_global_monthly_1989_2009.nc"
 initncdf, file
 ncep1=read_ncdf("sst", st, en , file=file,/nostr, box=box)-273.15
@@ -236,6 +281,6 @@
 
 closeps
-fig="icoads_sst_stats_paper.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"icoads_sst_stats_paper.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
+end
Index: /trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro
===================================================================
--- /trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro	(revision 45)
+++ /trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _icoads_t2m_stats_paper.pro
+; .. _icoads_t2m_stats_paper.pro:
 ;
 ; ==========================
@@ -9,8 +9,35 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph icoads_t2m_stats_paper {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       airt [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/airt_monthly_1960_2010_oafluxgrid.nc"];
+;       t2m_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_TropFlux_global_monthly_1989_2009.nc"];
+;       t2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_OAFlux_global_monthly_1989_2009.nc"];
+;       t2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_ERAI_global_monthly_1989_2009.nc"];
+;       t2m_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_NCEP2_global_monthly_1989_2009.nc"];
+;       t2m_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_NCEP1_global_monthly_1989_2009.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/icoads_t2m_stats_paper.ps"];
+;
+;       icoads_t2m_stats_paper [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro",
+;       label="${TROPFLUX}/src/paper01/fig6/icoads_t2m_stats_paper.pro"];
+;
+;       {airt t2m_tropflux t2m_oaflux t2m_erai t2m_ncep2 t2m_ncep1} -> {icoads_t2m_stats_paper} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +49,18 @@
 ;  IDL> icoads_t2m_stats_paper
 ;
+;
+; TODO
+; ====
+;
+; make it work (missing data)
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +68,9 @@
 ; $Id$
 ;
+; - fplod 20110420T092151Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +79,6 @@
 ;-
 pro icoads_t2m_stats_paper
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,31 +91,30 @@
 domdef, box
 
-file="/Volumes/Sanathana/ICOADS/Median/airt_monthly_1960_2010_oafluxgrid.nc"
+file=tropflux_id_env+'airt_monthly_1960_2010_oafluxgrid.nc'
 initncdf, file
 icoads=read_ncdf("airt", st-1, en , file=file,/nostr, box=box)
 help, icoads
 
-dir="/Volumes/Sanathana/monthly_met_var/"
-file=dir+"t2m_TropFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+'t2m_TropFlux_global_monthly_1989_2009.nc'
 initncdf, file
 trop=read_ncdf("t2m", st, en , file=file,/nostr, box=box)-273.15
 help, trop
 
-file=dir+"t2m_OAFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"t2m_OAFlux_global_monthly_1989_2009.nc"
 initncdf, file
 oaf=read_ncdf("t2m", st, en , file=file,/nostr, box=box)
 help, oaf
 
-file=dir+"t2m_ERAI_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"t2m_ERAI_global_monthly_1989_2009.nc"
 initncdf, file
 erai=read_ncdf("t2m", st, en , file=file,/nostr, box=box)-273.15
 help, erai
 
-file=dir+"t2m_NCEP2_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"t2m_NCEP2_global_monthly_1989_2009.nc"
 initncdf, file
 ncep2=read_ncdf("t2m", st, en , file=file,/nostr, box=box)-273.15
 help, ncep2
 
-file=dir+"t2m_NCEP1_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"t2m_NCEP1_global_monthly_1989_2009.nc"
 initncdf, file
 ncep1=read_ncdf("t2m", st, en , file=file,/nostr, box=box)-273.15
@@ -217,7 +263,6 @@
 
 closeps
-fig="icoads_t2m_stats_paper.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"icoads_t2m_stats_paper.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig6/icoads_ws_stats_paper.pro
===================================================================
--- /trunk/src/paper01/fig6/icoads_ws_stats_paper.pro	(revision 45)
+++ /trunk/src/paper01/fig6/icoads_ws_stats_paper.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _icoads_ws_stats_paper.pro
+; .. _icoads_ws_stats_paper.pro:
 ;
 ; =========================
@@ -9,8 +9,36 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph icoads_ws_stats_paper {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       ws [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_monthly_1960_2010_oafluxgrid.nc"];
+;       ws_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_TropFlux_global_monthly_1989_2009.nc"];
+;       ws_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_OAFlux_global_monthly_1989_2009.nc"];
+;       ws_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_ERAI_global_monthly_1989_2009.nc"];
+;       ws_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_NCEP2_global_monthly_1989_2009.nc"];
+;       ws_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_NCEP1_global_monthly_1989_2009.nc"];
+;       ws_noc [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/nocv2_ws_19890101_20091231_oafluxgrid.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/icoads_ws_stats_paper.ps"];
+;
+;       icoads_ws_stats_paper [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig6/icoads_ws_stats_paper.pro",
+;       label="${TROPFLUX}/src/paper01/fig6/icoads_ws_stats_paper.pro"];
+;
+;       {ws ws_tropflux ws_oaflux ws_erai ws_ncep2 ws_ncep1 ws_noc} -> {icoads_ws_stats_paper} -> {figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+;
+; :ref:`statistics.pro`
 ;
 ; EXAMPLES
@@ -22,4 +50,18 @@
 ;  IDL> icoads_ws_stats_paper
 ;
+;
+; TODO
+; ====
+;
+; make it work (missing data)
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
+;
 ; EVOLUTIONS
 ; ==========
@@ -27,4 +69,9 @@
 ; $Id$
 ;
+; - fplod 20110420T092454Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -33,5 +80,6 @@
 ;-
 pro icoads_ws_stats_paper
-@common
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -44,36 +92,35 @@
 domdef, box
 
-file="/Volumes/Sanathana/ICOADS/Median/ws_monthly_1960_2010_oafluxgrid.nc"
+file=tropflux_id_env+'ws_monthly_1960_2010_oafluxgrid.nc"
 initncdf, file
 icoads=read_ncdf("ws", st-1, en , file=file,/nostr, box=box)
 help, icoads
 
-dir="/Volumes/Sanathana/monthly_met_var/"
-file=dir+"ws_TropFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"ws_TropFlux_global_monthly_1989_2009.nc"
 initncdf, file
 trop=read_ncdf("ws", st, en , file=file,/nostr, box=box)
 help, trop
 
-file=dir+"ws_OAFlux_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"ws_OAFlux_global_monthly_1989_2009.nc"
 initncdf, file
 oaf=read_ncdf("ws", st, en , file=file,/nostr, box=box)
 help, oaf
 
-file=dir+"ws_ERAI_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"ws_ERAI_global_monthly_1989_2009.nc"
 initncdf, file
 erai=read_ncdf("ws", st, en , file=file,/nostr, box=box)
 help, erai
 
-file=dir+"ws_NCEP2_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"ws_NCEP2_global_monthly_1989_2009.nc"
 initncdf, file
 ncep2=read_ncdf("wsm", st, en , file=file,/nostr, box=box)
 help, ncep2
 
-file=dir+"ws_NCEP1_global_monthly_1989_2009.nc"
+file=tropflux_id_env+"ws_NCEP1_global_monthly_1989_2009.nc"
 initncdf, file
 ncep1=read_ncdf("ws", st, en , file=file,/nostr, box=box)
 help, ncep1
 
-file="/Volumes/Sanathana/NOC_v2/oaflux_grid/nocv2_ws_19890101_20091231_oafluxgrid.nc"
+file=tropflux_id_env+'nocv2_ws_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 noc=read_ncdf("ws", st, en , file=file,/nostr, box=box)
@@ -233,7 +280,6 @@
 
 closeps
-fig="icoads_ws_stats_paper.ps"
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+"icoads_ws_stats_paper.ps"
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
Index: /trunk/src/paper01/fig6/statistics.pro
===================================================================
--- /trunk/src/paper01/fig6/statistics.pro	(revision 45)
+++ /trunk/src/paper01/fig6/statistics.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _statistics.pro
+; .. _statistics.pro:
 ;
 ; ==============
@@ -14,4 +14,16 @@
 ; :ref:`tropflux_profile.sh`
 ;
+; :ref:`as_validation_net_1994_95_v10.pro`
+; :ref:`coare_validation_net_1992_93_all_v10.pro`
+; :ref:`stratus_validation_net_2001_2002_all_v10.pro`
+; :ref:`subdctn_cs_validation_net_1991_93_all_v10.pro`
+; :ref:`subdctn_ses_validation_net_1991_93_all_v10.pro`
+; :ref:`subdctn_sws_validation_net_1991_93_all_v10.pro`
+; :ref:`whots_validation_net_2004_2007_all_v10.pro`
+; :ref:`icoads_q2m_stats_paper.pro`
+; :ref:`icoads_sst_stats_paper.pro`
+; :ref:`icoads_t2m_stats_paper.pro`
+; :ref:`icoads_ws_stats_paper.pro`
+;
 ; EXAMPLES
 ; ========
@@ -23,4 +35,13 @@
 ;  IDL> ++
 ;  IDL> statistics, moor, erai, cor, bias, std, rmsd
+;
+; TODO
+; ====
+;
+; coding rules
+;
+; complete description
+;
+; complete example
 ;
 ; EVOLUTIONS
@@ -37,5 +58,5 @@
 pro statistics, moor, erai, $
    cor, bias, std, rmsd
-@common
+@cm_tropflux
 ;; mean1= mean of mooring variable      std1=std of mooring variable
 ;; mean2= mean of erai variable         std2=std of erai variable
Index: /trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro
===================================================================
--- /trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro	(revision 45)
+++ /trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro	(revision 46)
@@ -1,15 +1,48 @@
 ;+
-; .. _air_validation_scatter_2000_2009.pro
-;
-; ====================================
-; air_validation_scatter_2000_2009.pro
-; ====================================
+; .. _air_validation_scatter_2000_2009_basin.pro:
+;
+; ==========================================
+; air_validation_scatter_2000_2009_basin.pro
+; ==========================================
+;
 ; DESCRIPTION
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph air_validation_scatter_2000_2009_basin {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       air_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_erai_*.txt"];
+;       air_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_trop_*.txt"];
+;       air_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_oaflx_*.txt"];
+;       air_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_ncep2_*.txt"];
+;       air_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_2000_2009_ncep1_*.txt"];
+;       t2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_validation_scatter_2000_2009_basin.ps"];
+;
+;       air_validation_scatter_2000_2009_basin [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broairer/trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro",
+;       label="${TROPFLUX}/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro"];
+;
+;       {air_tropflux t2m_erai} -> {air_validation_scatter_2000_2009_basin} -> {air_oaflux air_erai air_ncep2 air_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -19,10 +52,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> .r read_era_total
-;  IDL> .r read_variables_v2
-;  IDL> .r read_era_box
-;  IDL> date1=++
-;  IDL> date2=++
-;  IDL> air_validation_scatter_2000_2009, date1, date2
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
+;  IDL> air_validation_scatter_2000_2009_basin, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : pb restore
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -31,4 +76,11 @@
 ; $Id$
 ;
+; - fplod 20110420T093206Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;   * change name of procedure according to filename
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -36,7 +88,7 @@
 ;
 ;-
-pro air_validation_scatter_2000_2009,date1,date2
-@common
-
+pro air_validation_scatter_2000_2009_basin, date1, date2
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
@@ -98,13 +150,13 @@
 close,/all
 
-fi_air_erai='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_erai_'+ocean+'.txt'
+fi_air_erai=tropflux_id_env+'air_2000_2009_erai_'+ocean+'.txt'
 openw,1,fi_air_erai
-fi_air_trop='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_trop_'+ocean+'.txt'
+fi_air_trop=tropflux_id_env+'air_2000_2009_trop_'+ocean+'.txt'
 openw,2,fi_air_trop
-fi_air_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_oaflx_'+ocean+'.txt'
+fi_air_oaflx=tropflux_id_env+'air_2000_2009_oaflx_'+ocean+'.txt'
 openw,3,fi_air_oaflx
-fi_air_ncep2='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep2_'+ocean+'.txt'
+fi_air_ncep2=tropflux_id_env+'air_2000_2009_ncep2_'+ocean+'.txt'
 openw,4,fi_air_ncep2
-fi_air_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep1_'+ocean+'.txt'
+fi_air_ncep1=tropflux_id_env+'air_2000_2009_ncep1_'+ocean+'.txt'
 openw,5,fi_air_ncep1
 
@@ -118,32 +170,9 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_t2m_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('t2m',date1,date2,file=file,/nostr) & unc=unc-273.15
 help, unc
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_t2m_19890101_20091231_v3.nc'
-;file="/Users/pkb/data/TropFlux/TropFlux_t2m_19890101_20091231_v50.nc"
-;initncdf, file
-;cor=read_ncdf('t2m',date1,date2,file=file,/nostr) & cor=cor-273.15
-;help, cor
-
-;file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
-;initncdf, file
-;oaf=read_ncdf("air", date1, date2, file=file,/nostr)
-;help, oaf
-
-;fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/air_2m_ncep2_oafluxgrid_19890101_20091231.nc'
-;initncdf, fi
-;nce=read_ncdf("air", date1-1, date2, file=fi,/nostr)
-;nce=nce-273.15
-;help, nce
-
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/t2m_ncep1_19890101_20091231.nc'
-;initncdf, file
-;nce1=read_ncdf("t2m", date1, date2, file=file,/nostr)
-;nce1=nce1-273.15
-;help, nce1
-
 ;save, unc, cor, oaf, nce, nce1, filename="airt_unc_cor_oaf_nce_nce1_2000_2009_global.idl"
 restore, file="/Users/pkb/work/MY_SAXO/airt_unc_cor_oaf_nce_nce1_2000_2009_global.idl"
@@ -151,6 +180,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -221,5 +248,5 @@
 close,/all
 
-fi_air_erai='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_erai_'+ocean+'.txt'
+fi_air_erai=tropflux_id_env+'air_2000_2009_erai_'+ocean+'.txt'
 res=read_ascii(fi_air_erai,data_start=1)
 ff=res.field1
@@ -247,5 +274,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_air_trop='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_trop_'+ocean+'.txt'
+fi_air_trop=tropflux_id_env+'air_2000_2009_trop_'+ocean+'.txt'
 res=read_ascii(fi_air_trop,data_start=1)
 ff=res.field1
@@ -274,5 +301,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_air_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_oaflx_'+ocean+'.txt'
+fi_air_oaflx=tropflux_id_env+'air_2000_2009_oaflx_'+ocean+'.txt'
 res=read_ascii(fi_air_oaflx,data_start=1)
 ff=res.field1
@@ -303,5 +330,5 @@
 
 
-fi_air_ncep='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep2_'+ocean+'.txt'
+fi_air_ncep=tropflux_id_env+'air_2000_2009_ncep2_'+ocean+'.txt'
 res=read_ascii(fi_air_ncep,data_start=1)
 ff=res.field1
@@ -330,5 +357,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_air_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep1_'+ocean+'.txt'
+fi_air_ncep1=tropflux_id_env+'air_2000_2009_ncep1_'+ocean+'.txt'
 res=read_ascii(fi_air_ncep1,data_start=1)
 ff=res.field1
@@ -359,46 +386,6 @@
 closeps
 
-fig='air_validation_scatter_2000_2009_'+ocean+'.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'air_validation_scatter_2000_2009_'+ocean+'.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro
===================================================================
--- /trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro	(revision 45)
+++ /trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _q2m_validation_scatter_2000_2009_basin.pro
+; .. _q2m_validation_scatter_2000_2009_basin.pro:
 ;
 ; ==========================================
@@ -9,8 +9,40 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph q2m_validation_scatter_2000_2009_basin {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       q2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_erai_*.txt"];
+;       q2m_erai_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_q2m_19890101_20091231_oafluxgrid.nc"];
+;       q2m_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_trop_*.txt"];
+;       q2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_oaflx_*.txt"];
+;       q2m_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_ncep_*.txt"];
+;       q2m_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_2000_2009_ncep1_*.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_validation_scatter_2000_2009_basin.ps"];
+;
+;       q2m_validation_scatter_2000_2009_basin [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broq2mer/trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro",
+;       label="${TROPFLUX}/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro"];
+;
+;       {q2m_erai q2m_erai_2} -> {q2m_validation_scatter_2000_2009_basin} -> {q2m_tropflux q2m_oafluxq2m_ncep q2m_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +52,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> q2m_validation_scatter_2000_2009_basin, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : pb restore
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +76,10 @@
 ; $Id$
 ;
+; - fplod 20110420T101050Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -36,18 +89,12 @@
 
 pro q2m_validation_scatter_2000_2009_basin, date1, date2
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
-
-
 sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $
            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $
@@ -101,13 +148,13 @@
 close,/all
 
-fi_q2m_erai='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_erai_'+ocean+'.txt'
+fi_q2m_erai=tropflux_id_env+'q2m_2000_2009_erai_'+ocean+'.txt'
 openw,1,fi_q2m_erai
-fi_q2m_trop='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_trop_'+ocean+'.txt'
+fi_q2m_trop=tropflux_id_env+'q2m_2000_2009_trop_'+ocean+'.txt'
 openw,2,fi_q2m_trop
-fi_q2m_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_oaflx_'+ocean+'.txt'
+fi_q2m_oaflx=tropflux_id_env+'q2m_2000_2009_oaflx_'+ocean+'.txt'
 openw,3,fi_q2m_oaflx
-fi_q2m_ncep='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep_'+ocean+'.txt'
+fi_q2m_ncep=tropflux_id_env+'q2m_2000_2009_ncep_'+ocean+'.txt'
 openw,4,fi_q2m_ncep
-fi_q2m_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep1_'+ocean+'.txt'
+fi_q2m_ncep1=tropflux_id_env+'q2m_2000_2009_ncep1_'+ocean+'.txt'
 openw,5,fi_q2m_ncep1
 
@@ -121,31 +168,9 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_q2m_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_q2m_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('q2m',date1,date2,file=file,/nostr)
 help, unc
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_q2m_19890101_20091231_v20.nc'
-;initncdf, file
-;cor=read_ncdf('q2m',date1,date2,file=file,/nostr)
-;help, cor
-
-;file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
-;initncdf, file
-;oaf=read_ncdf("sphum", date1, date2, file=file,/nostr)
-;help, oaf
-
-;fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/sphum_ncep2_oafluxgrid_19890101_20091231.nc'
-;initncdf, fi
-;nce=read_ncdf("shum", date1-1, date2, file=fi,/nostr)
-;nce=nce*1000
-;help, nce
-
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/q2m_ncep1_19890101_20091231.nc'
-;initncdf, file
-;nce1=read_ncdf("q2m", date1, date2, file=file,/nostr)
-;nce1=nce1*1000
-;help, nce1
-
 ;save, unc, cor, oaf, nce, nce1, filename="q2m_era_trop_oaf_nce_nce1_2000_2009_global.idl"
 restore, file="/Users/pkb/work/MY_SAXO/q2m_era_trop_oaf_nce_nce1_2000_2009_global.idl"
@@ -153,6 +178,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -222,5 +245,5 @@
 close,/all
 
-fi_q2m_erai='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_erai_'+ocean+'.txt'
+fi_q2m_erai=tropflux_id_env+'q2m_2000_2009_erai_'+ocean+'.txt'
 res=read_ascii(fi_q2m_erai,data_start=1)
 ff=res.field1
@@ -248,5 +271,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_trop='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_trop_'+ocean+'.txt'
+fi_q2m_trop=tropflux_id_env+'q2m_2000_2009_trop_'+ocean+'.txt'
 res=read_ascii(fi_q2m_trop,data_start=1)
 ff=res.field1
@@ -275,5 +298,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_oaflx_'+ocean+'.txt'
+fi_q2m_oaflx=tropflux_id_env+'q2m_2000_2009_oaflx_'+ocean+'.txt'
 res=read_ascii(fi_q2m_oaflx,data_start=1)
 ff=res.field1
@@ -303,5 +326,5 @@
 
 
-fi_q2m_ncep='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep_'+ocean+'.txt'
+fi_q2m_ncep=tropflux_id_env+'q2m_2000_2009_ncep_'+ocean+'.txt'
 res=read_ascii(fi_q2m_ncep,data_start=1)
 ff=res.field1
@@ -330,5 +353,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_q2m_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep1_'+ocean+'.txt'
+fi_q2m_ncep1=tropflux_id_env+'q2m_2000_2009_ncep1_'+ocean+'.txt'
 res=read_ascii(fi_q2m_ncep1,data_start=1)
 ff=res.field1
@@ -359,46 +382,6 @@
 closeps
 
-fig='q2m_validation_scatter_2000_2009_'+ocean+'.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'q2m_validation_scatter_2000_2009_'+ocean+'.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro
===================================================================
--- /trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro	(revision 45)
+++ /trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _sst_validation_scatter_2000_2009_basin.pro
+; .. _sst_validation_scatter_2000_2009_basin.pro:
 ;
 ; ==========================================
@@ -9,8 +9,40 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph sst_validation_scatter_2000_2009_basin {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       sst_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_2000_2009_erai_*.txt"];
+;       sst_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_trop_*.txt"];
+;       sst_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_oaflx_*.txt"];
+;       sst_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep_*.txt"];
+;       sst_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep1_*.txt"];
+;       sst_tmi [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_tmi_*.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_validation_scatter_2000_2009_basin.ps"];
+;
+;       sst_validation_scatter_2000_2009_basin [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/brosster/trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro",
+;       label="${TROPFLUX}/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro"];
+;
+;       {sst_erai} -> {sst_validation_scatter_2000_2009_basin} -> {sst_tropflux sst_oaflux sst_ncep sst_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,8 +52,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> sst_validation_scatter_2000_2009_basin, date1, date2
 ;
+; TODO
+; ====
+;
+; make it work on cratos : pb restore
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -30,4 +76,10 @@
 ; $Id$
 ;
+; - fplod 20110420T101535Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,19 +87,13 @@
 ;
 ;-
-pro sst_validation_scatter_2000_2009_basin,date1,date2
-@common
-
+pro sst_validation_scatter_2000_2009_basin, date1, date2
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
 
 ;; Give the location of mooring for validation of basic meteorological variables
-
-
 sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $
            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $
@@ -80,15 +126,15 @@
 close,/all
 
-fi_sst_erai='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_erai_'+ocean+'.txt'
+fi_sst_erai=tropflux_id_env+'sst_2000_2009_erai_'+ocean+'.txt'
 openw,1,fi_sst_erai
-fi_sst_trop='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_trop_'+ocean+'.txt'
+fi_sst_trop=tropflux_id_env+'sst_2000_2009_trop_'+ocean+'.txt'
 openw,2,fi_sst_trop
-fi_sst_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_oaflx_'+ocean+'.txt'
+fi_sst_oaflx=tropflux_id_env+'sst_2000_2009_oaflx_'+ocean+'.txt'
 openw,3,fi_sst_oaflx
-fi_sst_ncep='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep_'+ocean+'.txt'
+fi_sst_ncep=tropflux_id_env+'sst_2000_2009_ncep_'+ocean+'.txt'
 openw,4,fi_sst_ncep
-fi_sst_tmi='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_tmi_'+ocean+'.txt'
+fi_sst_tmi=tropflux_id_env+'sst_2000_2009_tmi_'+ocean+'.txt'
 openw,5,fi_sst_tmi
-fi_sst_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep1_'+ocean+'.txt'
+fi_sst_ncep1=tropflux_id_env+'sst_2000_2009_ncep1_'+ocean+'.txt'
 openw,6,fi_sst_ncep1
 
@@ -104,36 +150,4 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_sst_19890101_20091231_oafluxgrid.nc'
-;initncdf, file
-;unc=read_ncdf('sst',date1,date2,file=file,/nostr) & unc=unc-273.15
-;help, unc
-
-;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231_v20.nc'
-;initncdf, file
-;cor=read_ncdf('sst',date1,date2,file=file,/nostr) & cor=cor-273.15
-;help, cor
-
-;file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
-;initncdf, file
-;oaf=read_ncdf("sst", date1, date2, file=file,/nostr)
-;help, oaf
-
-;fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/sst_ncep2_oafluxgrid_19890101_20091231.nc'
-;initncdf, fi
-;nce=read_ncdf("sst", date1-1, date2, file=fi,/nostr)
-;nce=nce-273.15
-;help, nce
-
-;fi='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/tmi_OI_oafluxgrid_30N30S.nc'
-;initncdf, fi
-;sst_tmi=read_ncdf("sst", date1, date2, file=fi,/nostr)
-;help, sst_tmi
-
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/sst_ncep1_19890101_20091231.nc'
-;initncdf, file
-;nce1=read_ncdf("sst", date1, date2, file=file,/nostr)
-;nce1=nce1-273.15
-;help, nce1
-
 ;save, unc, cor, oaf, nce, sst_tmi, nce1, filename="sst_era_trop_oaf_nce_tmi_2000_2009_global.idl"
 ;; full data from 2000-2009 period are read first, and hence the above lines are commented
@@ -143,6 +157,4 @@
 ;; data from 20000101, 20090931
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -216,5 +228,5 @@
 close,/all
 
-fi_sst_erai='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_erai_'+ocean+'.txt'
+fi_sst_erai=tropflux_id_env+'sst_2000_2009_erai_'+ocean+'.txt'
 res=read_ascii(fi_sst_erai,data_start=1)
 ff=res.field1
@@ -242,5 +254,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_trop='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_trop_'+ocean+'.txt'
+fi_sst_trop=tropflux_id_env+'sst_2000_2009_trop_'+ocean+'.txt'
 res=read_ascii(fi_sst_trop,data_start=1)
 ff=res.field1
@@ -269,5 +281,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_oaflx_'+ocean+'.txt'
+fi_sst_oaflx=tropflux_id_env+'sst_2000_2009_oaflx_'+ocean+'.txt'
 res=read_ascii(fi_sst_oaflx,data_start=1)
 ff=res.field1
@@ -298,5 +310,5 @@
 
 
-fi_sst_ncep='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep_'+ocean+'.txt'
+fi_sst_ncep=tropflux_id_env+'sst_2000_2009_ncep_'+ocean+'.txt'
 res=read_ascii(fi_sst_ncep,data_start=1)
 ff=res.field1
@@ -326,5 +338,5 @@
 
 
-fi_sst_tmi='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_tmi_'+ocean+'.txt'
+fi_sst_tmi=tropflux_id_env+'sst_2000_2009_tmi_'+ocean+'.txt'
 res=read_ascii(fi_sst_tmi,data_start=1)
 ff=res.field1
@@ -353,5 +365,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_sst_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/sst_2000_2009_ncep1_'+ocean+'.txt'
+fi_sst_ncep1=tropflux_id_env+'sst_2000_2009_ncep1_'+ocean+'.txt'
 res=read_ascii(fi_sst_ncep1,data_start=1)
 ff=res.field1
@@ -382,46 +394,6 @@
 closeps
 
-fig='sst_validation_scatter_2000_2009_'+ocean+'.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'sst_validation_scatter_2000_2009_'+ocean+'.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro
===================================================================
--- /trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro	(revision 45)
+++ /trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro	(revision 46)
@@ -1,5 +1,5 @@
 ;+
 ;
-; .. _ws_validation_scatter_2000_2009_basin.pro
+; .. _ws_validation_scatter_2000_2009_basin.pro:
 ;
 ; =========================================
@@ -10,8 +10,40 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph ws_validation_scatter_2000_2009_basin {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       ws_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/ws_2000_2009_erai_*.txt"];
+;       ws_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_trop_*.txt"];
+;       ws_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_oaflx_*.txt"];
+;       ws_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_ncep_*.txt"];
+;       ws_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_ncep1_*.txt"];
+;       ws_tmi [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_2000_2009_tmi_*.txt"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/ws_validation_scatter_2000_2009_basin.ps"];
+;
+;       ws_validation_scatter_2000_2009_basin [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro",
+;       label="${TROPFLUX}/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro"];
+;
+;       {ws_erai} -> {ws_validation_scatter_2000_2009_basin} -> {ws_tropflux ws_oaflux ws_ncep ws_ncep1 ws_tmi figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -21,7 +53,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> ws_validation_scatter_2000_2009_basin, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : pb restore, missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -36,15 +83,10 @@
 ;-
 pro ws_validation_scatter_2000_2009_basin,date1,date2
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_era_total
-;;   2.  .r read_variables_v2
-;;   3.  .r read_era_box
-
 ;; Give the location of mooring for validation of basic meteorological variables
 
@@ -101,15 +143,15 @@
 close,/all
 
-fi_ws_erai='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_erai_'+ocean+'.txt'
+fi_ws_erai=tropflux_id_env+'ws_2000_2009_erai_'+ocean+'.txt'
 openw,1,fi_ws_erai
-fi_ws_trop='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_trop_'+ocean+'.txt'
+fi_ws_trop=tropflux_id_env+'ws_2000_2009_trop_'+ocean+'.txt'
 openw,2,fi_ws_trop
-fi_ws_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_oaflx_'+ocean+'.txt'
+fi_ws_oaflx=tropflux_id_env+'ws_2000_2009_oaflx_'+ocean+'.txt'
 openw,3,fi_ws_oaflx
-fi_ws_ncep='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep_'+ocean+'.txt'
+fi_ws_ncep=tropflux_id_env+'ws_2000_2009_ncep_'+ocean+'.txt'
 openw,4,fi_ws_ncep
-fi_ws_tmi='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_tmi_'+ocean+'.txt'
+fi_ws_tmi=tropflux_id_env+'ws_2000_2009_tmi_'+ocean+'.txt'
 openw,5,fi_ws_tmi
-fi_ws_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep1_'+ocean+'.txt'
+fi_ws_ncep1=tropflux_id_env+'ws_2000_2009_ncep1_'+ocean+'.txt'
 openw,6,fi_ws_ncep1
 
@@ -125,5 +167,5 @@
 ;; date1=20000101 & date2=20090931
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_ws_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 u=read_ncdf('u10',date1,date2,file=file,/nostr)
@@ -132,40 +174,4 @@
 ;help, unc
 
-;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_ws_19890101_20091231_v20.nc'
-;initncdf, file
-;cor=read_ncdf('ws',date1,date2,file=file,/nostr)
-;help, cor
-
-;file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc'
-;initncdf, file
-;oaf=read_ncdf("wind", date1, date2, file=file,/nostr)
-;help, oaf
-
-;fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/uwind_ncep2_oafluxgrid_19890101_20091231.nc'
-;initncdf, fi
-;u=read_ncdf("u", date1-1, date2, file=fi,/nostr)
-;fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/vwind_ncep2_oafluxgrid_19890101_20091231.nc'
-;initncdf, fi
-;v=read_ncdf("v", date1-1, date2, file=fi,/nostr)
-;nce=sqrt(u*u+v*v)
-;help, nce
-
-;dir='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/'
-;fi=dir+'zonal_wind_speed_oafluxgrid_30N30S.nc'
-;initncdf, fi
-;u=read_ncdf("u", date1, date2, file=fi,/nostr)
-;fi=dir+'meridional_wind_speed_oafluxgrid_30N30S.nc'
-;initncdf, fi
-;v=read_ncdf("v", date1, date2, file=fi,/nostr)
-;ws_tmi=sqrt(u*u+v*v)
-;help, ws_tmi
-
-;file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/wind_ncep1_19890101_20091231.nc'
-;initncdf, file
-;u=read_ncdf("u", date1, date2, file=file,/nostr)
-;v=read_ncdf("v", date1, date2, file=file,/nostr)
-;nce1=sqrt(u*u+v*v)
-;help, nce1
-
 ;save, unc, cor, oaf, nce, ws_tmi, nce1, filename="ws_era_trop_oaf_nce_qscat_2000_2009_global.idl"
 restore, file="/Users/pkb/work/MY_SAXO/ws_era_trop_oaf_nce_qscat_2000_2009_global.idl"
@@ -173,6 +179,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -240,5 +244,5 @@
 endfor
 close,/all
-fi_ws_erai='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_erai_'+ocean+'.txt'
+fi_ws_erai=tropflux_id_env+'ws_2000_2009_erai_'+ocean+'.txt'
 res=read_ascii(fi_ws_erai,data_start=1)
 ff=res.field1
@@ -266,5 +270,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_trop='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_trop_'+ocean+'.txt'
+fi_ws_trop=tropflux_id_env+'ws_2000_2009_trop_'+ocean+'.txt'
 res=read_ascii(fi_ws_trop,data_start=1)
 ff=res.field1
@@ -293,5 +297,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_oaflx_'+ocean+'.txt'
+fi_ws_oaflx=tropflux_id_env+'ws_2000_2009_oaflx_'+ocean+'.txt'
 res=read_ascii(fi_ws_oaflx,data_start=1)
 ff=res.field1
@@ -322,5 +326,5 @@
 
 
-fi_ws_ncep='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep_'+ocean+'.txt'
+fi_ws_ncep=tropflux_id_env+'ws_2000_2009_ncep_'+ocean+'.txt'
 res=read_ascii(fi_ws_ncep,data_start=1)
 ff=res.field1
@@ -349,5 +353,5 @@
 oplot, mean_tao, yfit, color=250, thick=2
 
-fi_ws_tmi='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_tmi_'+ocean+'.txt'
+fi_ws_tmi=tropflux_id_env+'ws_2000_2009_tmi_'+ocean+'.txt'
 res=read_ascii(fi_ws_tmi,data_start=1)
 ff=res.field1
@@ -377,5 +381,5 @@
 
 
-fi_ws_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/ws_2000_2009_ncep1_'+ocean+'.txt'
+fi_ws_ncep1=tropflux_id_env+'ws_2000_2009_ncep1_'+ocean+'.txt'
 res=read_ascii(fi_ws_ncep1,data_start=1)
 ff=res.field1
@@ -406,46 +410,6 @@
 closeps
 
-fig='ws_validation_scatter_2000_2009_'+ocean+'.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'ws_validation_scatter_2000_2009_'+ocean+'.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig8/lhf_validation_scatter_2000_2009.pro
===================================================================
--- /trunk/src/paper01/fig8/lhf_validation_scatter_2000_2009.pro	(revision 45)
+++ /trunk/src/paper01/fig8/lhf_validation_scatter_2000_2009.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _lhf_validation_scatter_2000_2009.pro
+; .. _lhf_validation_scatter_2000_2009.pro:
 ;
 ; ====================================
@@ -6,6 +6,34 @@
 ; ====================================
 ;
-;  DESCRIPTION
+; DESCRIPTION
 ; ===========
+;
+; .. graphviz::
+;
+;    digraph lhf_validation_scatter_2000_2009 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       lhf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_2000_2009_erai_v52.txt"];
+;       lhf_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lhf_2000_2009_trop_v52.txt"];
+;       lhf_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lhf_2000_2009_oaflx_v52.txt"];
+;       lhf_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lhf_2000_2009_ncep_v52.txt"];
+;       lhf_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       lhf_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lhf_2000_2009_ncep1_v52.txt"];
+;       lhf_ncep1_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       lhf_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_lhf_19890101_20091231_oafluxgrid.nc"];
+;       lhf_tropflux2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_oafluxgrid_1985_2009.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lhf_validation_scatter_2000_2009.ps"];
+;
+;       lhf_validation_scatter_2000_2009 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/brolhfer/trunk/src/paper01/fig7/lhf_validation_scatter_2000_2009.pro",
+;       label="${TROPFLUX}/src/paper01/fig7/lhf_validation_scatter_2000_2009.pro"];
+;
+;       {lhf_erai lhf_ncep2_oafluxgrid lhf_ncep1_2 lhf_erai_oafluxgrid lhf_tropflux2 lhf_oafluxgrid} -> {lhf_validation_scatter_2000_2009} -> {lhf_tropflux lhf_oaflux lhf_ncep lhf_ncep1 figure}
+;    }
 ;
 ; SEE ALSO
@@ -13,4 +41,12 @@
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +56,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> lhf_validation_scatter_2000_2009, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +80,10 @@
 ; $Id$
 ;
+; - fplod 20110420T102937Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,14 +92,10 @@
 ;-
 pro lhf_validation_scatter_2000_2009,date1,date2
-@common
-
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-
-;;  1.    read_variables_v2
-;;  2.    statistics_3var_v1
 
 ;; evaluation is done for 20000101 - 20091231 period
@@ -66,13 +119,13 @@
 close,/all
 
-fi_lhf_erai='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_erai_v52.txt'
+fi_lhf_erai=tropflux_id_env+'lhf_2000_2009_erai_v52.txt'
 openw,1,fi_lhf_erai
-fi_lhf_trop='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_trop_v52.txt'
+fi_lhf_trop=tropflux_id_env+'lhf_2000_2009_trop_v52.txt'
 openw,2,fi_lhf_trop
-fi_lhf_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_oaflx_v52.txt'
+fi_lhf_oaflx=tropflux_id_env+'lhf_2000_2009_oaflx_v52.txt'
 openw,3,fi_lhf_oaflx
-fi_lhf_ncep='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_ncep_v52.txt'
+fi_lhf_ncep=tropflux_id_env+'lhf_2000_2009_ncep_v52.txt'
 openw,4,fi_lhf_ncep
-fi_lhf_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_ncep1_v52.txt'
+fi_lhf_ncep1=tropflux_id_env+'lhf_2000_2009_ncep1_v52.txt'
 openw,5,fi_lhf_ncep1
 
@@ -85,10 +138,10 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_lhf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('lhf',date1,date2,file=file,/nostr)
 help, unc
 
-file="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"
+file=tropflux_id_env+"TropFlux_19890101_20091231.nc"
 initncdf, file
 cor=read_ncdf('lhf',date1,date2,file=file,/nostr)
@@ -96,15 +149,15 @@
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lhf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'lhf_oafluxgrid_1985_2009.nc'
 initncdf, file
 oaf=read_ncdf("lhf", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/lhf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 nce=read_ncdf("lhf", date1, date2, file=fi,/nostr)
 help, nce
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=-1*read_ncdf("lhf", date1, date2, file=file,/nostr)
@@ -113,6 +166,4 @@
 nsmooth=1.
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -177,5 +228,5 @@
 close,/all
 
-fi_lhf_erai='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_erai_v52.txt'
+fi_lhf_erai=tropflux_id_env+'lhf_2000_2009_erai_v52.txt'
 res=read_ascii(fi_lhf_erai,data_start=1)
 ff=res.field1
@@ -208,5 +259,5 @@
 oplot, [20,200], [20,200]
 
-fi_lhf_trop='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_trop_v52.txt'
+fi_lhf_trop=tropflux_id_env+'lhf_2000_2009_trop_v52.txt'
 res=read_ascii(fi_lhf_trop,data_start=1)
 ff=res.field1
@@ -240,5 +291,5 @@
 
 
-fi_lhf_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_oaflx_v52.txt'
+fi_lhf_oaflx=tropflux_id_env+'lhf_2000_2009_oaflx_v52.txt'
 res=read_ascii(fi_lhf_oaflx,data_start=1)
 ff=res.field1
@@ -271,5 +322,5 @@
 oplot, [20,200], [20,200]
 
-fi_lhf_ncep='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_ncep_v52.txt'
+fi_lhf_ncep=tropflux_id_env+'lhf_2000_2009_ncep_v52.txt'
 res=read_ascii(fi_lhf_ncep,data_start=1)
 ff=res.field1
@@ -302,5 +353,5 @@
 oplot, [20,200], [20,200]
 
-fi_lhf_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/lhf_2000_2009_ncep1_v52.txt'
+fi_lhf_ncep1=tropflux_id_env+'lhf_2000_2009_ncep1_v52.txt'
 res=read_ascii(fi_lhf_ncep1,data_start=1)
 ff=res.field1
@@ -335,46 +386,6 @@
 closeps
 
-fig='lhf_validation_scatter_2000_2009.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'lhf_validation_scatter_2000_2009.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro
===================================================================
--- /trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro	(revision 45)
+++ /trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _shf_validation_scatter_2000_2009.pro
+; .. _shf_validation_scatter_2000_2009.pro:
 ;
 ; ====================================
@@ -9,8 +9,44 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph shf_validation_scatter_2000_2009 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       shf_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_2000_2009_erai_v52.txt"];
+;       shf_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/shf_2000_2009_trop_v52.txt"];
+;       shf_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/shf_2000_2009_oaflx_v52.txt"];
+;       shf_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/shf_2000_2009_ncep_v52.txt"];
+;       shf_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_ncep2_oafluxgrid_19890101_20091231.nc"];
+;       shf_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/shf_2000_2009_ncep1_v52.txt"];
+;       shf_ncep1_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       shf_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_shf_19890101_20091231_oafluxgrid.nc"];
+;       shf_tropflux2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/shf_oafluxgrid_1985_2009.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/shf_validation_scatter_2000_2009.ps"];
+;
+;       shf_validation_scatter_2000_2009 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broshfer/trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro",
+;       label="${TROPFLUX}/src/paper01/fig8/shf_validation_scatter_2000_2009.pro"];
+;
+;       {shf_erai shf_ncep2_oafluxgrid shf_ncep1_2 shf_erai_oafluxgrid shf_tropflux2 shf_oafluxgrid} -> {shf_validation_scatter_2000_2009} -> {shf_tropflux shf_oaflux shf_ncep shf_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_variables_v2.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +56,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> shf_validation_scatter_2000_2009, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +80,10 @@
 ; $Id$
 ;
+; - fplod 20110420T103316Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -34,14 +91,11 @@
 ;
 ;-
-pro shf_validation_scatter_2000_2009,date1,date2
-@common
-
+pro shf_validation_scatter_2000_2009, date1, date2
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_variables_sh
-;;   2.  .r statistics_3var_v1
 
 ;; evaluation is done for 20000101, 20091231 period
@@ -66,14 +120,14 @@
 close,/all
 
-fi_shf_erai='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_erai_v52.txt'
+fi_shf_erai=tropflux_id_env+'shf_2000_2009_erai_v52.txt'
 openw,1,fi_shf_erai
-fi_shf_trop='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_trop_v52.txt'
+fi_shf_trop=tropflux_id_env+'shf_2000_2009_trop_v52.txt'
 openw,2,fi_shf_trop
-fi_shf_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_oaflx_v52.txt'
+fi_shf_oaflx=tropflux_id_env+'shf_2000_2009_oaflx_v52.txt'
 openw,3,fi_shf_oaflx
-fi_shf_ncep='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_ncep_v52.txt'
+fi_shf_ncep=tropflux_id_env+'shf_2000_2009_ncep_v52.txt'
 openw,4,fi_shf_ncep
 
-fi_shf_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_ncep1_v52.txt'
+fi_shf_ncep1=tropflux_id_env+'shf_2000_2009_ncep1_v52.txt'
 openw,5,fi_shf_ncep1
 
@@ -87,10 +141,10 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_shf_19890101_20091231_oafluxgrid.nc'
+file=tropflux_id_env+'erai_shf_19890101_20091231_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('shf',date1,date2,file=file,/nostr)
 help, unc
 
-file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_19890101_20091231_v51.nc'
+file=tropflux_id_env+'TropFlux_19890101_20091231_v51.nc'
 initncdf, file
 cor=read_ncdf('shf',date1,date2,file=file,/nostr)
@@ -98,15 +152,15 @@
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/shf_oafluxgrid_1985_2009.nc'
+file=tropflux_id_env+'shf_oafluxgrid_1985_2009.nc'
 initncdf, file
 oaf=read_ncdf("shf", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/shf_ncep2_oafluxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'shf_ncep2_oafluxgrid_19890101_20091231.nc'
 initncdf, fi
 nce=read_ncdf("shf", date1, date2, file=fi,/nostr)
 help, nce
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=-1*read_ncdf("shf", date1, date2, file=file,/nostr)
@@ -114,6 +168,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -176,5 +228,5 @@
 close,/all
 
-fi_shf_erai='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_erai_v52.txt'
+fi_shf_erai=tropflux_id_env+'shf_2000_2009_erai_v52.txt'
 res=read_ascii(fi_shf_erai,data_start=1)
 ff=res.field1
@@ -208,5 +260,5 @@
 
 
-fi_shf_trop='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_trop_v52.txt'
+fi_shf_trop=tropflux_id_env+'shf_2000_2009_trop_v52.txt'
 res=read_ascii(fi_shf_trop,data_start=1)
 ff=res.field1
@@ -240,5 +292,5 @@
 
 
-fi_shf_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_oaflx_v52.txt'
+fi_shf_oaflx=tropflux_id_env+'shf_2000_2009_oaflx_v52.txt'
 res=read_ascii(fi_shf_oaflx,data_start=1)
 ff=res.field1
@@ -271,5 +323,5 @@
 oplot, [-5,25], [-5,25]
 
-fi_shf_ncep='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_ncep_v52.txt'
+fi_shf_ncep=tropflux_id_env+'shf_2000_2009_ncep_v52.txt'
 res=read_ascii(fi_shf_ncep,data_start=1)
 ff=res.field1
@@ -302,5 +354,5 @@
 oplot, [-5,25], [-5,25]
 
-fi_shf_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/shf_2000_2009_ncep1_v52.txt'
+fi_shf_ncep1=tropflux_id_env+'shf_2000_2009_ncep1_v52.txt'
 res=read_ascii(fi_shf_ncep1,data_start=1)
 ff=res.field1
@@ -335,46 +387,6 @@
 closeps
 
-fig='shf_validation_scatter_2000_2009.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'shf_validation_scatter_2000_2009.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro
===================================================================
--- /trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro	(revision 45)
+++ /trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _lwr_validation_scatter_2000_2007.pro
+; .. _lwr_validation_scatter_2000_2007.pro:
 ;
 ; ====================================
@@ -9,4 +9,34 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph lwr_validation_scatter_2000_2007 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       lwr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_2000_2007_erai.txt"];
+;       lwr_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lwr_2000_2007_trop.txt"];
+;       lwr_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lwr_2000_2007_oaflx.txt"];
+;       lwr_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lwr_2000_2007_ncep.txt"];
+;       lwr_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lwr_2000_2007_ncep1.txt"];
+;       lwr_ncep1_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       lwr_clark [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_2000_2007_clark.txt"];
+;       lwr_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc"];
+;       lwr_tropflux2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_lwr_19890101_20091231.nc"];
+;       lwr_tropflux3 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwr_oafluxgrid_1985_2007.nc"];
+;       lwr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/NCEP2_flux_19890101_20090729.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/lwr_validation_scatter_2000_2007.ps"];
+;
+;       lwr_validation_scatter_2000_2007 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/brolwrer/trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro",
+;       label="${TROPFLUX}/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro"];
+;
+;       {lwr_erai lwr_nceplwr_ncep1 lwr_ncep1_2 lwr_clark lwr_erai_oafluxgrid lwr_tropflux2 lwr_tropflux3 lwr_oafluxgrid lwr_ncep2} -> {lwr_validation_scatter_2000_2007} -> {lwr_tropflux lwr_oaflux lwr_ncep lwr_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
@@ -14,4 +44,13 @@
 ; :ref:`tropflux_profile.sh`
 ;
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_lw_global_v2.pro`
+; :ref:`statistics_3var_v1.pro`
+;
 ; EXAMPLES
 ; ========
@@ -20,7 +59,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> lwr_validation_scatter_2000_2007, date1, date2
+;
+; TODO
+; ====
+;
+; mùake it work on cratos : missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +83,10 @@
 ; $Id$
 ;
+; - fplod 20110420T104246Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -34,15 +94,11 @@
 ;
 ;-
-pro lwr_validation_scatter_2000_2007,date1,date2
-@common
-
+pro lwr_validation_scatter_2000_2007, date1, date2
+@cm_general
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_lw_global_v2
-;;   2.  .r statistics_3var_v1
-
 ;; evaluation is done for 20000101-20071231 period
 
@@ -70,15 +126,15 @@
 close,/all
 
-fi_lwr_erai='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_erai.txt'
+fi_lwr_erai=tropflux_id_env+'lwr_2000_2007_erai.txt'
 openw,1,fi_lwr_erai
-fi_lwr_trop='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_trop.txt'
+fi_lwr_trop=tropflux_id_env+'lwr_2000_2007_trop.txt'
 openw,2,fi_lwr_trop
-fi_lwr_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_oaflx.txt'
+fi_lwr_oaflx=tropflux_id_env+'lwr_2000_2007_oaflx.txt'
 openw,3,fi_lwr_oaflx
-fi_lwr_ncep='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_ncep.txt'
+fi_lwr_ncep=tropflux_id_env+'lwr_2000_2007_ncep.txt'
 openw,4,fi_lwr_ncep
-fi_lwr_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_ncep1.txt'
+fi_lwr_ncep1=tropflux_id_env+'lwr_2000_2007_ncep1.txt'
 openw,5,fi_lwr_ncep1
-fi_lwr_clark='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_clark.txt'
+fi_lwr_clark=tropflux_id_env+'lwr_2000_2007_clark.txt'
 openw,6,fi_lwr_clark
 
@@ -92,30 +148,30 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
+file=tropflux_id_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('lwr',date1,date2,file=file,/nostr)
 help, unc
 
-file="/Volumes/Sanathana/TropFlux_data/TropFlux_lwr_19890101_20091231.nc"
-initncdf, file
+file=tropflux_id_env+'TropFlux_lwr_19890101_20091231.nc"
+initncda, file
 cor=read_ncdf('lwr',date1,date2,file=file,/nostr) & cor=-1*cor
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/lwr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'lwr_oafluxgrid_1985_2007.nc'
 initncdf, file
 oaf=read_ncdf("lwr", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/NCEP2_flux_19890101_20090729.nc'
+fi=tropflux_id_env+'NCEP2_flux_19890101_20090729.nc'
 initncdf, fi
 nce=read_ncdf("lwr", date1, date2, file=fi,/nostr) ;;  & nce=-1*nce
 help, nce
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=-1*read_ncdf("lwr", date1, date2, file=file,/nostr)
 help, nce1
 
-file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_19890101_20091231.nc'
+file=tropflux_id_env+'TropFlux_19890101_20091231.nc'
 initncdf, file
 clark=-1*read_ncdf("lwr", date1, date2, file=file,/nostr)
@@ -123,6 +179,4 @@
 
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -191,5 +245,5 @@
 close,/all
 
-fi_lwr_erai='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_erai.txt'
+fi_lwr_erai=tropflux_id_env+'lwr_2000_2007_erai.txt'
 res=read_ascii(fi_lwr_erai,data_start=1)
 ff=res.field1
@@ -224,5 +278,5 @@
 significance_test, mean_tao, mean_erai
 
-fi_lwr_trop='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_trop.txt'
+fi_lwr_trop=tropflux_id_env+'lwr_2000_2007_trop.txt'
 res=read_ascii(fi_lwr_trop,data_start=1)
 ff=res.field1
@@ -257,5 +311,5 @@
 significance_test, mean_tao, mean_trop
 
-fi_lwr_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_oaflx.txt'
+fi_lwr_oaflx=tropflux_id_env+'lwr_2000_2007_oaflx.txt'
 res=read_ascii(fi_lwr_oaflx,data_start=1)
 ff=res.field1
@@ -290,5 +344,5 @@
 significance_test, mean_tao, mean_oaf
 
-fi_lwr_ncep='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_ncep.txt'
+fi_lwr_ncep=tropflux_id_env+'lwr_2000_2007_ncep.txt'
 res=read_ascii(fi_lwr_ncep,data_start=1)
 ff=res.field1
@@ -323,5 +377,5 @@
 significance_test, mean_tao, mean_nce
 
-fi_lwr_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_ncep1.txt'
+fi_lwr_ncep1=tropflux_id_env+'lwr_2000_2007_ncep1.txt'
 res=read_ascii(fi_lwr_ncep1,data_start=1)
 ff=res.field1
@@ -356,5 +410,5 @@
 significance_test, mean_tao, mean_nce
 
-fi_lwr_clark='/Users/pkb/work/MY_SAXO/flux_automat/lwr_2000_2007_clark.txt'
+fi_lwr_clark=tropflux_id_env+'lwr_2000_2007_clark.txt'
 res=read_ascii(fi_lwr_clark,data_start=1)
 ff=res.field1
@@ -391,46 +445,6 @@
 closeps
 
-fig='lwr_validation_scatter_2000_2007.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'lwr_validation_scatter_2000_2007.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
Index: /trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro
===================================================================
--- /trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro	(revision 45)
+++ /trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro	(revision 46)
@@ -1,4 +1,4 @@
 ;+
-; .. _swr_validation_scatter_2000_2007.pro
+; .. _swr_validation_scatter_2000_2007.pro:
 ;
 ; ====================================
@@ -9,8 +9,46 @@
 ; ===========
 ;
+; .. graphviz::
+;
+;    digraph swr_validation_scatter_2000_2007 {
+;       graph [
+;       rankdir="LR",
+;       ]
+;       swr_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_2000_2007_erai_v50.txt"];
+;       swr_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_2000_2007_trop_v50.txt"];
+;       swr_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_2000_2007_oaflx_v50.txt"];
+;       swr_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_2000_2007_ncep_v50.txt"];
+;       swr_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_2000_2007_ncep1_v50.txt"];
+;       swr_olr [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_2000_2007_olr_v50.txt"];
+;       swr_ncep1_2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/fluxe_ncep1_19890101_20091231.nc"];
+;       swr_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_fluxes_20000101_20090801_TROP_oafluxgrid.nc"];
+;       swr_tropflux2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_swr_19890101_20091231_DT_v51.nc"];
+;       swr_tropflux3 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_19890101_20091231.nc"];
+;       swr_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_oafluxgrid_1985_2007.nc"];
+;       swr_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swr_ncep2_oaflxgrid_19890101_20091231.nc"];
+;
+;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/swr_validation_scatter_2000_2007.ps"];
+;
+;       swr_validation_scatter_2000_2007 [shape=box,
+;       fontname=Courier,
+;       color=blue,
+;       URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro",
+;       label="${TROPFLUX}/src/paper01/fig9/swr_validation_scatter_2000_2007.pro"];
+;
+;       {swr_erai swr_ncep1_2 swr_erai_oafluxgrid swr_tropflux2 swr_tropflux3 swr_oafluxgrid swr_ncep2} -> {swr_validation_scatter_2000_2007} -> {swr_tropflux swr_oaflux swr_ncep swr_olr swr_ncep1 figure}
+;    }
+;
 ; SEE ALSO
 ; ========
 ;
 ; :ref:`tropflux_profile.sh`
+; :ref:`tropflux_init.pro`
+; :ref:`cm_tropflux.pro`
+;
+; :func:`x_site_location`
+; :func:`y_site_location`
+;
+; :ref:`read_global_sw_v50.pro`
+; :ref:`statistics_3var_v1.pro`
 ;
 ; EXAMPLES
@@ -20,7 +58,22 @@
 ;
 ;  IDL> @tropflux_init
-;  IDL> date1=++
-;  IDL> date2=++
+;  IDL> date1=19890101L
+;  IDL> date2=20091231L
 ;  IDL> swr_validation_scatter_2000_2007, date1, date2
+;
+; TODO
+; ====
+;
+; make it work on cratos : missing data
+;
+; ++ mooring data in graphviz
+;
+; coding rules
+;
+; get rid of spwan
+;
+; complete description
+;
+; handle IO error
 ;
 ; EVOLUTIONS
@@ -29,4 +82,10 @@
 ; $Id$
 ;
+; - fplod 20110420T105004Z aedon.locean-ipsl.upmc.fr (Darwin)
+;
+;   * remove hard coding path
+;   * add graphviz
+;   * externalize functions
+;
 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin)
 ;
@@ -35,13 +94,10 @@
 ;-
 pro swr_validation_scatter_2000_2007, date1, date2
-@common
-
+@cm_genral
+@cm_tropflux
 reinitplt, /z,/invert
 key_portrait = 1
 
 openps, FILENAME = 'idl.ps'
-;; Before running this program, you have to compile the following subrutines
-;;   1.  .r read_global_sw_v50
-;;   2.  .r statistics_3var_v1
 
 ;; evaluation is done for 20000101-20071231 period
@@ -68,15 +124,15 @@
 close,/all
 
-fi_swr_erai='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_erai_v50.txt'
+fi_swr_erai=tropflux_id_env+'swr_2000_2007_erai_v50.txt'
 openw,1,fi_swr_erai
-fi_swr_trop='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_trop_v50.txt'
+fi_swr_trop=tropflux_id_env+'swr_2000_2007_trop_v50.txt'
 openw,2,fi_swr_trop
-fi_swr_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_oaflx_v50.txt'
+fi_swr_oaflx=tropflux_id_env+'swr_2000_2007_oaflx_v50.txt'
 openw,3,fi_swr_oaflx
-fi_swr_ncep='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_ncep_v50.txt'
+fi_swr_ncep=tropflux_id_env+'swr_2000_2007_ncep_v50.txt'
 openw,4,fi_swr_ncep
-fi_swr_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_ncep1_v50.txt'
+fi_swr_ncep1=tropflux_id_env+'swr_2000_2007_ncep1_v50.txt'
 openw,5,fi_swr_ncep1
-fi_swr_olr='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_olr_v50.txt'
+fi_swr_olr=tropflux_id_env+'swr_2000_2007_olr_v50.txt'
 openw,6,fi_swr_olr
 
@@ -91,36 +147,34 @@
 ;; first reading the whole ERAI uncorrected and corrected data
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/erai_fluxes_20000101_20090801_TROP_oafluxgrid.nc'
+file=tropflux_id_env+'erai_fluxes_20000101_20090801_TROP_oafluxgrid.nc'
 initncdf, file
 unc=read_ncdf('swr',date1,date2,file=file,/nostr) & unc=-1*unc
 help, unc
 
-file='/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v51.nc'
+file=tropflux_id_env+'TropFlux_swr_19890101_20071231_DT_v51.nc'
 initncdf, file
 cor=read_ncdf('swr',date1,date2,file=file,/nostr)
 help, cor
 
-file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
+file=tropflux_id_env+'swr_oafluxgrid_1985_2007.nc'
 initncdf, file
 oaf=read_ncdf("swr", date1, date2, file=file,/nostr)
 help, oaf
 
-fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/swr_ncep2_oaflxgrid_19890101_20091231.nc'
+fi=tropflux_id_env+'swr_ncep2_oaflxgrid_19890101_20091231.nc'
 initncdf, fi
 nce=read_ncdf("swr", date1, date2, file=fi,/nostr) & nce=0.94*nce
 help, nce
 
-file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/fluxe_ncep1_19890101_20091231.nc'
+file=tropflux_id_env+'fluxe_ncep1_19890101_20091231.nc'
 initncdf, file
 nce1=read_ncdf("swr", date1, date2, file=file,/nostr)
 help, nce1
 
-file='/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc'
+file=tropflux_id_env+'TropFlux_swr_19890101_20091231_NRT_v50.nc'
 initncdf, file
 sw_olr=read_ncdf("sw", date1-1, date2, file=file,/nostr)
 help, sw_olr
 nn=n_elements(sitelist)
-date1=date1
-date2=date2
 for n=0, nn-1 do begin
 
@@ -190,5 +244,5 @@
 close,/all
 
-fi_swr_erai='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_erai_v50.txt'
+fi_swr_erai=tropflux_id_env+'swr_2000_2007_erai_v50.txt'
 res=read_ascii(fi_swr_erai,data_start=1)
 ff=res.field1
@@ -222,5 +276,5 @@
 
 
-fi_swr_trop='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_trop_v50.txt'
+fi_swr_trop=tropflux_id_env+'swr_2000_2007_trop_v50.txt'
 res=read_ascii(fi_swr_trop,data_start=1)
 ff=res.field1
@@ -254,5 +308,5 @@
 
 
-fi_swr_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_oaflx_v50.txt'
+fi_swr_oaflx=tropflux_id_env+'swr_2000_2007_oaflx_v50.txt'
 res=read_ascii(fi_swr_oaflx,data_start=1)
 ff=res.field1
@@ -286,5 +340,5 @@
 
 
-fi_swr_ncep='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_ncep_v50.txt'
+fi_swr_ncep=tropflux_id_env+'swr_2000_2007_ncep_v50.txt'
 res=read_ascii(fi_swr_ncep,data_start=1)
 ff=res.field1
@@ -318,5 +372,5 @@
 
 
-fi_swr_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_ncep1_v50.txt'
+fi_swr_ncep1=tropflux_id_env+'swr_2000_2007_ncep1_v50.txt'
 res=read_ascii(fi_swr_ncep1,data_start=1)
 ff=res.field1
@@ -350,5 +404,5 @@
 
 
-fi_swr_olr='/Users/pkb/work/MY_SAXO/flux_automat/swr_2000_2007_olr_v50.txt'
+fi_swr_olr=tropflux_id_env+'swr_2000_2007_olr_v50.txt'
 res=read_ascii(fi_swr_olr,data_start=1)
 ff=res.field1
@@ -384,46 +438,6 @@
 closeps
 
-fig='swr_validation_scatter_2000_2007.ps'
-spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig
-spawn, 'gv '+cpsdir+fig
-return
+fig=tropflux_od_env+'swr_validation_scatter_2000_2007.ps'
+spawn, 'mv '+psdir+'idl.ps '+fig
+spawn, 'gv '+fig
 end
-function x_site_location, site
-    n1=strpos(site, 's')
-if (n1 gt -1) then begin
-    ns=-1.
-    x=strmid(site, 0, n1)
-    x=float(x)*ns
-endif else begin
-    n1=strpos(site, 'n')
-    x=strmid(site, 0, n1)
-    ny=1.
-    x=float(x)*ny
-endelse
-return, float(x)
-end
-function y_site_location, site
-    n1=strpos(site, 'e')
-if (n1 gt -1) then begin
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-    endelse
-
-endif else begin
-    n1=strpos(site, 'w')
-    n=strpos(site, 's')
-    if (n gt -1) then begin
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-    endif else begin
-        n=strpos(site, 'n')
-        y=strmid(site, n+1, n1-n-1)
-        y=180+(180-float(y))
-   endelse
-endelse
-return,float(y)
-end
