Changeset 44 for trunk/src


Ignore:
Timestamp:
04/12/11 18:14:21 (13 years ago)
Author:
pinsard
Message:

start consolidation of paper01 materials

Location:
trunk/src
Files:
12 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/paper01/fig1/fig1_no_obs_map.pro

    r43 r44  
    11;+ 
    2 ; .. _fig1_no_obs_map.pro 
     2; .. _fig1_no_obs_map.pro: 
    33; 
    44; =================== 
     
    99; =========== 
    1010; 
     11; .. graphviz:: 
     12; 
     13;    digraph fig1_no_obs_map { 
     14;       graph [ 
     15;       rankdir="LR", 
     16;       ] 
     17;       mask [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/mask_oaflux_30N30S.nc"]; 
     18; 
     19;       lhf_no_obs [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lhf_no_obs.txt"]; 
     20; 
     21;       sw_no_obs [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sw_no_obs.txt"]; 
     22; 
     23;       lw_no_obs [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lw_no_obs.txt"]; 
     24; 
     25;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig1_no_obs_map.ps"]; 
     26; 
     27;       fig1_no_obs_map  [shape=box, 
     28;       fontname=Courier, 
     29;       color=blue, 
     30;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig1/fig1_no_obs_map.pro", 
     31;       label="${TROPFLUX}/src/paper01/fig1/fig1_no_obs_map.pro"]; 
     32; 
     33;       {mask lhf_no_obs sw_no_obs lw_no_obs} -> {fig1_no_obs_map} -> {figure} 
     34;    } 
     35; 
    1136; SEE ALSO 
    1237; ======== 
    1338; 
     39; :ref:`guide data OAFLUX <data_in_oaflux>` 
     40; 
    1441; :ref:`tropflux_profile.sh` 
     42; :ref:`tropflux_init.pro` 
     43; 
     44; :ref:`oaflux_mask_30N30S.pro` 
    1545; 
    1646; EXAMPLES 
     
    2252;  IDL> fig1_no_obs_map 
    2353; 
     54; TODO 
     55; ==== 
     56; 
     57; coding rules 
     58; 
     59; get rid of spwan 
     60; 
     61; complete description 
     62; 
     63; externalize function 
     64; 
     65; handle IO error 
     66; 
    2467; EVOLUTIONS 
    2568; ========== 
     
    2770; $Id$ 
    2871; 
     72; - fplod 20110412T073818Z aedon.locean-ipsl.upmc.fr (Darwin) 
     73; 
     74;   * make it work on cratos 
     75;   * remove hard coding path 
     76;   * add graphviz 
     77; 
    2978; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3079; 
     
    3382;- 
    3483pro fig1_no_obs_map 
    35 @common 
    36  
     84; 
     85@cm_tropflux 
     86; 
    3787reinitplt, /z,/invert 
    3888key_portrait = 1 
     
    4797lct=65 
    4898 
    49 file='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc' 
     99file=tropflux_id_env + 'mask_oaflux_30N30S.nc' 
    50100initncdf, file 
    51101domdef, 30,390,-30,30 
    52102msk=ncdf_lec(file,var='msk') 
    53103 
    54 fi='/Users/pkb/work/MY_SAXO/flux_automat/lhf_no_obs.txt' 
     104fi=tropflux_id_env + 'lhf_no_obs.txt' 
    55105res=read_ascii(fi,data_start=1) 
    56106ff=res.field1 
     
    69119 
    70120for n=0,NN-1 do begin 
    71   x=lon(n) 
    72   y=lat(n) 
    73   c=no(n) 
     121  x=lon[n] 
     122  y=lat[n] 
     123  c=no[n] 
    74124  cmi=lh_mi & cma=lh_ma & dc=cma-cmi 
    75125  col=((10+244*(c-cmi)/dc) > 10) < 254 
     
    80130 
    81131for n=0,NN-1 do begin 
    82   x=lon(n) 
    83   y=lat(n) 
    84   c=no(n) 
     132  x=lon[n] 
     133  y=lat[n] 
     134  c=no[n] 
    85135 
    86136  plots, x,y,psym=8,symsize=1.5,color=0 
    87137endfor 
    88138 
    89 fi='/Users/pkb/work/MY_SAXO/flux_automat/sw_no_obs.txt' 
     139fi=tropflux_id_env + 'sw_no_obs.txt' 
    90140res=read_ascii(fi,data_start=1) 
    91141ff=res.field1 
     
    103153 
    104154for n=0,NN-1 do begin 
    105   x=lon(n) 
    106   y=lat(n) 
    107   c=no(n) 
     155  x=lon[n] 
     156  y=lat[n] 
     157  c=no[n] 
    108158  cmi=sw_mi & cma=sw_ma & dc=cma-cmi 
    109159  col=((10+244*(c-cmi)/dc) > 10) < 254 
     
    114164 
    115165for n=0,NN-1 do begin 
    116   x=lon(n) 
    117   y=lat(n) 
    118   c=no(n) 
     166  x=lon[n] 
     167  y=lat[n] 
     168  c=no[n] 
    119169 
    120170  plots, x,y,psym=8,symsize=1.5,color=0 
    121171endfor 
    122172 
    123 fi='/Users/pkb/work/MY_SAXO/flux_automat/lw_no_obs.txt' 
     173fi=tropflux_id_env + 'lw_no_obs.txt' 
    124174res=read_ascii(fi,data_start=1) 
    125175ff=res.field1 
     
    138188 
    139189for n=0,NN-1 do begin 
    140   x=lon(n) 
    141   y=lat(n) 
    142   c=no(n) 
     190  x=lon[n] 
     191  y=lat[n] 
     192  c=no[n] 
    143193  cmi=lw_mi & cma=lw_ma & dc=cma-cmi 
    144194  col=((10+244*(c-cmi)/dc) > 10) < 254 
     
    149199 
    150200for n=0,NN-1 do begin 
    151   x=lon(n) 
    152   y=lat(n) 
    153   c=no(n) 
     201  x=lon[n] 
     202  y=lat[n] 
     203  c=no[n] 
    154204 
    155205  plots, x,y,psym=8,symsize=1.5,color=0 
     
    168218closeps 
    169219 
    170 fig='fig1_no_obs_map.ps' 
    171 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    172 spawn, 'gv '+cpsdir+fig 
    173 return 
     220fig=tropflux_od_env + 'fig1_no_obs_map.ps' 
     221spawn, 'mv '+psdir+'idl.ps '+fig 
     222spawn, 'gv '+fig 
    174223end 
    175224 
  • trunk/src/paper01/fig2/fig2_timeline_diagram.pro

    r43 r44  
    99; =========== 
    1010; 
     11; .. graphviz:: 
     12; 
     13;    digraph fig2_timeline_diagram  { 
     14;       graph [ 
     15;       rankdir="LR", 
     16;       ] 
     17; 
     18;       qlat [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/qlat*_dy.cdf"]; 
     19;       lwnet [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwnet*_dy.cdf"]; 
     20;       swnet [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swnet*_dy.cdf"]; 
     21;       fig2_timeline_diagram [shape=box, 
     22;       fontname=Courier, 
     23;       color=blue, 
     24;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/fig2_timeline_diagram.pro", 
     25;       label="${TROPFLUX}/src/paper01/fig2/fig2_timeline_diagram.pro"]; 
     26; 
     27;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/fig2_timeline_diagram.ps"]; 
     28; 
     29;       {qlat lwnet swnet} -> {fig2_timeline_diagram} -> {figure} 
     30;    } 
     31; 
    1132; SEE ALSO 
    1233; ======== 
    1334; 
    1435; :ref:`tropflux_profile.sh` 
     36; :ref:`tropflux_init.pro` 
     37; 
     38; :ref:`read_lh.pro` 
     39; :ref:`read_lw.pro` 
     40; :ref:`read_sw.pro` 
     41; 
     42; :func:`x_site_location` 
     43; :func:`y_site_location` 
    1544; 
    1645; EXAMPLES 
     
    2251;  IDL> fig2_timeline_diagram 
    2352; 
     53; TODO 
     54; ==== 
     55; 
     56; make it work on cratos :: 
     57;    % Error:  
     58;    % the vector size (7670) is incompatible 
     59;    % with the domain dimensions  
     60;    % [jpi/nx, jpj/ny, jpk/nz, jpt] = [1/1, 1/1, 1/1, 1] 
     61; 
     62; coding rules 
     63; 
     64; get rid of spwan 
     65; 
     66; complete description 
     67; 
     68; handle IO error 
     69; 
    2470; EVOLUTIONS 
    2571; ========== 
     
    2773; $Id$ 
    2874; 
     75; - fplod 20110412T084618Z aedon.locean-ipsl.upmc.fr (Darwin) 
     76; 
     77;   * remove hard coding path 
     78;   * add graphviz 
     79;   * externalize function 
     80; 
    2981; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3082; 
     
    3385;- 
    3486pro fig2_timeline_diagram 
    35 @common 
    36 ;----------------------------------------------- 
     87 
     88@cm_tropflux 
     89 
    3790reinitplt, /z,/invert 
    3891key_portrait = 1 
     
    4093 
    4194openps, FILENAME = 'idl.ps' 
    42 ;------------------------------------------------------------ 
    43 ; partie a changer 
    44 ;------------------------------------------------------------ 
    45 ;; site locations 
    46  
     95 
     96; site locations 
    4797sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    4898           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
     
    56106          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    57107 
    58  
    59108nn=n_elements(sitelist) 
    60109date1=19890101 
     
    77126 
    78127    nsmooth=1. 
    79     read_lh, csite,date1,date2,nsmooth, $ 
    80                      lh 
    81  
    82     ind=where(finite(lh)) & lh(ind)=1. 
    83     ind=where(finite(lh,/nan)) & lh(ind)=0. 
     128    print, csite 
     129    print, date1 
     130    print, date2 
     131    read_lh, csite, date1, date2, nsmooth, lh 
     132 
     133    ind=where(finite(lh)) & lh[ind]=1. 
     134    ind=where(finite(lh,/nan)) & lh[ind]=0. 
    84135    no_obs_lh=no_obs_lh+lh 
    85136 
     
    113164 
    114165    nsmooth=1. 
    115     read_sw, csite, date1, date2, box, $ 
    116                            sw 
     166    read_sw, csite, date1, date2, box, sw 
    117167    swr=sw & ind=where(finite(swr)) & valid=n_elements(ind) 
    118168    if (valid ge 10) then begin 
    119        ind=where(finite(sw)) & sw(ind)=1. 
    120        ind=where(finite(sw,/nan)) & sw(ind)=0. 
     169       ind=where(finite(sw)) & sw[ind]=1. 
     170       ind=where(finite(sw,/nan)) & sw[ind]=0. 
    121171       no_obs_sw=no_obs_sw+sw 
    122172    endif 
     
    128178 
    129179nn=n_elements(sitelist) 
    130 date1=date1 
    131 date2=date2 
    132  
    133180 
    134181for n=0, nn-1 do begin 
     
    144191 
    145192    nsmooth=1. 
    146     read_lw, csite, date1, date2, box, $ 
    147                            lw 
     193    read_lw, csite, date1, date2, box, lw 
    148194    lwr=lw & ind=where(finite(lwr)) & valid=n_elements(ind) 
    149195    if (valid ge 10) then begin 
    150  
    151        ind=where(finite(lw)) &  lw(ind)=1. 
    152        ind=where(finite(lw,/nan)) & lw(ind)=0. 
     196       ind=where(finite(lw)) &  lw[ind]=1. 
     197       ind=where(finite(lw,/nan)) & lw[ind]=0. 
    153198       no_obs_lw=no_obs_lw+lw 
    154199    endif 
     
    163208pltt, no_obs_lw, "t",/ov1d, color=50 
    164209pltt, no_obs_lh, "t",/ov1d 
    165 ;------------------------------------------------------------ 
    166210closeps 
    167 fig='fig2_timeline_diagram.ps' 
    168 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    169 spawn, 'gv '+cpsdir+fig 
    170 ;------------------------------------------------------------ 
    171 return 
     211fig=tropflux_od_env + 'fig2_timeline_diagram.ps' 
     212spawn, 'mv '+psdir+'idl.ps '+fig 
     213spawn, 'gv '+fig 
    172214end 
    173  
    174  
    175 function x_site_location, site 
    176     n1=strpos(site, 's') 
    177 if (n1 gt -1) then begin 
    178     ns=-1. 
    179     x=strmid(site, 0, n1) 
    180     x=float(x)*ns 
    181 endif else begin 
    182     n1=strpos(site, 'n') 
    183     x=strmid(site, 0, n1) 
    184     ny=1. 
    185     x=float(x)*ny 
    186 endelse 
    187 return, float(x) 
    188 end 
    189 ;-------------------------------------------------------------------------- 
    190 function y_site_location, site 
    191     n1=strpos(site, 'e') 
    192 if (n1 gt -1) then begin 
    193     n=strpos(site, 's') 
    194     if (n gt -1) then begin 
    195         y=strmid(site, n+1, n1-n-1) 
    196     endif else begin 
    197         n=strpos(site, 'n') 
    198         y=strmid(site, n+1, n1-n-1) 
    199     endelse 
    200  
    201 endif else begin 
    202     n1=strpos(site, 'w') 
    203     n=strpos(site, 's') 
    204     if (n gt -1) then begin 
    205         y=strmid(site, n+1, n1-n-1) 
    206         y=180+(180-float(y)) 
    207     endif else begin 
    208         n=strpos(site, 'n') 
    209         y=strmid(site, n+1, n1-n-1) 
    210         y=180+(180-float(y)) 
    211    endelse 
    212 endelse 
    213 return,float(y) 
    214 end 
  • trunk/src/paper01/fig2/read_lh.pro

    r43 r44  
    11;+ 
    2 ; .. _read_lh.pro 
     2; .. _read_lh.pro: 
    33; 
    44; =========== 
     
    99; =========== 
    1010; 
     11; .. graphviz:: 
     12; 
     13;    digraph read_lh { 
     14;       graph [ 
     15;       rankdir="LR", 
     16;       ] 
     17;       qlat [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/qlat*_dy.cdf"]; 
     18; 
     19;       lh [shape=tab,fontname=Courier,label="lh"] 
     20; 
     21;       read_lh [shape=box, 
     22;       fontname=Courier, 
     23;       color=blue, 
     24;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/read_lh.pro", 
     25;       label="${TROPFLUX}/src/paper01/fig2/read_lh.pro"]; 
     26; 
     27;       {qlat} -> {read_lh} -> {lh} 
     28;    } 
     29; 
    1130; SEE ALSO 
    1231; ======== 
    1332; 
    1433; :ref:`tropflux_profile.sh` 
     34; :ref:`tropflux_init.pro` 
     35; :ref:`cm_tropflux.pro` 
     36; 
     37; :func:`time_lec` 
     38; 
     39; :ref:`fig2_timeline_diagram.pro` 
    1540; 
    1641; EXAMPLES 
     
    2045; 
    2146;  IDL> @tropflux_init 
    22 ;  IDL> csite=++ 
    23 ;  IDL> ++ 
     47;  IDL> csite='8s67e' 
     48;  IDL> date1=19890101L 
     49;  IDL> date2=20091231L 
     50;  IDL> nsmooth=1. 
    2451;  IDL> read_lh, csite, date1, date2, nsmooth, lh 
     52; 
     53; TODO 
     54; ==== 
     55; 
     56; coding rules 
    2557; 
    2658; EVOLUTIONS 
     
    2860; 
    2961; $Id$ 
     62; 
     63; - fplod 20110412T093201Z aedon.locean-ipsl.upmc.fr (Darwin) 
     64; 
     65;   * externalize function 
     66;   * remove hard coding path 
     67;   * add graphviz 
    3068; 
    3169; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    3674pro read_lh, csite, date1, date2, nsmooth, lh 
    3775; 
    38 @common 
     76@cm_tropflux 
    3977 
    40 dir='/Users/pkb/data/TPR/' 
    41 ; 
    4278;; DEFINE THE OUTPUT TIME AXIS 
    4379; 
     
    5591 
    5692;;LHF 
    57 fi=dir+'qlat'+csite+'_dy.cdf' 
     93fi=tropflux_id_env+'qlat'+csite+'_dy.cdf' 
    5894f=file_test(fi) 
    5995lh=fltarr(jpt)+!values.f_nan 
     
    66102  ind=where((tt0 ge -1e-5) and (tt0 le jpt-1+1e-5)) 
    67103  if (ind(0) ne -1) then begin 
    68   lh(tt0(ind))=lh0(ind) 
    69   lh_q(tt0(ind))=lh_q0(ind) 
     104     lh(tt0(ind))=lh0(ind) 
     105     lh_q(tt0(ind))=lh_q0(ind) 
    70106  endif 
    71 endif 
     107endif else begin 
     108  print, fi, ' not found' 
     109endelse 
    72110 
    73111ind=where(lh_q ne 1 and lh_q ne 2) 
     
    93131 
    94132end 
    95  
    96  
    97 function time_lec, fi 
    98 tt=ncdf_lec(fi,var='time') 
    99 fid=ncdf_open(fi) & vid=ncdf_varid(fid,'time') 
    100 ncdf_attget, fid,vid,'units',orig 
    101 orig=string(orig) 
    102 yy=long(strmid(orig,11,4)) 
    103 mm=long(strmid(orig,16,2)) 
    104 dd=long(strmid(orig,19,2)) 
    105 tt=julday(mm,dd,yy,12,00)+tt 
    106 return, tt 
    107 end 
  • trunk/src/paper01/fig2/read_lw.pro

    r43 r44  
    11;+ 
    2 ; .. _read_lw.pro 
     2; .. _read_lw.pro: 
    33; 
    44; =========== 
     
    99; =========== 
    1010; 
     11; .. graphviz:: 
     12; 
     13;    digraph read_lw { 
     14;       graph [ 
     15;       rankdir="LR", 
     16;       ] 
     17;       lwnet [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/lwnet*_dy.cdf"]; 
     18;       lw [shape=tab,fontname=Courier,label="lw"] 
     19; 
     20;       read_lw [shape=box, 
     21;       fontname=Courier, 
     22;       color=blue, 
     23;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/read_lw.pro", 
     24;       label="${TROPFLUX}/src/paper01/fig2/read_lw.pro"]; 
     25; 
     26;       {lwnet} -> {read_lw} -> {lw} 
     27;    } 
     28; 
     29; 
    1130; SEE ALSO 
    1231; ======== 
    1332; 
    1433; :ref:`tropflux_profile.sh` 
     34; 
     35; :func:`time_lec` 
     36; 
     37; :ref:`fig2_timeline_diagram.pro` 
    1538; 
    1639; EXAMPLES 
     
    2043; 
    2144;  IDL> @tropflux_init 
    22 ;  IDL> csite=++ 
    23 ;  IDL> ++ 
     45;  IDL> csite='8s67e' 
     46;  IDL> date1=19890101L 
     47;  IDL> date2=20091231L 
     48;  IDL> box=[ 249.500,250.500,-0.500000,0.500000] 
    2449;  IDL> read_lw, csite, date1, date2, box, lw 
     50; 
     51; TODO 
     52; ==== 
     53; 
     54; make it work with a file : now nsmooth pb 
     55; 
     56; confirm example parameters values 
    2557; 
    2658; EVOLUTIONS 
     
    2860; 
    2961; $Id$ 
     62; 
     63; - fplod 20110412T093250Z aedon.locean-ipsl.upmc.fr (Darwin) 
     64; 
     65;   * externalize function 
     66;   * remove hard coding path 
     67;   * add graphviz 
     68;   * remove "smooth" lines  (no nsmooth parameter here) 
    3069; 
    3170; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    3675pro read_lw, csite, date1, date2, box, lw 
    3776; 
    38 @common 
     77@cm_tropflux 
    3978 
    4079dir='/Users/pkb/data/TPR/' 
     
    5493 
    5594;; LWR 
    56 fi=dir+'lwnet'+csite+'_dy.cdf' 
     95fi=tropflux_id_env+'lwnet'+csite+'_dy.cdf' 
    5796f=file_test(fi) 
    5897lw=fltarr(jpt)+!values.f_nan 
     
    65104    lw(tt0(ind))=lw0(ind) 
    66105  endif 
    67 endif 
     106endif else begin 
     107  print, fi, ' not found' 
     108endelse 
    68109 
    69110 
     
    83124endfor 
    84125 
    85 nsmooth=nsmooth 
    86 lw=smooth(lw,nsmooth,/nan) 
     126;++nsmooth=nsmooth 
     127;++lw=smooth(lw,nsmooth,/nan) 
    87128 
    88129end 
    89  
    90  
    91 function time_lec, fi 
    92 tt=ncdf_lec(fi,var='time') 
    93 fid=ncdf_open(fi) & vid=ncdf_varid(fid,'time') 
    94 ncdf_attget, fid,vid,'units',orig 
    95 orig=string(orig) 
    96 yy=long(strmid(orig,11,4)) 
    97 mm=long(strmid(orig,16,2)) 
    98 dd=long(strmid(orig,19,2)) 
    99 tt=julday(mm,dd,yy,12,00)+tt 
    100 return, tt 
    101 end 
  • trunk/src/paper01/fig2/read_sw.pro

    r43 r44  
    11;+ 
    2 ; .. _read_sw.pro 
     2; 
     3; .. _read_sw.pro: 
    34; 
    45; =========== 
     
    910; =========== 
    1011; 
     12; .. graphviz:: 
     13; 
     14;    digraph read_sw { 
     15;       graph [ 
     16;       rankdir="LR", 
     17;       ] 
     18;       swnet [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/swnet*_dy.cdf"]; 
     19; 
     20;       sw [shape=tab,fontname=Courier,label="sw"] 
     21; 
     22;       read_sw [shape=box, 
     23;       fontname=Courier, 
     24;       color=blue, 
     25;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/read_sw.pro", 
     26;       label="${TROPFLUX}/src/paper01/fig2/read_sw.pro"]; 
     27; 
     28;       {swnet} -> {read_sw} -> {sw} 
     29;    } 
     30 
    1131; SEE ALSO 
    1232; ======== 
    1333; 
    1434; :ref:`tropflux_profile.sh` 
     35; 
     36: :func:`time_lec` 
     37; 
     38; :ref:`fig2_timeline_diagram.pro` 
    1539; 
    1640; EXAMPLES 
     
    2044; 
    2145;  IDL> @tropflux_init 
    22 ;  IDL> csite=++ 
    23 ;  IDL> ++ 
     46;  IDL> csite='8s67e' 
     47;  IDL> date1=19890101L 
     48;  IDL> date2=20091231L 
     49;  IDL> box=++ 
    2450;  IDL> read_sw, csite, date1, date2, box, sw 
     51; 
     52; TODO 
     53; ==== 
     54; 
     55; make it work with a file  
     56; 
    2557; 
    2658; EVOLUTIONS 
     
    2860; 
    2961; $Id$ 
     62; 
     63; - fplod 20110412T093325Z aedon.locean-ipsl.upmc.fr (Darwin) 
     64; 
     65;   * externalize function 
     66;   * remove hard coding path 
     67;   * add graphviz 
     68;   * remove smooth call (unreacheable statement after end !!) 
    3069; 
    3170; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    3675pro read_sw, csite, date1, date2, box, sw 
    3776; 
    38 @common 
    39  
    40 dir='/Users/pkb/data/TPR/' 
    41  
     77@cm_tropflux 
    4278; 
    4379;; DEFINE THE OUTPUT TIME AXIS 
     
    5591 
    5692;; SWR 
    57 fi=dir+'swnet'+csite+'_dy.cdf' 
     93fi=tropflux_id_env+'swnet'+csite+'_dy.cdf' 
    5894f=file_test(fi) 
    5995sw=fltarr(jpt)+!values.f_nan    ;; swr 
     
    70106    sw_q(tt0(ind))=sw_q0(ind) 
    71107  endif 
    72 endif 
     108endif else begin  
     109  print, fi, ' not found' 
     110endelse 
    73111 
    74112ind1=where((sw_q ne 1) and (sw_q ne 2)) 
     
    90128  r=execute(com) 
    91129endfor 
     130 
    92131end 
    93132 
    94 nsmooth=nsmooth 
    95 sw=smooth(sw,nsmooth,/nan) 
    96  
    97  
    98  
    99 function time_lec, fi 
    100 tt=ncdf_lec(fi,var='time') 
    101 fid=ncdf_open(fi) & vid=ncdf_varid(fid,'time') 
    102 ncdf_attget, fid,vid,'units',orig 
    103 orig=string(orig) 
    104 yy=long(strmid(orig,11,4)) 
    105 mm=long(strmid(orig,16,2)) 
    106 dd=long(strmid(orig,19,2)) 
    107 tt=julday(mm,dd,yy,12,00)+tt 
    108 return, tt 
    109 end 
  • trunk/src/paper01/fig2/time_lec.pro

    r43 r44  
    11;+ 
    2 ; .. _read_lh.pro 
     2;  
     3; ============ 
     4; time_lec.pro 
     5; ============ 
     6;  
     7; .. function:: time_lec(fi) 
    38; 
    4 ; =========== 
    5 ; read_lh.pro 
    6 ; =========== 
    7 ; 
    8 ; DESCRIPTION 
    9 ; =========== 
    10 ; 
    11 ; SEE ALSO 
    12 ; ======== 
    13 ; 
    14 ; :ref:`tropflux_profile.sh` 
     9;     :param fi: file  
    1510; 
    1611; EXAMPLES 
     
    1914; :: 
    2015; 
    21 ;  IDL> @tropflux_init 
    22 ;  IDL> csite=++ 
    23 ;  IDL> ++ 
    24 ;  IDL> read_lh, csite, date1, date2, nsmooth, lh 
     16;    IDL> fi=++ 
     17;    IDL> result=time_lec(fi) 
     18; 
     19; SEE ALSO 
     20; ======== 
     21; 
     22; :ref:`read_lh.pro` 
     23; :ref:`read_lw.pro` 
     24; :ref:`read_sw.pro` 
     25; 
     26; TODO 
     27; ==== 
     28; 
     29; complete header 
     30; 
     31; coding rules 
    2532; 
    2633; EVOLUTIONS 
     
    2936; $Id$ 
    3037; 
    31 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
     38; - fplod 20110412T160108Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3239; 
     40;   * externalized from read_lh.pro 
    3341;   * minimal header 
    3442; 
    3543;- 
    36 pro read_lh, csite, date1, date2, nsmooth, lh 
    37 ; 
    38 @common 
    39  
    40 dir='/Users/pkb/data/TPR/' 
    41 ; 
    42 ;; DEFINE THE OUTPUT TIME AXIS 
    43 ; 
    44 jda1=date2jul(date1) 
    45 jda2=date2jul(date2) 
    46 jpt=(jda2-jda1+1l) 
    47 time=jda1+dindgen(jpt) 
    48  
    49 ; 
    50 ;; FIRST READ ALL DATA FROM SITE 
    51 ;;   - if file exists, extract correct time axis 
    52 ;;   - if not, fill variable with missing values 
    53 ; 
    54  
    55  
    56 ;;LHF 
    57 fi=dir+'qlat'+csite+'_dy.cdf' 
    58 f=file_test(fi) 
    59 lh=fltarr(jpt)+!values.f_nan 
    60 lh_q=fltarr(jpt)+!values.f_nan 
    61 if (f) then begin 
    62   tt0=time_lec(fi) 
    63   lh0=ncdf_lec(fi,var='QL_137') 
    64   lh_q0=ncdf_lec(fi,var='QQL_5137') 
    65   tt0=tt0-time(0) 
    66   ind=where((tt0 ge -1e-5) and (tt0 le jpt-1+1e-5)) 
    67   if (ind(0) ne -1) then begin 
    68   lh(tt0(ind))=lh0(ind) 
    69   lh_q(tt0(ind))=lh_q0(ind) 
    70   endif 
    71 endif 
    72  
    73 ind=where(lh_q ne 1 and lh_q ne 2) 
    74  
    75  
    76 if (ind(0) ne -1) then begin 
    77   lh(ind)=!Values.f_nan 
    78 endif 
    79 ; 
    80 ;; Replace missing values by "NaN" 
    81 ; 
    82 tsvars=['lh'] 
    83 vars=[tsvars] 
    84 nn=n_elements(vars) 
    85 for n=0,nn-1 do begin 
    86   var=vars(n) 
    87   com='ind=where('+var+' ge 1.e20) & if (ind(0) ne -1) then '+var+'(ind)=!values.f_nan' 
    88   r=execute(com) 
    89 endfor 
    90  
    91 nsmooth=nsmooth 
    92 lh=smooth(lh,nsmooth,/nan) 
    93  
    94 end 
    95  
    96  
    9744function time_lec, fi 
    9845tt=ncdf_lec(fi,var='time') 
  • trunk/src/paper01/fig2/x_site_location.pro

    r43 r44  
    11;+ 
    2 ; .. _fig2_timeline_diagram.pro: 
    32; 
    4 ; ========================= 
    5 ; fig2_timeline_diagram.pro 
    6 ; ========================= 
     3; =================== 
     4; x_site_location.pro 
     5; =================== 
    76; 
    8 ; DESCRIPTION 
     7; .. function:: x_site_location(site) 
     8; 
     9; DESCRITPION 
    910; =========== 
     11; 
     12;     :param site: ++ 
     13; EXAMPLES 
     14; ======== 
     15; 
     16; :: 
     17;  
     18;   IDL> site=++ 
     19;   IDL> result=x_site_location(site) 
    1020; 
    1121; SEE ALSO 
    1222; ======== 
    1323; 
    14 ; :ref:`tropflux_profile.sh` 
     24; :ref:`fig2_timeline_diagram.pro` 
    1525; 
    16 ; EXAMPLES 
    17 ; ======== 
     26; TODO 
     27; ==== 
    1828; 
    19 ; :: 
    20 ; 
    21 ;  IDL> @tropflux_init 
    22 ;  IDL> fig2_timeline_diagram 
    23 ; 
     29; coding rules 
     30;  
    2431; EVOLUTIONS 
    2532; ========== 
     
    2734; $Id$ 
    2835; 
    29 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    30 ; 
    31 ;   * minimal header 
     36; - fplod 20110412T083358Z aedon.locean-ipsl.upmc.fr (Darwin) 
     37;  
     38;   * creation from fig2_timeline_diagram.pro 
    3239; 
    3340;- 
    34 pro fig2_timeline_diagram 
    35 @common 
    36 ;----------------------------------------------- 
    37 reinitplt, /z,/invert 
    38 key_portrait = 1 
    39 coefpalit=.9 
     41function x_site_location, site 
    4042 
    41 openps, FILENAME = 'idl.ps' 
    42 ;------------------------------------------------------------ 
    43 ; partie a changer 
    44 ;------------------------------------------------------------ 
    45 ;; site locations 
    46  
    47 sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    48            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
    49            '8s165e', '8s180w',  '8s155w', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $ 
    50           '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $ 
    51           '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $ 
    52           '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $ 
    53           '2n95w', '5n147e', '5n156e', '5n165e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $ 
    54           '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $ 
    55           '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    56           '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    57  
    58  
    59 nn=n_elements(sitelist) 
    60 date1=19890101 
    61 date2=20091231 
    62  
    63 no_obs_lh=findgen(7670.)*0. 
    64 no_obs_lw=findgen(7670.)*0. 
    65 no_obs_sw=findgen(7670.)*0. 
    66  
    67 for n=0, nn-1 do begin 
    68  
    69 ;; reading data from mooring 
    70  
    71     site=sitelist(n) & csite=site 
    72     print, csite 
    73     x=x_site_location(site) 
    74     y=y_site_location(site) 
    75     if (y ge 0. and y le 30.) then y=y+360. 
    76     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    77  
    78     nsmooth=1. 
    79     read_lh, csite,date1,date2,nsmooth, $ 
    80                      lh 
    81  
    82     ind=where(finite(lh)) & lh(ind)=1. 
    83     ind=where(finite(lh,/nan)) & lh(ind)=0. 
    84     no_obs_lh=no_obs_lh+lh 
    85  
    86 endfor 
    87  
    88 sitelist=['5n165e','8s67e','12s55e', '8s55e', '8s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    89            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
    90            '8s165e', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $ 
    91           '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $ 
    92           '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $ 
    93           '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $ 
    94           '2n95w', '5n147e', '5n156e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $ 
    95           '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $ 
    96           '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    97           '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    98  
    99 nn=n_elements(sitelist) 
    100 date1=date1 
    101 date2=date2 
    102  
    103 for n=0, nn-1 do begin 
    104  
    105 ;; reading data from mooring 
    106  
    107     site=sitelist(n) & csite=site 
    108     print, csite 
    109     x=x_site_location(site) 
    110     y=y_site_location(site) 
    111     if (y ge 0. and y le 30.) then y=y+360. 
    112     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    113  
    114     nsmooth=1. 
    115     read_sw, csite, date1, date2, box, $ 
    116                            sw 
    117     swr=sw & ind=where(finite(swr)) & valid=n_elements(ind) 
    118     if (valid ge 10) then begin 
    119        ind=where(finite(sw)) & sw(ind)=1. 
    120        ind=where(finite(sw,/nan)) & sw(ind)=0. 
    121        no_obs_sw=no_obs_sw+sw 
    122     endif 
    123 endfor 
    124 help, no_obs_sw 
    125  
    126 sitelist=['0n110w', '0n140w', '0n165e', '0n170w', '0n23w', '0n80.5e', '0n95w', '10s10w', '12n23w', '15n38w', $ 
    127           '15n90e', '2n95w', '2s95w', '5n95w', '5s95w', '8n95w', '8s67e', '8s95w'] 
    128  
    129 nn=n_elements(sitelist) 
    130 date1=date1 
    131 date2=date2 
    132  
    133  
    134 for n=0, nn-1 do begin 
    135  
    136 ;; reading data from mooring 
    137  
    138     site=sitelist(n) & csite=site 
    139     print, csite 
    140     x=x_site_location(site) 
    141     y=y_site_location(site) 
    142     if (y ge 0. and y le 30.) then y=y+360. 
    143     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    144  
    145     nsmooth=1. 
    146     read_lw, csite, date1, date2, box, $ 
    147                            lw 
    148     lwr=lw & ind=where(finite(lwr)) & valid=n_elements(ind) 
    149     if (valid ge 10) then begin 
    150  
    151        ind=where(finite(lw)) &  lw(ind)=1. 
    152        ind=where(finite(lw,/nan)) & lw(ind)=0. 
    153        no_obs_lw=no_obs_lw+lw 
    154     endif 
    155  
    156 endfor 
    157  
    158 help,no_obs_lw 
    159 pltt, no_obs_lh, "t", small=[1,3,1],/rempl,0,80, $ 
    160      title='No of valid observations for turbulent flux validation', charsize=1., $ 
    161      ytitle="No. of observations",subtitle='black(turbulent), red(SWR), blue(LWR)' 
    162 pltt, no_obs_sw, "t",/ov1d, color=250 
    163 pltt, no_obs_lw, "t",/ov1d, color=50 
    164 pltt, no_obs_lh, "t",/ov1d 
    165 ;------------------------------------------------------------ 
    166 closeps 
    167 fig='fig2_timeline_diagram.ps' 
    168 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    169 spawn, 'gv '+cpsdir+fig 
    170 ;------------------------------------------------------------ 
    171 return 
    172 end 
    173  
    174  
    175 function x_site_location, site 
    176     n1=strpos(site, 's') 
     43n1=strpos(site, 's') 
    17744if (n1 gt -1) then begin 
    17845    ns=-1. 
     
    18754return, float(x) 
    18855end 
    189 ;-------------------------------------------------------------------------- 
    190 function y_site_location, site 
    191     n1=strpos(site, 'e') 
    192 if (n1 gt -1) then begin 
    193     n=strpos(site, 's') 
    194     if (n gt -1) then begin 
    195         y=strmid(site, n+1, n1-n-1) 
    196     endif else begin 
    197         n=strpos(site, 'n') 
    198         y=strmid(site, n+1, n1-n-1) 
    199     endelse 
    200  
    201 endif else begin 
    202     n1=strpos(site, 'w') 
    203     n=strpos(site, 's') 
    204     if (n gt -1) then begin 
    205         y=strmid(site, n+1, n1-n-1) 
    206         y=180+(180-float(y)) 
    207     endif else begin 
    208         n=strpos(site, 'n') 
    209         y=strmid(site, n+1, n1-n-1) 
    210         y=180+(180-float(y)) 
    211    endelse 
    212 endelse 
    213 return,float(y) 
    214 end 
  • trunk/src/paper01/fig2/y_site_location.pro

    r43 r44  
    11;+ 
    2 ; .. _fig2_timeline_diagram.pro: 
    32; 
    4 ; ========================= 
    5 ; fig2_timeline_diagram.pro 
    6 ; ========================= 
     3; =================== 
     4; y_site_location.pro 
     5; =================== 
    76; 
    8 ; DESCRIPTION 
     7; .. function:: y_site_location(site) 
     8; 
     9; DESCRITPION 
    910; =========== 
    1011; 
    11 ; SEE ALSO 
    12 ; ======== 
    13 ; 
    14 ; :ref:`tropflux_profile.sh` 
     12;     :param site: ++ 
    1513; 
    1614; EXAMPLES 
     
    1816; 
    1917; :: 
     18;  
     19;   IDL> site=++ 
     20;   IDL> result=y_site_location(site) 
    2021; 
    21 ;  IDL> @tropflux_init 
    22 ;  IDL> fig2_timeline_diagram 
     22; SEE ALSO 
     23; ======== 
    2324; 
     25; :ref:`fig2_timeline_diagram.pro` 
     26; 
     27; TODO 
     28; ==== 
     29; 
     30; coding rules 
     31;  
    2432; EVOLUTIONS 
    2533; ========== 
     
    2735; $Id$ 
    2836; 
    29 ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    30 ; 
    31 ;   * minimal header 
     37; - fplod 20110412T083358Z aedon.locean-ipsl.upmc.fr (Darwin) 
     38;  
     39;   * creation from fig2_timeline_diagram.pro 
    3240; 
    3341;- 
    34 pro fig2_timeline_diagram 
    35 @common 
    36 ;----------------------------------------------- 
    37 reinitplt, /z,/invert 
    38 key_portrait = 1 
    39 coefpalit=.9 
    40  
    41 openps, FILENAME = 'idl.ps' 
    42 ;------------------------------------------------------------ 
    43 ; partie a changer 
    44 ;------------------------------------------------------------ 
    45 ;; site locations 
    46  
    47 sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    48            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
    49            '8s165e', '8s180w',  '8s155w', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $ 
    50           '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $ 
    51           '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $ 
    52           '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $ 
    53           '2n95w', '5n147e', '5n156e', '5n165e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $ 
    54           '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $ 
    55           '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    56           '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    57  
    58  
    59 nn=n_elements(sitelist) 
    60 date1=19890101 
    61 date2=20091231 
    62  
    63 no_obs_lh=findgen(7670.)*0. 
    64 no_obs_lw=findgen(7670.)*0. 
    65 no_obs_sw=findgen(7670.)*0. 
    66  
    67 for n=0, nn-1 do begin 
    68  
    69 ;; reading data from mooring 
    70  
    71     site=sitelist(n) & csite=site 
    72     print, csite 
    73     x=x_site_location(site) 
    74     y=y_site_location(site) 
    75     if (y ge 0. and y le 30.) then y=y+360. 
    76     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    77  
    78     nsmooth=1. 
    79     read_lh, csite,date1,date2,nsmooth, $ 
    80                      lh 
    81  
    82     ind=where(finite(lh)) & lh(ind)=1. 
    83     ind=where(finite(lh,/nan)) & lh(ind)=0. 
    84     no_obs_lh=no_obs_lh+lh 
    85  
    86 endfor 
    87  
    88 sitelist=['5n165e','8s67e','12s55e', '8s55e', '8s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    89            '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
    90            '8s165e', '8s125w', '8s110w', '8s95w',  '5s156e', '5s165e', '5s180w', '5s170w', $ 
    91           '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $ 
    92           '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $ 
    93           '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $ 
    94           '2n95w', '5n147e', '5n156e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $ 
    95           '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $ 
    96           '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    97           '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    98  
    99 nn=n_elements(sitelist) 
    100 date1=date1 
    101 date2=date2 
    102  
    103 for n=0, nn-1 do begin 
    104  
    105 ;; reading data from mooring 
    106  
    107     site=sitelist(n) & csite=site 
    108     print, csite 
    109     x=x_site_location(site) 
    110     y=y_site_location(site) 
    111     if (y ge 0. and y le 30.) then y=y+360. 
    112     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    113  
    114     nsmooth=1. 
    115     read_sw, csite, date1, date2, box, $ 
    116                            sw 
    117     swr=sw & ind=where(finite(swr)) & valid=n_elements(ind) 
    118     if (valid ge 10) then begin 
    119        ind=where(finite(sw)) & sw(ind)=1. 
    120        ind=where(finite(sw,/nan)) & sw(ind)=0. 
    121        no_obs_sw=no_obs_sw+sw 
    122     endif 
    123 endfor 
    124 help, no_obs_sw 
    125  
    126 sitelist=['0n110w', '0n140w', '0n165e', '0n170w', '0n23w', '0n80.5e', '0n95w', '10s10w', '12n23w', '15n38w', $ 
    127           '15n90e', '2n95w', '2s95w', '5n95w', '5s95w', '8n95w', '8s67e', '8s95w'] 
    128  
    129 nn=n_elements(sitelist) 
    130 date1=date1 
    131 date2=date2 
    132  
    133  
    134 for n=0, nn-1 do begin 
    135  
    136 ;; reading data from mooring 
    137  
    138     site=sitelist(n) & csite=site 
    139     print, csite 
    140     x=x_site_location(site) 
    141     y=y_site_location(site) 
    142     if (y ge 0. and y le 30.) then y=y+360. 
    143     dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 
    144  
    145     nsmooth=1. 
    146     read_lw, csite, date1, date2, box, $ 
    147                            lw 
    148     lwr=lw & ind=where(finite(lwr)) & valid=n_elements(ind) 
    149     if (valid ge 10) then begin 
    150  
    151        ind=where(finite(lw)) &  lw(ind)=1. 
    152        ind=where(finite(lw,/nan)) & lw(ind)=0. 
    153        no_obs_lw=no_obs_lw+lw 
    154     endif 
    155  
    156 endfor 
    157  
    158 help,no_obs_lw 
    159 pltt, no_obs_lh, "t", small=[1,3,1],/rempl,0,80, $ 
    160      title='No of valid observations for turbulent flux validation', charsize=1., $ 
    161      ytitle="No. of observations",subtitle='black(turbulent), red(SWR), blue(LWR)' 
    162 pltt, no_obs_sw, "t",/ov1d, color=250 
    163 pltt, no_obs_lw, "t",/ov1d, color=50 
    164 pltt, no_obs_lh, "t",/ov1d 
    165 ;------------------------------------------------------------ 
    166 closeps 
    167 fig='fig2_timeline_diagram.ps' 
    168 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    169 spawn, 'gv '+cpsdir+fig 
    170 ;------------------------------------------------------------ 
    171 return 
    172 end 
    173  
    174  
    175 function x_site_location, site 
    176     n1=strpos(site, 's') 
    177 if (n1 gt -1) then begin 
    178     ns=-1. 
    179     x=strmid(site, 0, n1) 
    180     x=float(x)*ns 
    181 endif else begin 
    182     n1=strpos(site, 'n') 
    183     x=strmid(site, 0, n1) 
    184     ny=1. 
    185     x=float(x)*ny 
    186 endelse 
    187 return, float(x) 
    188 end 
    189 ;-------------------------------------------------------------------------- 
    19042function y_site_location, site 
    191     n1=strpos(site, 'e') 
     43n1=strpos(site, 'e') 
    19244if (n1 gt -1) then begin 
    19345    n=strpos(site, 's') 
     
    19850        y=strmid(site, n+1, n1-n-1) 
    19951    endelse 
    200  
    20152endif else begin 
    20253    n1=strpos(site, 'w') 
  • trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro

    r43 r44  
    11;+ 
    2 ; _air_validation_scatter_2000_2009_v50.pro: 
     2; 
     3; .. _air_validation_scatter_2000_2009_v50.pro: 
    34; 
    45; ======================================== 
     
    910; =========== 
    1011; 
     12; .. graphviz:: 
     13; 
     14;    digraph air_validation_scatter_2000_2009_v50 { 
     15;       graph [ 
     16;       rankdir="LR", 
     17;       ] 
     18; 
     19;       air_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_erai_v50.txt"]; 
     20; 
     21;       air_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_trop_v50.txt"]; 
     22;       air_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_oaflx_v50.txt"]; 
     23;       air_ncep  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep_v50.txt"]; 
     24;       air_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep1_v50.txt"]; 
     25;       air_ncep2 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2000_2009_ncep2_v50.txt"]; 
     26;       air_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/air_2m_ncep2_oafluxgrid_19890101_20091231.nc"]; 
     27; 
     28;       t2m_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/t2m_ncep1_19890101_20091231.nc"]; 
     29;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/air_validation_scatter_2000_2009_v50.ps"]; 
     30; 
     31;       erai_t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc"]; 
     32; 
     33;       tropflux_t2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_t2m_19890101_20091231_v50.nc"]; 
     34;      
     35;       oaflux_basic [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/OAFlux_basic_variables_1985_2009.nc"]; 
     36; 
     37;       air_validation_scatter_2000_2009_v50 [shape=box, 
     38;       fontname=Courier, 
     39;       color=blue, 
     40;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro", 
     41;       label="${TROPFLUX}/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro"]; 
     42; 
     43;       {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} 
     44; 
     45;    } 
     46; 
    1147; SEE ALSO 
    1248; ======== 
     
    1450; :ref:`tropflux_profile.sh` 
    1551; 
     52; :ref:`read_variables_v2.pro` 
     53; 
    1654; EXAMPLES 
    1755; ======== 
     
    2058; 
    2159;  IDL> @tropflux_init 
    22 ;  IDL> date1=++ 
    23 ;  IDL> date2=++ 
     60;  IDL> date1=20001001L 
     61;  IDL> date2=20091231L 
    2462;  IDL> air_validation_scatter_2000_2009_v50, date1, date2 
    2563; 
     64; TODO 
     65; ==== 
     66; 
     67; make it work (missing data) 
     68; 
     69; Praveen confirm date selection 
     70; 
     71; coding rules 
     72; 
     73; get rid of spwan 
     74; 
     75; complete description 
     76; 
     77; externalize function 
     78; 
     79; handle IO error 
    2680; 
    2781; EVOLUTIONS 
     
    3084; $Id$ 
    3185; 
     86; - fplod 20110412T101323Z aedon.locean-ipsl.upmc.fr (Darwin) 
     87; 
     88;   * remove hard coding path 
     89;   * add graphviz 
     90; 
    3291; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3392; 
     
    3594; 
    3695;- 
    37  
    3896pro air_validation_scatter_2000_2009_v50, date1, date2 
    39 @common 
     97 
     98@cm_tropflux 
    4099 
    41100reinitplt, /z,/invert 
     
    68127close,/all 
    69128 
    70 fi_air_erai='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_erai_v50.txt' 
     129fi_air_erai=tropflux_id_env+'air_2000_2009_erai_v50.txt' 
    71130openw,1,fi_air_erai 
    72 fi_air_trop='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_trop_v50.txt' 
     131fi_air_trop=tropflux_id_env+'air_2000_2009_trop_v50.txt' 
    73132openw,2,fi_air_trop 
    74 fi_air_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_oaflx_v50.txt' 
     133fi_air_oaflx=tropflux_id_env+'air_2000_2009_oaflx_v50.txt' 
    75134openw,3,fi_air_oaflx 
    76 fi_air_ncep2='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep2_v50.txt' 
     135fi_air_ncep2=tropflux_id_env+'air_2000_2009_ncep2_v50.txt' 
    77136openw,4,fi_air_ncep2 
    78 fi_air_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep1_v50.txt' 
     137fi_air_ncep1=tropflux_id_env+'air_2000_2009_ncep1_v50.txt' 
    79138openw,5,fi_air_ncep1 
    80139 
     
    88147;; first reading the whole ERAI uncorrected and corrected data 
    89148 
    90 file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_t2m_19890101_20091231_oafluxgrid.nc' 
     149file=tropflux_id_env+'erai_t2m_19890101_20091231_oafluxgrid.nc' 
    91150initncdf, file 
    92151unc=read_ncdf('t2m',date1,date2,file=file,/nostr) & unc=unc-273.15 
     
    94153 
    95154;file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_t2m_19890101_20091231_v3.nc' 
    96 file='/Users/pkb/data/TropFlux/TropFlux_t2m_19890101_20091231_v50.nc' 
     155file=tropflux_id_env+'TropFlux_t2m_19890101_20091231_v50.nc' 
    97156initncdf, file 
    98157cor=read_ncdf('t2m',date1,date2,file=file,/nostr) & cor=cor-273.15 
    99158help, cor 
    100159 
    101 file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc' 
     160file=tropflux_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    102161initncdf, file 
    103162oaf=read_ncdf("air", date1, date2, file=file,/nostr) 
    104163help, oaf 
    105164 
    106 fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/air_2m_ncep2_oafluxgrid_19890101_20091231.nc' 
     165fi=tropflux_id_env+'air_2m_ncep2_oafluxgrid_19890101_20091231.nc' 
    107166initncdf, fi 
    108167nce=read_ncdf("air", date1-1, date2, file=fi,/nostr) 
     
    110169help, nce 
    111170 
    112 file='/Volumes/Iomega_HDD/flux_reconstruction/ncep/t2m_ncep1_19890101_20091231.nc' 
     171file=tropflux_id_env+'t2m_ncep1_19890101_20091231.nc' 
    113172initncdf, file 
    114173nce1=read_ncdf("t2m", date1, date2, file=file,/nostr) 
     
    187246close,/all 
    188247 
    189 fi_air_erai='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_erai_v50.txt' 
     248fi_air_erai=tropflux_id_env+'air_2000_2009_erai_v50.txt' 
    190249res=read_ascii(fi_air_erai,data_start=1) 
    191250ff=res.field1 
     
    213272oplot, mean_tao, yfit, color=250, thick=2 
    214273 
    215 fi_air_trop='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_trop_v50.txt' 
     274fi_air_trop=tropflux_id_env+'air_2000_2009_trop_v50.txt' 
    216275res=read_ascii(fi_air_trop,data_start=1) 
    217276ff=res.field1 
     
    240299oplot, mean_tao, yfit, color=250, thick=2 
    241300 
    242 fi_air_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_oaflx_v50.txt' 
     301fi_air_oaflx=tropflux_id_env+'air_2000_2009_oaflx_v50.txt' 
    243302res=read_ascii(fi_air_oaflx,data_start=1) 
    244303ff=res.field1 
     
    269328 
    270329 
    271 fi_air_ncep='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep_v50.txt' 
     330fi_air_ncep=tropflux_id_env+'air_2000_2009_ncep_v50.txt' 
    272331res=read_ascii(fi_air_ncep,data_start=1) 
    273332ff=res.field1 
     
    296355oplot, mean_tao, yfit, color=250, thick=2 
    297356 
    298 fi_air_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/air_2000_2009_ncep1_v50.txt' 
     357fi_air_ncep1=tropflux_id_env+'air_2000_2009_ncep1_v50.txt' 
    299358res=read_ascii(fi_air_ncep1,data_start=1) 
    300359ff=res.field1 
     
    325384closeps 
    326385 
    327 fig='air_validation_scatter_2000_2009_v50.ps' 
    328 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    329 spawn, 'gv '+cpsdir+fig 
     386fig=tropflux_od_env+'air_validation_scatter_2000_2009_v50.ps' 
     387spawn, 'mv '+psdir+'idl.ps '+fig 
     388spawn, 'gv '+fig 
    330389return 
    331390end 
  • trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro

    r43 r44  
    11;+ 
    2 ; .. _q2m_validation_scatter_2000_2009_v50.pro 
     2; 
     3; .. _q2m_validation_scatter_2000_2009_v50.pro: 
    34; 
    45; ======================================== 
     
    910; =========== 
    1011; 
     12; .. graphviz:: 
     13; 
     14;    digraph q2m_validation_scatter_2000_2009_v50 { 
     15;       graph [ 
     16;       rankdir="LR", 
     17;       ] 
     18; 
     19;       q2m_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_erai_v50.txt"]; 
     20; 
     21;       q2m_trop [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_trop_v50.txt"]; 
     22;       q2m_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_oaflx_v50.txt"]; 
     23;       q2m_ncep  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_ncep_v50.txt"]; 
     24;       q2m_ncep1  [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/q2m_2000_2009_ncep1_v50.txt"]; 
     25; 
     26;       erai_q2m_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/erai_t2m_19890101_20091231_oafluxgrid.nc"]; 
     27; 
     28;       tropflux_q2m [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/TropFlux_q2m_19890101_20091231_v50.nc"]; 
     29; 
     30;       oaflux_basic [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/OAFlux_basic_variables_1985_2009.nc"]; 
     31; 
     32;       sphum_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sphum_ncep2_oafluxgrid_19890101_20091231.nc"]; 
     33; 
     34;       q2m_validation_scatter_2000_2009_v50 [shape=box, 
     35;       fontname=Courier, 
     36;       color=blue, 
     37;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro", 
     38;       label="${TROPFLUX}/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro"]; 
     39; 
     40;       figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/q2m_validation_scatter_2000_2009_v50.ps"]; 
     41; 
     42;       {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} 
     43; 
     44;     } 
     45; 
    1146; SEE ALSO 
    1247; ======== 
     
    2055; 
    2156;  IDL> @tropflux_init 
    22 ;  IDL> date1=++ 
    23 ;  IDL> date2=++ 
     57;  IDL> date1=20001001L 
     58;  IDL> date2=20091231L 
    2459;  IDL> q2m_validation_scatter_2000_2009_v50, date1, date2 
     60; 
     61; TODO 
     62; ==== 
     63; 
     64; make it work (missing data) 
     65; 
     66; Praveen confirm date selection 
     67; 
     68; coding rules 
     69; 
     70; get rid of spwan 
     71; 
     72; complete description 
     73; 
     74; externalize function 
     75; 
     76; handle IO error 
    2577; 
    2678; EVOLUTIONS 
     
    2981; $Id$ 
    3082; 
     83; - fplod 20110412T104125Z aedon.locean-ipsl.upmc.fr (Darwin) 
     84; 
     85;   * remove hard coding path 
     86;   * add graphviz 
     87; 
    3188; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3289; 
     
    3592;- 
    3693pro q2m_validation_scatter_2000_2009_v50, date1, date2 
    37 @common 
     94 
     95@cm_tropflux 
    3896 
    3997reinitplt, /z,/invert 
     
    66124close,/all 
    67125 
    68 fi_q2m_erai='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_erai_v50.txt' 
     126fi_q2m_erai='tropflux_id_env+'q2m_2000_2009_erai_v50.txt' 
    69127openw,1,fi_q2m_erai 
    70 fi_q2m_trop='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_trop_v50.txt' 
     128fi_q2m_trop='tropflux_id_env+'q2m_2000_2009_trop_v50.txt' 
    71129openw,2,fi_q2m_trop 
    72 fi_q2m_oaflx='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_oaflx_v50.txt' 
     130fi_q2m_oaflx='tropflux_id_env+'q2m_2000_2009_oaflx_v50.txt' 
    73131openw,3,fi_q2m_oaflx 
    74 fi_q2m_ncep='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep_v50.txt' 
     132fi_q2m_ncep='tropflux_id_env+'q2m_2000_2009_ncep_v50.txt' 
    75133openw,4,fi_q2m_ncep 
    76 fi_q2m_ncep1='/Users/pkb/work/MY_SAXO/flux_automat/q2m_2000_2009_ncep1_v50.txt' 
     134fi_q2m_ncep1='tropflux_id_env+'q2m_2000_2009_ncep1_v50.txt' 
    77135openw,5,fi_q2m_ncep1 
    78136 
     
    86144;; first reading the whole ERAI uncorrected and corrected data 
    87145 
    88 file='/Volumes/Iomega_HDD/TropFlux/input_uncor/erai_q2m_19890101_20091231_oafluxgrid.nc' 
     146file=tropflux_id_env+'erai_q2m_19890101_20091231_oafluxgrid.nc' 
    89147initncdf, file 
    90148unc=read_ncdf('q2m',date1,date2,file=file,/nostr) 
    91149help, unc 
    92150 
    93 file='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_q2m_19890101_20091231_v20.nc' 
     151file=tropflux_id_env+'TropFlux_q2m_19890101_20091231_v20.nc' 
    94152initncdf, file 
    95153cor=read_ncdf('q2m',date1,date2,file=file,/nostr) 
    96154help, cor 
    97155 
    98 file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/OAFlux_basic_variables_1985_2009.nc' 
     156file=tropflux_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    99157initncdf, file 
    100158oaf=read_ncdf("sphum", date1, date2, file=file,/nostr) 
    101159help, oaf 
    102160 
    103 fi='/Volumes/Iomega_HDD/flux_reconstruction/ncep2/sphum_ncep2_oafluxgrid_19890101_20091231.nc' 
     161fi=tropflux_id_env+'sphum_ncep2_oafluxgrid_19890101_20091231.nc' 
    104162initncdf, fi 
    105163nce=read_ncdf("shum", date1-1, date2, file=fi,/nostr) 
     
    320378closeps 
    321379 
    322 fig='q2m_validation_scatter_2000_2009_v50.ps' 
    323 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    324 spawn, 'gv '+cpsdir+fig 
    325 return 
     380fig=tropflux_od_env+'q2m_validation_scatter_2000_2009_v50.ps' 
     381spawn, 'mv '+psdir+'idl.ps '+fig 
     382spawn, 'gv '+fig 
    326383end 
     384 
    327385function x_site_location, site 
    328386    n1=strpos(site, 's') 
  • trunk/src/paper01/fig3/read_variables_v2.pro

    r43 r44  
    11;+ 
    2 ; .. _read_variables_v2.pro 
     2; 
     3; .. _read_variables_v2.pro: 
    34; 
    45; ===================== 
     
    910; =========== 
    1011; 
     12; .. graphviz:: 
     13; 
     14;    digraph read_variables_v2 { 
     15;       graph [ 
     16;       rankdir="LR", 
     17;       ] 
     18;       rad [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/rad*_dy.cdf"]; 
     19;       qlat[shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/qlat*_dy.cdf"]; 
     20;       pos[shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/pos*_dy.cdf"]; 
     21;       met[shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/met*_dy.cdf"]; 
     22; 
     23;       at [shape=tab,fontname=Courier,label="at"] 
     24;       sw [shape=tab,fontname=Courier,label="sw"] 
     25;       rh [shape=tab,fontname=Courier,label="rh"] 
     26;       sst [shape=tab,fontname=Courier,label="sst"] 
     27;       wu [shape=tab,fontname=Courier,label="wu"] 
     28;       wv [shape=tab,fontname=Courier,label="wv"] 
     29;       ws [shape=tab,fontname=Courier,label="ws"] 
     30;       lh [shape=tab,fontname=Courier,label="lh"] 
     31; 
     32;       read_variables_v2 [shape=box, 
     33;       fontname=Courier, 
     34;       color=blue, 
     35;       URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/paper01/fig2/read_variables_v2.pro", 
     36;       label="${TROPFLUX}/src/paper01/fig2/read_variables_v2.pro"]; 
     37; 
     38;       {qlat rad pos met} -> {read_variables_v2} -> {at sw rh sst wu wv ws lh} 
     39;    } 
     40; 
    1141; SEE ALSO 
    1242; ======== 
    1343; 
    1444; :ref:`tropflux_profile.sh` 
     45; 
     46; :ref:`air_validation_scatter_2000_2009_v50.pro` 
     47; :ref:`q2m_validation_scatter_2000_2009_v50.pro` 
     48; :ref:`sst_validation_scatter_2000_2009_v50.pro` 
     49; :ref:`ws_validation_scatter_2000_2009_v50.pro` 
    1550; 
    1651; EXAMPLES 
     
    2257;  IDL> csite=++ 
    2358;  IDL> ++ 
    24 ;  IDL> read_variables_v2, csite,date1,date2,nsmooth, at, sw,rh,sst,wu,wv,ws, lh 
     59;  IDL> read_variables_v2, csite, date1, date2, nsmooth, at, sw, rh, sst, wu, wv, ws, lh 
     60; 
     61; TODO 
     62; ==== 
     63;  
     64; externalize function 
     65; 
     66; make it work (missing data) 
    2567; 
    2668; EVOLUTIONS 
     
    2971; $Id$ 
    3072; 
     73; - fplod 20110412T110534Z aedon.locean-ipsl.upmc.fr (Darwin) 
     74; 
     75;   * remove hard coding path 
     76;   * add graphviz 
     77; 
    3178; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) 
    3279; 
     
    3481; 
    3582;- 
    36 pro read_variables_v2, csite,date1,date2,nsmooth, $ 
    37                      at, sw,rh,sst,wu,wv,ws, lh 
    38  
    39 ; 
    40 @common 
    41  
    42 dir='/Volumes/Iomega_HDD/work/flux_reconstruction/mooriing_all/' 
     83pro read_variables_v2, csite, date1, date2, nsmooth, $ 
     84                     at, sw, rh, sst, wu, wv, ws, lh 
     85@cm_tropflux 
    4386; 
    4487;; DEFINE THE OUTPUT TIME AXIS 
     
    5497;;   - if not, fill variable with missing values 
    5598; 
    56  
    57  
    5899;;SHORTWAVE 
    59 fi=dir+'rad'+csite+'_dy.cdf' 
     100fi=tropflux_id_env+'rad'+csite+'_dy.cdf' 
    60101f=file_test(fi) 
    61102sw=fltarr(jpt)+!values.f_nan 
     
    69110  ind=where((tt0 ge -1e-5) and (tt0 le jpt-1+1e-5)) 
    70111  if (ind(0) ne -1) then begin 
    71   sw(tt0(ind))=sw0(ind) 
    72   sw_q(tt0(ind))=sw_q0(ind) 
    73   endif 
    74 endif 
     112     sw(tt0(ind))=sw0(ind) 
     113     sw_q(tt0(ind))=sw_q0(ind) 
     114  endif 
     115endif else begin 
     116  print, fi, ' not found' 
     117endelse 
    75118 
    76119ind_sw=where(sw_q ne 1. and sw_q ne 2.) 
    77120 
    78121;;LHF 
    79 fi=dir+'qlat'+csite+'_dy.cdf' 
     122fi=tropflux_id_env+'qlat'+csite+'_dy.cdf' 
    80123f=file_test(fi) 
    81124lh=fltarr(jpt)+!values.f_nan 
     
    88131  ind=where((tt0 ge -1e-5) and (tt0 le jpt-1+1e-5)) 
    89132  if (ind(0) ne -1) then begin 
    90   lh(tt0(ind))=lh0(ind) 
    91   lh_q(tt0(ind))=lh_q0(ind) 
    92   endif 
    93 endif 
     133     lh(tt0(ind))=lh0(ind) 
     134     lh_q(tt0(ind))=lh_q0(ind) 
     135  endif 
     136endif else begin 
     137  print, fi, ' not found' 
     138endelse 
    94139 
    95140;;POSITION 
    96 fi=dir+'pos'+csite+'_dy.cdf' 
     141fi=tropflux_id_env+'pos'+csite+'_dy.cdf' 
    97142f=file_test(fi) 
    98143lat=fltarr(jpt)+!values.f_nan 
     
    108153    lon(tt0(ind))=lon0(ind) 
    109154  endif 
    110 endif 
     155endif else begin 
     156  print, fi, ' not found' 
     157endelse 
    111158 
    112159 
    113160;;MET PARAMETERS 
    114 fi=dir+'met'+csite+'_dy.cdf' 
     161fi=tropflux_id_env+'met'+csite+'_dy.cdf' 
    115162f=file_test(fi) 
    116163wu=fltarr(jpt)+!values.f_nan 
     
    151198    sst_q(tt0(ind))=sst_q0(ind) 
    152199  endif 
    153 endif 
     200endif else begin 
     201  print, fi, ' not found' 
     202endelse 
    154203 
    155204ind_at=where(at_q ne 1 and at_q ne 2)   &  ind_ws=where(ws_q ne 1 and ws_q ne 2) 
  • trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro

    r43 r44  
    11;+ 
    2 ; .. _sst_validation_scatter_2000_2009_v50.pro 
     2; .. _sst_validation_scatter_2000_2009_v50.pro: 
    33; 
    44; ======================================== 
     
    362362closeps 
    363363 
    364 fig='sst_validation_scatter_2000_2009_v50.ps' 
    365 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    366 spawn, 'gv '+cpsdir+fig 
     364fig=tropflux_od_env+'sst_validation_scatter_2000_2009_v50.ps' 
     365spawn, 'mv '+psdir+'idl.ps '+fig 
     366spawn, 'gv '+fig 
    367367return 
    368368end 
  • trunk/src/paper01/fig3/statistics_3var_v1.pro

    r43 r44  
    11;+ 
    2 ; .. _statistics_3var_v1.pro 
     2; .. _statistics_3var_v1.pro: 
    33; 
    44; ====================== 
  • trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro

    r43 r44  
    11;+ 
    2 ; .. _ws_validation_scatter_2000_2009_v50.pro 
     2; .. _ws_validation_scatter_2000_2009_v50.pro: 
    33; 
    44; ======================================= 
     
    117117help, nce 
    118118 
    119 dir='/Volumes/Iomega_HDD/work/flux_reconstruction/gridded_data/' 
    120 fi=dir+'zonal_wind_speed_oafluxgrid_30N30S.nc' 
     119fi=tropflux_id_env+'zonal_wind_speed_oafluxgrid_30N30S.nc' 
    121120initncdf, fi 
    122121u=read_ncdf("u", date1, date2, file=fi,/nostr) 
    123 fi=dir+'meridional_wind_speed_oafluxgrid_30N30S.nc' 
     122fi=tropflux_id_env+'meridional_wind_speed_oafluxgrid_30N30S.nc' 
    124123initncdf, fi 
    125124v=read_ncdf("v", date1, date2, file=fi,/nostr) 
     
    368367closeps 
    369368 
    370 fig='ws_validation_scatter_2000_2009_v50.ps' 
    371 spawn, 'mv '+psdir+'idl.ps '+cpsdir+fig 
    372 spawn, 'gv '+cpsdir+fig 
     369fig=tropflux_od_env+'ws_validation_scatter_2000_2009_v50.ps' 
     370spawn, 'mv '+psdir+'idl.ps '+fig 
     371spawn, 'gv '+fig 
    373372return 
    374373end 
  • trunk/src/tropflux_init.pro

    r40 r44  
    7777@cm_4mesh 
    7878@cm_4data 
     79@cm_4ps 
     80@cm_general 
    7981; 
    8082; define default directories 
Note: See TracChangeset for help on using the changeset viewer.