Changeset 97 for trunk/src/paper01/fig3


Ignore:
Timestamp:
08/30/11 14:38:29 (13 years ago)
Author:
pinsard
Message:

suppress blank lines trailing blank

Location:
trunk/src/paper01/fig3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro

    r94 r97  
    9797;- 
    9898pro air_validation_scatter_2000_2009_v50, date1, date2 
    99  
     99; 
    100100@cm_project 
    101  
     101; 
    102102reinitplt, /z,/invert 
    103103key_portrait = 1 
    104  
     104; 
    105105openps, FILENAME = project_od_env+'air_validation_scatter_2000_2009_v50.ps' 
    106  
    107 ;; Give the location of mooring for validation of basic meteorological variables 
    108  
    109  
     106; 
     107; Give the location of mooring for validation of basic meteorological variables 
     108; 
     109; 
    110110sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    111111           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
     
    118118          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    119119          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    120  
     120; 
    121121ocean='global' 
    122  
    123 nsmooth=1.    ;; statistics are with 7 day smoothed 
    124 ;;   This program will create the following text files with statistics of respective variables 
     122; 
     123nsmooth=1.    ; statistics are with 7 day smoothed 
     124;   This program will create the following text files with statistics of respective variables 
    125125close,/all 
    126  
     126; 
    127127fi_air_erai=project_id_env+'air_2000_2009_erai_v50.txt' 
    128128openw,1,fi_air_erai 
     
    135135fi_air_ncep1=project_id_env+'air_2000_2009_ncep1_v50.txt' 
    136136openw,5,fi_air_ncep1 
    137  
    138  
     137; 
     138; 
    139139printf,1, 'x     y      cor    bias     std     rmsd    mean_tao' 
    140140printf,2, 'x     y      cor    bias     std     rmsd    mean_tao' 
     
    142142printf,4, 'x     y      cor    bias     std     rmsd    mean_tao' 
    143143printf,5, 'x     y      cor    bias     std     rmsd    mean_tao' 
    144  
    145 ;; first reading the whole ERAI uncorrected and corrected data 
    146  
     144; 
     145; first reading the whole ERAI uncorrected and corrected data 
     146; 
    147147file=project_id_env+'erai_t2m_19890101_20091231_oafluxgrid.nc' 
    148148initncdf, file 
    149 unc=read_ncdf('t2m',date1,date2,file=file,/nostr)  
     149unc=read_ncdf('t2m',date1,date2,file=file,/nostr) 
    150150unc=unc-273.15 
    151151help, unc 
    152  
     152; 
    153153file=project_id_env+'TropFlux_t2m_19890101_20091231_v50.nc' 
    154154initncdf, file 
    155 cor=read_ncdf('t2m',date1,date2,file=file,/nostr)  
     155cor=read_ncdf('t2m',date1,date2,file=file,/nostr) 
    156156cor=cor-273.15 
    157157help, cor 
    158  
     158; 
    159159file=project_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    160160initncdf, file 
    161161oaf=read_ncdf("air", date1, date2, file=file,/nostr) 
    162162help, oaf 
    163  
     163; 
    164164fi=project_id_env+'air_2m_ncep2_oafluxgrid_19890101_20091231.nc' 
    165165initncdf, fi 
     
    167167nce=nce-273.15 
    168168help, nce 
    169  
     169; 
    170170file=project_id_env+'t2m_ncep1_19890101_20091231.nc' 
    171171initncdf, file 
     
    173173nce1=nce1-273.15 
    174174help, nce1 
    175  
     175; 
    176176nn=n_elements(sitelist) 
    177177for n=0, nn-1 do begin 
    178  
    179 ;; reading data from mooring 
    180  
    181     site=sitelist(n)  
     178; 
     179; reading data from mooring 
     180; 
     181    site=sitelist(n) 
    182182    csite=site 
    183183    print, csite 
     
    185185    y=y_site_location(site) 
    186186    if (y ge 0. and y le 30.) then y=y+360. 
    187     dx=0.5  
    188     dy=0.5  
     187    dx=0.5 
     188    dy=0.5 
    189189    box=[y-dy, y+dy, x-dx, x+dx] 
    190190    read_variables_v2, csite,date1,date2,nsmooth, $ 
    191191         at, sw,rh,sst,wu,wv,ws,lh 
    192  
    193  
    194 ;    air=rh_to_sphum(rh,at,1008)               ;;        at  ->  air temperature 
    195     air=at                                               ;;        air ->  sea surface temperature 
    196                                                 ;;        lh  ->  latent heat flux 
    197                                                 ;;        rh  ->  relative humidity 
    198                                                 ;;   wu,wv,ws ->  wind speed 
    199 ;; 
    200  
    201  
    202 ;;  extracting the corrected and uncorrected ERAI data at the locations 
     192; 
     193; 
     194;    air=rh_to_sphum(rh,at,1008)               ;        at  ->  air temperature 
     195    air=at                                               ;        air ->  sea surface temperature 
     196                                                ;        lh  ->  latent heat flux 
     197                                                ;        rh  ->  relative humidity 
     198                                                ;   wu,wv,ws ->  wind speed 
     199; 
     200;  extracting the corrected and uncorrected ERAI data at the locations 
    203201    nsmooth=1. 
    204  
     202; 
    205203    extract_flux_tropflux,unc,box, $ 
    206204        tropflux 
    207205    uncr=tropflux 
    208  
     206; 
    209207     extract_flux_tropflux,cor,box, $ 
    210208        tropflux 
    211209     corr=tropflux 
    212  
     210; 
    213211     extract_flux_tropflux,oaf,box, $ 
    214212        tropflux 
    215213     oafl=tropflux 
    216  
     214; 
    217215     extract_flux_tropflux,nce,box, $ 
    218216        tropflux 
    219217     ncep=tropflux 
    220  
     218; 
    221219     extract_flux_tropflux,nce1,box, $ 
    222220        tropflux 
    223221     ncep1=tropflux 
    224  
    225  
    226     ind=where(finite(air))  
    227     air=air(ind)  
    228     uncr_air=uncr(ind)   
     222; 
     223; 
     224    ind=where(finite(air)) 
     225    air=air(ind) 
     226    uncr_air=uncr(ind) 
    229227    corr_air=corr(ind) 
    230     oafl=oafl(ind)  
    231     ncep=ncep(ind)  
     228    oafl=oafl(ind) 
     229    ncep=ncep(ind) 
    232230    ncep1=ncep1(ind) 
    233231    mean_tao=total(air,/nan)/n_elements(ind) 
    234  
     232; 
    235233    statistics_3var_v1, air, uncr_air, corr_air, $ 
    236234         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    237  
     235; 
    238236    printf, 1, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    239237    printf, 2, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    240  
     238; 
    241239    statistics_3var_v1, air, oafl, ncep, $ 
    242240         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    243241    printf, 3, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    244242    printf, 4, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f6.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    245  
     243; 
    246244    statistics_3var_v1, air, ncep1, ncep, $ 
    247245         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    248246    printf, 5, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    249  
     247; 
    250248endfor 
    251249close,/all 
    252  
     250; 
    253251fi_air_erai=project_id_env+'air_2000_2009_erai_v50.txt' 
    254252res=read_ascii(fi_air_erai,data_start=1) 
     
    256254lat=reform(ff(0,*)) 
    257255lon=reform(ff(1,*)) 
    258 cor_era=reform(ff(2,*))    
     256cor_era=reform(ff(2,*)) 
    259257cor_erai=total(cor_era)/n_elements(cor_era) 
    260 bias_era=reform(ff(3,*))   
     258bias_era=reform(ff(3,*)) 
    261259bias_erai=total(bias_era)/n_elements(bias_era) 
    262 std_era=reform(ff(4,*))    
     260std_era=reform(ff(4,*)) 
    263261std_erai=total(std_era)/n_elements(std_era) 
    264 rmsd_era=reform(ff(5,*))   
     262rmsd_era=reform(ff(5,*)) 
    265263rmsd_erai=total(rmsd_era)/n_elements(rmsd_era) 
    266 mean_tao=reform(ff(6,*))   
     264mean_tao=reform(ff(6,*)) 
    267265mean_erai=bias_era+mean_tao 
    268  
     266; 
    269267print, '' 
    270268print, 'ERAI' 
     
    276274xyouts, 22.3,30.2, cstat, charsize=0.9 
    277275xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    278  
     276; 
    279277oplot, [22,31], [22,31] 
    280278ab=linfit(mean_tao, mean_erai,yfit=yfit) 
    281 a=float(ab(0))  
     279a=float(ab(0)) 
    282280b=float(ab(1)) 
    283281oplot, mean_tao, yfit, color=250, thick=2 
    284  
     282; 
    285283fi_air_trop=project_id_env+'air_2000_2009_trop_v50.txt' 
    286284res=read_ascii(fi_air_trop,data_start=1) 
     
    288286lat=reform(ff(0,*)) 
    289287lon=reform(ff(1,*)) 
    290 cor_tro=reform(ff(2,*))    
     288cor_tro=reform(ff(2,*)) 
    291289cor_trop=total(cor_tro)/n_elements(cor_tro) 
    292 bias_tro=reform(ff(3,*))   
     290bias_tro=reform(ff(3,*)) 
    293291bias_trop=total(bias_tro)/n_elements(bias_tro) 
    294 std_tro=reform(ff(4,*))    
     292std_tro=reform(ff(4,*)) 
    295293std_trop=total(std_tro)/n_elements(std_tro) 
    296 rmsd_tro=reform(ff(5,*))   
     294rmsd_tro=reform(ff(5,*)) 
    297295rmsd_trop=total(rmsd_tro)/n_elements(rmsd_tro) 
    298 mean_tao=reform(ff(6,*))   
     296mean_tao=reform(ff(6,*)) 
    299297mean_trop=bias_tro+mean_tao 
    300  
     298; 
    301299print, '' 
    302300print, 'TropFlux' 
    303301print, cor_trop, bias_trop, std_trop, rmsd_trop 
    304302cstat=string(cor_trop, bias_trop, std_trop, rmsd_trop, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    305  
     303; 
    306304splot, mean_tao, mean_trop, title='T2m - TAO Vs TropFlux', subtitle='', $ 
    307305     charsize=1.1, xtitle='TAO T2m', ytitle='TropFlux T2m', small=[2,3,2],/noer, psym=2, $ 
     
    310308xyouts, 22.3,30.2, cstat, charsize=0.9 
    311309xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    312  
     310; 
    313311ab=linfit(mean_tao, mean_trop,yfit=yfit) 
    314 a=float(ab(0))  
     312a=float(ab(0)) 
    315313b=float(ab(1)) 
    316314oplot, mean_tao, yfit, color=250, thick=2 
    317  
     315; 
    318316fi_air_oaflx=project_id_env+'air_2000_2009_oaflx_v50.txt' 
    319317res=read_ascii(fi_air_oaflx,data_start=1) 
     
    321319lat=reform(ff(0,*)) 
    322320lon=reform(ff(1,*)) 
    323 cor_oaf=reform(ff(2,*))    
     321cor_oaf=reform(ff(2,*)) 
    324322cor_oafl=total(cor_oaf)/n_elements(cor_oaf) 
    325 bias_oaf=reform(ff(3,*))   
     323bias_oaf=reform(ff(3,*)) 
    326324bias_oafl=total(bias_oaf)/n_elements(bias_oaf) 
    327 std_oaf=reform(ff(4,*))    
     325std_oaf=reform(ff(4,*)) 
    328326std_oafl=total(std_oaf)/n_elements(std_oaf) 
    329 rmsd_oaf=reform(ff(5,*))   
     327rmsd_oaf=reform(ff(5,*)) 
    330328rmsd_oafl=total(rmsd_oaf)/n_elements(rmsd_oaf) 
    331 mean_tao=reform(ff(6,*))   
     329mean_tao=reform(ff(6,*)) 
    332330mean_oafl=bias_oaf+mean_tao 
    333  
     331; 
    334332print, '' 
    335333print, 'OAFlux' 
    336334print, cor_oafl, bias_oafl, std_oafl, rmsd_oafl 
    337335cstat=string(cor_oafl, bias_oafl, std_oafl, rmsd_oafl, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    338  
     336; 
    339337splot, mean_tao, mean_oafl, title='T2m - TAO Vs OAFlux', subtitle='', $ 
    340338     charsize=1.1, xtitle='TAO T2m', ytitle='OAFlux T2m', small=[2,3,3],/noer, psym=2, $ 
     
    343341xyouts, 22.3,30.2, cstat, charsize=0.9 
    344342xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    345  
     343; 
    346344ab=linfit(mean_tao, mean_oafl,yfit=yfit) 
    347 a=float(ab(0))  
     345a=float(ab(0)) 
    348346b=float(ab(1)) 
    349347oplot, mean_tao, yfit, color=250, thick=2 
    350  
     348; 
    351349fi_air_ncep=project_id_env+'air_2000_2009_ncep_v50.txt' 
    352350res=read_ascii(fi_air_ncep,data_start=1) 
     
    354352lat=reform(ff(0,*)) 
    355353lon=reform(ff(1,*)) 
    356 cor_nce=reform(ff(2,*))    
     354cor_nce=reform(ff(2,*)) 
    357355cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    358 bias_nce=reform(ff(3,*))   
     356bias_nce=reform(ff(3,*)) 
    359357bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    360 std_nce=reform(ff(4,*))    
     358std_nce=reform(ff(4,*)) 
    361359std_ncep=total(std_nce)/n_elements(std_nce) 
    362 rmsd_nce=reform(ff(5,*))   
     360rmsd_nce=reform(ff(5,*)) 
    363361rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    364 mean_tao=reform(ff(6,*))  
     362mean_tao=reform(ff(6,*)) 
    365363mean_ncep=bias_nce+mean_tao 
    366  
     364; 
    367365print, '' 
    368366print, 'NCEP2' 
    369367print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    370368cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    371  
     369; 
    372370splot, mean_tao, mean_ncep, title='T2m - TAO Vs NCEP2', subtitle='', $ 
    373371     charsize=1.1, xtitle='TAO T2m', ytitle='NCEP2 T2m', small=[2,3,4],/noer, psym=2, $ 
     
    376374xyouts, 22.3,30.2, cstat, charsize=0.9 
    377375xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    378  
     376; 
    379377ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    380 a=float(ab(0))  
     378a=float(ab(0)) 
    381379b=float(ab(1)) 
    382380oplot, mean_tao, yfit, color=250, thick=2 
    383  
     381; 
    384382fi_air_ncep1=project_id_env+'air_2000_2009_ncep1_v50.txt' 
    385383res=read_ascii(fi_air_ncep1,data_start=1) 
     
    387385lat=reform(ff(0,*)) 
    388386lon=reform(ff(1,*)) 
    389 cor_nce=reform(ff(2,*))    
     387cor_nce=reform(ff(2,*)) 
    390388cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    391 bias_nce=reform(ff(3,*))   
     389bias_nce=reform(ff(3,*)) 
    392390bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    393 std_nce=reform(ff(4,*))    
     391std_nce=reform(ff(4,*)) 
    394392std_ncep=total(std_nce)/n_elements(std_nce) 
    395 rmsd_nce=reform(ff(5,*))   
     393rmsd_nce=reform(ff(5,*)) 
    396394rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    397 mean_tao=reform(ff(6,*))   
     395mean_tao=reform(ff(6,*)) 
    398396mean_ncep=bias_nce+mean_tao 
    399  
     397; 
    400398print, '' 
    401399print, 'NCEP1' 
    402400print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    403401cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    404  
     402; 
    405403splot, mean_tao, mean_ncep, title='T2m - TAO Vs NCEP_NCAR', subtitle='', $ 
    406404     charsize=1.1, xtitle='TAO T2m', ytitle='NCEP', small=[2,3,5],/noer, psym=2, $ 
     
    409407xyouts, 22.3,30.2, cstat, charsize=0.9 
    410408xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    411  
     409; 
    412410ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    413 a=float(ab(0))  
     411a=float(ab(0)) 
    414412b=float(ab(1)) 
    415413oplot, mean_tao, yfit, color=250, thick=2 
    416  
     414; 
    417415closeps 
    418  
     416; 
    419417return 
    420418end 
     
    443441        y=strmid(site, n+1, n1-n-1) 
    444442    endelse 
    445  
     443; 
    446444endif else begin 
    447445    n1=strpos(site, 'w') 
     
    456454   endelse 
    457455endelse 
     456; 
    458457return,float(y) 
     458; 
    459459end 
  • trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro

    r94 r97  
    9999;- 
    100100pro q2m_validation_scatter_2000_2009_v50, date1, date2 
    101  
     101; 
    102102@cm_project 
    103  
     103; 
    104104reinitplt, /z,/invert 
    105105key_portrait = 1 
    106  
     106; 
    107107openps, FILENAME = project_od_env+'q2m_validation_scatter_2000_2009_v50.ps' 
    108  
    109 ;; Give the location of mooring for validation of basic meteorological variables 
    110  
    111  
     108; 
     109; Give the location of mooring for validation of basic meteorological variables 
     110; 
     111; 
    112112sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    113113           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
     
    120120          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    121121          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    122  
     122; 
    123123ocean='global' 
    124  
    125 nsmooth=1.    ;; statistics are with 7 day smoothed 
    126 ;;   This program will create the following text files with statistics of respective variables 
     124; 
     125nsmooth=1.    ; statistics are with 7 day smoothed 
     126;   This program will create the following text files with statistics of respective variables 
    127127close,/all 
    128  
     128; 
    129129fi_q2m_erai=project_id_env+'q2m_2000_2009_erai_v50.txt' 
    130130openw,1,fi_q2m_erai 
     
    137137fi_q2m_ncep1=project_id_env+'q2m_2000_2009_ncep1_v50.txt' 
    138138openw,5,fi_q2m_ncep1 
    139  
    140  
     139; 
     140; 
    141141printf,1, 'x     y      cor    bias     std     rmsd    mean_tao' 
    142142printf,2, 'x     y      cor    bias     std     rmsd    mean_tao' 
     
    144144printf,4, 'x     y      cor    bias     std     rmsd    mean_tao' 
    145145printf,5, 'x     y      cor    bias     std     rmsd    mean_tao' 
    146  
    147 ;; first reading the whole ERAI uncorrected and corrected data 
    148  
     146; 
     147; first reading the whole ERAI uncorrected and corrected data 
     148; 
    149149file=project_id_env+'erai_q2m_19890101_20091231_oafluxgrid.nc' 
    150150initncdf, file 
    151151unc=read_ncdf('q2m',date1,date2,file=file,/nostr) 
    152152help, unc 
    153  
     153; 
    154154file=project_id_env+'TropFlux_q2m_19890101_20091231_v20.nc' 
    155155initncdf, file 
    156156cor=read_ncdf('q2m',date1,date2,file=file,/nostr) 
    157157help, cor 
    158  
     158; 
    159159file=project_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    160160initncdf, file 
    161161oaf=read_ncdf("sphum", date1, date2, file=file,/nostr) 
    162162help, oaf 
    163  
     163; 
    164164fi=project_id_env+'sphum_ncep2_oafluxgrid_19890101_20091231.nc' 
    165165initncdf, fi 
     
    167167nce=nce*1000 
    168168help, nce 
    169  
     169; 
    170170file=project_id_env+'q2m_ncep1_19890101_20091231.nc' 
    171171initncdf, file 
     
    173173nce1=nce1*1000 
    174174help, nce1 
    175  
     175; 
    176176nn=n_elements(sitelist) 
    177177for n=0, nn-1 do begin 
    178  
    179 ;; reading data from mooring 
    180  
    181     site=sitelist(n)  
     178; 
     179; reading data from mooring 
     180; 
     181    site=sitelist(n) 
    182182    csite=site 
    183183    print, csite 
     
    185185    y=y_site_location(site) 
    186186    if (y ge 0. and y le 30.) then y=y+360. 
    187     dx=0.5  
    188     dy=0.5  
     187    dx=0.5 
     188    dy=0.5 
    189189    box=[y-dy, y+dy, x-dx, x+dx] 
    190190    read_variables_v2, csite,date1,date2,nsmooth, $ 
    191191         at, sw,rh,sst,wu,wv,ws,lh 
    192  
    193  
    194     q2m=rh_to_sphum(rh,at,1008)               ;;        at  ->  q2m temperature 
    195 ;    q2m=at                                               ;;        q2m ->  sea surface temperature 
    196                                                 ;;        lh  ->  latent heat flux 
    197                                                 ;;        rh  ->  relative humidity 
    198                                                 ;;   wu,wv,ws ->  wind speed 
    199 ;; 
    200  
    201  
    202 ;;  extracting the corrected and uncorrected ERAI data at the locations 
     192; 
     193; 
     194    q2m=rh_to_sphum(rh,at,1008)               ;        at  ->  q2m temperature 
     195;    q2m=at                                               ;        q2m ->  sea surface temperature 
     196                                                ;        lh  ->  latent heat flux 
     197                                                ;        rh  ->  relative humidity 
     198                                                ;   wu,wv,ws ->  wind speed 
     199; 
     200;  extracting the corrected and uncorrected ERAI data at the locations 
    203201    nsmooth=1. 
    204  
     202; 
    205203    extract_flux_tropflux,unc,box, $ 
    206204        tropflux 
    207205    uncr=tropflux 
    208  
     206; 
    209207     extract_flux_tropflux,cor,box, $ 
    210208        tropflux 
    211209     corr=tropflux 
    212  
     210; 
    213211     extract_flux_tropflux,oaf,box, $ 
    214212        tropflux 
    215213     oafl=tropflux 
    216  
     214; 
    217215     extract_flux_tropflux,nce,box, $ 
    218216        tropflux 
    219217     ncep=tropflux 
    220  
     218; 
    221219     extract_flux_tropflux,nce1,box, $ 
    222220        tropflux 
    223221     ncep1=tropflux 
    224  
    225     ind=where(finite(q2m))  
    226     q2m=q2m(ind)  
    227     uncr_q2m=uncr(ind)   
     222; 
     223    ind=where(finite(q2m)) 
     224    q2m=q2m(ind) 
     225    uncr_q2m=uncr(ind) 
    228226    corr_q2m=corr(ind) 
    229     oafl=oafl(ind)  
    230     ncep=ncep(ind)  
     227    oafl=oafl(ind) 
     228    ncep=ncep(ind) 
    231229    ncep1=ncep1(ind) 
    232230    mean_tao=total(q2m,/nan)/n_elements(ind) 
    233  
     231; 
    234232    statistics_3var_v1, q2m, uncr_q2m, corr_q2m, $ 
    235233         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    236  
     234; 
    237235    printf, 1, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    238236    printf, 2, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    239  
     237; 
    240238    statistics_3var_v1, q2m, oafl, ncep, $ 
    241239         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    242240    printf, 3, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    243241    printf, 4, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f6.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    244  
     242; 
    245243    statistics_3var_v1, q2m, ncep1, ncep, $ 
    246244         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    247245    printf, 5, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    248  
     246; 
    249247endfor 
    250248close,/all 
    251  
     249; 
    252250fi_q2m_erai=project_id_env+'q2m_2000_2009_erai_v50.txt' 
    253251res=read_ascii(fi_q2m_erai,data_start=1) 
     
    255253lat=reform(ff(0,*)) 
    256254lon=reform(ff(1,*)) 
    257 cor_era=reform(ff(2,*))    
     255cor_era=reform(ff(2,*)) 
    258256cor_erai=total(cor_era)/n_elements(cor_era) 
    259 bias_era=reform(ff(3,*))   
     257bias_era=reform(ff(3,*)) 
    260258bias_erai=total(bias_era)/n_elements(bias_era) 
    261 std_era=reform(ff(4,*))    
     259std_era=reform(ff(4,*)) 
    262260std_erai=total(std_era)/n_elements(std_era) 
    263 rmsd_era=reform(ff(5,*))   
     261rmsd_era=reform(ff(5,*)) 
    264262rmsd_erai=total(rmsd_era)/n_elements(rmsd_era) 
    265 mean_tao=reform(ff(6,*))   
     263mean_tao=reform(ff(6,*)) 
    266264mean_erai=bias_era+mean_tao 
    267  
     265; 
    268266print, '' 
    269267print, 'ERAI' 
     
    275273xyouts, 12,20.2, cstat, charsize=0.9 
    276274xyouts, 12,19.7, 'cor   bias   std   rmsd', charsize=0.9 
    277  
     275; 
    278276oplot, [11,21], [11,21] 
    279277ab=linfit(mean_tao, mean_erai,yfit=yfit) 
    280 a=float(ab(0))  
     278a=float(ab(0)) 
    281279b=float(ab(1)) 
    282280oplot, mean_tao, yfit, color=250, thick=2 
    283  
     281; 
    284282fi_q2m_trop=project_id_env+'q2m_2000_2009_trop_v50.txt' 
    285283res=read_ascii(fi_q2m_trop,data_start=1) 
     
    287285lat=reform(ff(0,*)) 
    288286lon=reform(ff(1,*)) 
    289 cor_tro=reform(ff(2,*))    
     287cor_tro=reform(ff(2,*)) 
    290288cor_trop=total(cor_tro)/n_elements(cor_tro) 
    291 bias_tro=reform(ff(3,*))   
     289bias_tro=reform(ff(3,*)) 
    292290bias_trop=total(bias_tro)/n_elements(bias_tro) 
    293 std_tro=reform(ff(4,*))    
     291std_tro=reform(ff(4,*)) 
    294292std_trop=total(std_tro)/n_elements(std_tro) 
    295 rmsd_tro=reform(ff(5,*))   
     293rmsd_tro=reform(ff(5,*)) 
    296294rmsd_trop=total(rmsd_tro)/n_elements(rmsd_tro) 
    297 mean_tao=reform(ff(6,*))   
     295mean_tao=reform(ff(6,*)) 
    298296mean_trop=bias_tro+mean_tao 
    299  
     297; 
    300298print, '' 
    301299print, 'TropFlux' 
    302300print, cor_trop, bias_trop, std_trop, rmsd_trop 
    303301cstat=string(cor_trop, bias_trop, std_trop, rmsd_trop, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    304  
     302; 
    305303splot, mean_tao, mean_trop, title='Q2m - TAO Vs TropFlux', subtitle='', $ 
    306304     charsize=1.1, xtitle='TAO Q2m', ytitle='TropFlux Q2m', small=[2,3,2],/noer, psym=2, $ 
     
    309307xyouts, 12,20.2, cstat, charsize=0.9 
    310308xyouts, 12,19.7, 'cor   bias   std   rmsd', charsize=0.9 
    311  
     309; 
    312310ab=linfit(mean_tao, mean_trop,yfit=yfit) 
    313 a=float(ab(0))  
     311a=float(ab(0)) 
    314312b=float(ab(1)) 
    315313oplot, mean_tao, yfit, color=250, thick=2 
    316  
     314; 
    317315fi_q2m_oaflx=project_id_env+'q2m_2000_2009_oaflx_v50.txt' 
    318316res=read_ascii(fi_q2m_oaflx,data_start=1) 
     
    320318lat=reform(ff(0,*)) 
    321319lon=reform(ff(1,*)) 
    322 cor_oaf=reform(ff(2,*))    
     320cor_oaf=reform(ff(2,*)) 
    323321cor_oafl=total(cor_oaf)/n_elements(cor_oaf) 
    324 bias_oaf=reform(ff(3,*))   
     322bias_oaf=reform(ff(3,*)) 
    325323bias_oafl=total(bias_oaf)/n_elements(bias_oaf) 
    326 std_oaf=reform(ff(4,*))    
     324std_oaf=reform(ff(4,*)) 
    327325std_oafl=total(std_oaf)/n_elements(std_oaf) 
    328 rmsd_oaf=reform(ff(5,*))   
     326rmsd_oaf=reform(ff(5,*)) 
    329327rmsd_oafl=total(rmsd_oaf)/n_elements(rmsd_oaf) 
    330 mean_tao=reform(ff(6,*))   
     328mean_tao=reform(ff(6,*)) 
    331329mean_oafl=bias_oaf+mean_tao 
    332  
     330; 
    333331print, '' 
    334332print, 'OAFlux' 
    335333print, cor_oafl, bias_oafl, std_oafl, rmsd_oafl 
    336334cstat=string(cor_oafl, bias_oafl, std_oafl, rmsd_oafl, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    337  
     335; 
    338336splot, mean_tao, mean_oafl, title='Q2m - TAO Vs OAFlux', subtitle='', $ 
    339337     charsize=1.1, xtitle='TAO Q2m', ytitle='OAFlux Q2m', small=[2,3,3],/noer, psym=2, $ 
     
    342340xyouts, 12,20.2, cstat, charsize=0.9 
    343341xyouts, 12,19.7, 'cor   bias   std   rmsd', charsize=0.9 
    344  
     342; 
    345343ab=linfit(mean_tao, mean_oafl,yfit=yfit) 
    346 a=float(ab(0))  
     344a=float(ab(0)) 
    347345b=float(ab(1)) 
    348346oplot, mean_tao, yfit, color=250, thick=2 
    349  
    350  
     347; 
     348; 
    351349fi_q2m_ncep=project_id_env+'q2m_2000_2009_ncep_v50.txt' 
    352350res=read_ascii(fi_q2m_ncep,data_start=1) 
     
    354352lat=reform(ff(0,*)) 
    355353lon=reform(ff(1,*)) 
    356 cor_nce=reform(ff(2,*))    
     354cor_nce=reform(ff(2,*)) 
    357355cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    358 bias_nce=reform(ff(3,*))   
     356bias_nce=reform(ff(3,*)) 
    359357bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    360 std_nce=reform(ff(4,*))    
     358std_nce=reform(ff(4,*)) 
    361359std_ncep=total(std_nce)/n_elements(std_nce) 
    362 rmsd_nce=reform(ff(5,*))   
     360rmsd_nce=reform(ff(5,*)) 
    363361rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    364 mean_tao=reform(ff(6,*))   
     362mean_tao=reform(ff(6,*)) 
    365363mean_ncep=bias_nce+mean_tao 
    366  
     364; 
    367365print, '' 
    368366print, 'NCEP2' 
    369367print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    370368cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    371  
     369; 
    372370splot, mean_tao, mean_ncep, title='Q2m - TAO Vs NCEP2', subtitle='', $ 
    373371     charsize=1.1, xtitle='TAO Q2m', ytitle='NCEP2 Q2m', small=[2,3,4],/noer, psym=2, $ 
     
    376374xyouts, 12,20.2, cstat, charsize=0.9 
    377375xyouts, 12,19.7, 'cor   bias   std   rmsd', charsize=0.9 
    378  
     376; 
    379377ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    380 a=float(ab(0))  
     378a=float(ab(0)) 
    381379b=float(ab(1)) 
    382380oplot, mean_tao, yfit, color=250, thick=2 
    383  
     381; 
    384382fi_q2m_ncep1=project_id_env+'q2m_2000_2009_ncep1_v50.txt' 
    385383res=read_ascii(fi_q2m_ncep1,data_start=1) 
     
    387385lat=reform(ff(0,*)) 
    388386lon=reform(ff(1,*)) 
    389 cor_nce=reform(ff(2,*))    
     387cor_nce=reform(ff(2,*)) 
    390388cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    391 bias_nce=reform(ff(3,*))   
     389bias_nce=reform(ff(3,*)) 
    392390bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    393 std_nce=reform(ff(4,*))    
     391std_nce=reform(ff(4,*)) 
    394392std_ncep=total(std_nce)/n_elements(std_nce) 
    395 rmsd_nce=reform(ff(5,*))   
     393rmsd_nce=reform(ff(5,*)) 
    396394rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    397 mean_tao=reform(ff(6,*))   
     395mean_tao=reform(ff(6,*)) 
    398396mean_ncep=bias_nce+mean_tao 
    399  
     397; 
    400398print, '' 
    401399print, 'NCEP1' 
    402400print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    403401cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    404  
     402; 
    405403splot, mean_tao, mean_ncep, title='Q2m - TAO Vs NCEP', subtitle='', $ 
    406404     charsize=1.1, xtitle='TAO Q2m', ytitle='NCEP1 Q2m', small=[2,3,5],/noer, psym=2, $ 
     
    409407xyouts, 12,20.2, cstat, charsize=0.9 
    410408xyouts, 12,19.7, 'cor   bias   std   rmsd', charsize=0.9 
    411  
     409; 
    412410ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    413 a=float(ab(0))  
     411a=float(ab(0)) 
    414412b=float(ab(1)) 
    415413oplot, mean_tao, yfit, color=250, thick=2 
    416  
     414; 
    417415closeps 
    418  
     416; 
    419417end 
  • trunk/src/paper01/fig3/read_variables_v2.pro

    r94 r97  
    9090@cm_project 
    9191; 
    92 ;; DEFINE THE OUTPUT TIME AXIS 
     92; DEFINE THE OUTPUT TIME AXIS 
    9393; 
    9494jda1=date2jul(date1) 
     
    9696jpt=(jda2-jda1+1l) 
    9797time=jda1+dindgen(jpt) 
    98  
    99 ; 
    100 ;; FIRST READ ALL DATA FROM SITE 
    101 ;;   - if file exists, extract correct time axis 
    102 ;;   - if not, fill variable with missing values 
    103 ; 
    104 ;;SHORTWAVE 
     98; 
     99; 
     100; FIRST READ ALL DATA FROM SITE 
     101;   - if file exists, extract correct time axis 
     102;   - if not, fill variable with missing values 
     103; 
     104;SHORTWAVE 
    105105fi=project_id_env+'rad'+csite+'_dy.cdf' 
    106106f=file_test(fi) 
     
    121121  print, fi, ' not found' 
    122122endelse 
    123  
     123; 
    124124ind_sw=where(sw_q ne 1. and sw_q ne 2.) 
    125  
    126 ;;LHF 
     125; 
     126;LHF 
    127127fi=project_id_env+'qlat'+csite+'_dy.cdf' 
    128128f=file_test(fi) 
     
    142142  print, fi, ' not found' 
    143143endelse 
    144  
    145 ;;POSITION 
     144; 
     145;POSITION 
    146146fi=project_id_env+'pos'+csite+'_dy.cdf' 
    147147f=file_test(fi) 
     
    161161  print, fi, ' not found' 
    162162endelse 
    163  
    164  
    165 ;;MET PARAMETERS 
     163; 
     164; 
     165;MET PARAMETERS 
    166166fi=project_id_env+'met'+csite+'_dy.cdf' 
    167167f=file_test(fi) 
     
    176176sst=fltarr(jpt)+!values.f_nan 
    177177sst_q=fltarr(jpt)+!values.f_nan 
    178  
     178; 
    179179if (f) then begin 
    180180  tt0=time_lec(fi) 
     
    206206  print, fi, ' not found' 
    207207endelse 
    208  
    209 ind_at=where(at_q ne 1 and at_q ne 2)    
     208; 
     209ind_at=where(at_q ne 1 and at_q ne 2) 
    210210ind_ws=where(ws_q ne 1 and ws_q ne 2) 
    211 ind_rh=where(rh_q ne 1 and rh_q ne 2)    
     211ind_rh=where(rh_q ne 1 and rh_q ne 2) 
    212212ind_sst=where(sst_q ne 1 and sst_q ne 2) 
    213213ind_lh=where(lh_q ne 1 and lh_q ne 2) 
    214  
     214; 
    215215ind=union(ind_at, union(ind_rh, union(ind_ws, union(ind_lh, ind_sst)))) 
    216  
     216; 
    217217if (ind(0) ne -1) then begin 
    218   sw(ind)=!Values.f_nan    
     218  sw(ind)=!Values.f_nan 
    219219  at(ind)=!Values.f_nan 
    220   rh(ind)=!Values.f_nan    
     220  rh(ind)=!Values.f_nan 
    221221  ws(ind)=!Values.f_nan 
    222   sst(ind)=!Values.f_nan   
     222  sst(ind)=!Values.f_nan 
    223223  lh(ind)=!Values.f_nan 
    224   wu(ind)=!Values.f_nan   
     224  wu(ind)=!Values.f_nan 
    225225  wv(ind)=!Values.f_nan 
    226226endif 
    227227; 
    228 ;; Replace missing values by "NaN" 
     228; Replace missing values by "NaN" 
    229229; 
    230230tsvars=['at','sw','rh','sst','wu','wv','ws','lat','lon'] 
     
    233233for n=0,nn-1 do begin 
    234234  var=vars(n) 
    235   com='ind=where('+var+' ge 1.e20)  
     235  com='ind=where('+var+' ge 1.e20) 
    236236  if (ind(0) ne -1) then '+var+'(ind)=!values.f_nan' 
    237237  r=execute(com) 
    238238endfor 
    239  
     239; 
    240240nsmooth=nsmooth 
    241 at=smooth(at,nsmooth,/nan)  
     241at=smooth(at,nsmooth,/nan) 
    242242sst=smooth(sst,nsmooth,/nan) 
    243 lh=smooth(lh,nsmooth,/nan)  
     243lh=smooth(lh,nsmooth,/nan) 
    244244rh=smooth(rh,nsmooth,/nan) 
    245 wu=smooth(wu,nsmooth,/nan)  
     245wu=smooth(wu,nsmooth,/nan) 
    246246wv=smooth(wv,nsmooth,/nan) 
    247 ws=smooth(ws,nsmooth,/nan)  
     247ws=smooth(ws,nsmooth,/nan) 
    248248sw=smooth(sw,nsmooth,/nan) 
    249  
     249; 
    250250end 
    251  
    252  
     251; 
    253252function time_lec, fi 
    254253tt=ncdf_lec(fi,var='time') 
    255 fid=ncdf_open(fi)  
     254fid=ncdf_open(fi) 
    256255vid=ncdf_varid(fid,'time') 
    257256ncdf_attget, fid,vid,'units',orig 
     
    261260dd=long(strmid(orig,19,2)) 
    262261tt=julday(mm,dd,yy,12,00)+tt 
     262; 
    263263return, tt 
     264; 
    264265end 
  • trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro

    r94 r97  
    9595reinitplt, /z,/invert 
    9696key_portrait = 1 
    97  
     97; 
    9898openps, FILENAME = project_od_env+'sst_validation_scatter_2000_2009_v50.ps' 
    99  
    100 ;; Give the location of mooring for validation of basic meteorological variables 
    101  
    102  
     99; 
     100; Give the location of mooring for validation of basic meteorological variables 
     101; 
     102; 
    103103sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    104104           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
     
    111111          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    112112          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    113  
     113; 
    114114ocean='global' 
    115  
    116 nsmooth=1.    ;; statistics are with 7 day smoothed 
    117 ;;   This program will create the following text files with statistics of respective variables 
     115; 
     116nsmooth=1.    ; statistics are with 7 day smoothed 
     117;   This program will create the following text files with statistics of respective variables 
    118118close,/all 
    119  
     119; 
    120120fi_sst_erai=project_id_env+'sst_2000_2009_erai_v50.txt' 
    121121openw,1,fi_sst_erai 
     
    130130fi_sst_ncep1=project_id_env+'sst_2000_2009_ncep1_v50.txt' 
    131131openw,6,fi_sst_ncep1 
    132  
    133  
    134  
     132; 
     133; 
     134; 
    135135printf,1, 'x     y      cor    bias     std     rmsd      mean_tao' 
    136136printf,2, 'x     y      cor    bias     std     rmsd      mean_tao' 
     
    139139printf,5, 'x     y      cor    bias     std     rmsd      mean_tao' 
    140140printf,6, 'x     y      cor    bias     std     rmsd      mean_tao' 
    141  
    142 ;; first reading the whole ERAI uncorrected and corrected data 
    143  
     141; 
     142; first reading the whole ERAI uncorrected and corrected data 
     143; 
    144144file=project_id_env+'erai_sst_19890101_20091231_oafluxgrid.nc' 
    145145initncdf, file 
    146 unc=read_ncdf('sst',date1,date2,file=file,/nostr)  
     146unc=read_ncdf('sst',date1,date2,file=file,/nostr) 
    147147unc=unc-273.15 
    148148help, unc 
    149  
     149; 
    150150file=project_id_env+'TropFlux_sst_19890101_20091231_v20.nc' 
    151151initncdf, file 
    152 cor=read_ncdf('sst',date1,date2,file=file,/nostr)  
     152cor=read_ncdf('sst',date1,date2,file=file,/nostr) 
    153153cor=cor-273.15 
    154154help, cor 
    155  
     155; 
    156156file=project_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    157157initncdf, file 
    158158oaf=read_ncdf("sst", date1, date2, file=file,/nostr) 
    159159help, oaf 
    160  
     160; 
    161161fi=project_id_env+'sst_ncep2_oafluxgrid_19890101_20091231.nc' 
    162162initncdf, fi 
     
    164164nce=nce-273.15 
    165165help, nce 
    166  
     166; 
    167167fi=project_id_env+'tmi_OI_oafluxgrid_30N30S.nc' 
    168168initncdf, fi 
    169169sst_tmi=read_ncdf("sst", date1, date2, file=fi,/nostr) 
    170170help, sst_tmi 
    171  
     171; 
    172172file=project_id_env+'sst_ncep1_19890101_20091231.nc' 
    173173initncdf, file 
     
    175175nce1=nce1-273.15 
    176176help, nce1 
    177  
     177; 
    178178nn=n_elements(sitelist) 
    179179for n=0, nn-1 do begin 
    180  
    181 ;; reading data from mooring 
    182  
    183     site=sitelist(n)  
     180; 
     181; reading data from mooring 
     182; 
     183    site=sitelist(n) 
    184184    csite=site 
    185185    print, csite 
     
    187187    y=y_site_location(site) 
    188188    if (y ge 0. and y le 30.) then y=y+360. 
    189     dx=0.5  
    190     dy=0.5  
     189    dx=0.5 
     190    dy=0.5 
    191191    box=[y-dy, y+dy, x-dx, x+dx] 
    192192    read_variables_v2, csite,date1,date2,nsmooth, $ 
    193193         at, sw,rh,sst,wu,wv,ws,lh 
    194  
    195  
    196     ind=where(finite(sst))  
     194; 
     195; 
     196    ind=where(finite(sst)) 
    197197    valid=n_elements(ind) 
    198  
     198; 
    199199    if (valid ge 180) then begin 
    200  
    201       ;;  extracting the corrected and uncorrected ERAI data at the locations 
     200; 
     201      ;  extracting the corrected and uncorrected ERAI data at the locations 
    202202      nsmooth=1. 
    203  
     203; 
    204204      extract_flux_tropflux,unc,box, $ 
    205205        tropflux 
    206206      uncr=tropflux 
    207  
     207; 
    208208      extract_flux_tropflux,cor,box, $ 
    209209        tropflux 
    210210      corr=tropflux 
    211  
     211; 
    212212      extract_flux_tropflux,oaf,box, $ 
    213213        tropflux 
    214214      oafl=tropflux 
    215  
     215; 
    216216      extract_flux_tropflux,nce,box, $ 
    217217        tropflux 
    218218      ncep=tropflux 
    219  
     219; 
    220220      extract_flux_tropflux,sst_tmi,box, $ 
    221221        tropflux 
    222222      tmi=tropflux 
    223  
     223; 
    224224      extract_flux_tropflux,nce1,box, $ 
    225225        tropflux 
    226226      ncep1=tropflux 
    227  
    228  
    229       ind=where(finite(sst))  
    230       sst=sst(ind)  
    231       uncr_sst=uncr(ind)   
     227; 
     228; 
     229      ind=where(finite(sst)) 
     230      sst=sst(ind) 
     231      uncr_sst=uncr(ind) 
    232232      corr_sst=corr(ind) 
    233       oafl=oafl(ind)  
    234       ncep=ncep(ind)  
    235       tmi=tmi(ind)  
     233      oafl=oafl(ind) 
     234      ncep=ncep(ind) 
     235      tmi=tmi(ind) 
    236236      ncep1=ncep1(ind) 
    237237      mean_tao=total(sst,/nan)/n_elements(ind) 
    238  
     238; 
    239239      statistics_3var_v1, sst, uncr_sst, corr_sst, $ 
    240240         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    241  
     241; 
    242242      printf, 1, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    243243      printf, 2, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    244  
     244; 
    245245      statistics_3var_v1, sst, oafl, ncep, $ 
    246246         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    247247      printf, 3, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    248248      printf, 4, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f6.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    249  
     249; 
    250250      statistics_3var_v1, sst, tmi, ncep1, $ 
    251251         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    252252      printf, 5, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    253253      printf, 6, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f6.2)' 
    254  
     254; 
    255255  endif 
    256  
     256; 
    257257endfor 
    258258close,/all 
    259  
     259; 
    260260fi_sst_erai=project_id_env+'sst_2000_2009_v50_erai.txt' 
    261261res=read_ascii(fi_sst_erai,data_start=1) 
     
    263263lat=reform(ff(0,*)) 
    264264lon=reform(ff(1,*)) 
    265 cor_era=reform(ff(2,*))    
     265cor_era=reform(ff(2,*)) 
    266266cor_erai=total(cor_era)/n_elements(cor_era) 
    267 bias_era=reform(ff(3,*))   
     267bias_era=reform(ff(3,*)) 
    268268bias_erai=total(bias_era)/n_elements(bias_era) 
    269 std_era=reform(ff(4,*))    
     269std_era=reform(ff(4,*)) 
    270270std_erai=total(std_era)/n_elements(std_era) 
    271 rmsd_era=reform(ff(5,*))   
     271rmsd_era=reform(ff(5,*)) 
    272272rmsd_erai=total(rmsd_era)/n_elements(rmsd_era) 
    273 mean_tao=reform(ff(6,*))   
     273mean_tao=reform(ff(6,*)) 
    274274mean_erai=bias_era+mean_tao 
    275  
     275; 
    276276print, '' 
    277277print, 'ERAI' 
     
    283283xyouts, 22.3,30.2, cstat, charsize=0.9 
    284284xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    285  
     285; 
    286286oplot, [22,31], [22,31] 
    287287ab=linfit(mean_tao, mean_erai,yfit=yfit) 
    288 a=float(ab(0))  
    289 b=float(ab(1)) 
    290 oplot, mean_tao, yfit, color=250, thick=2 
    291  
     288a=float(ab(0)) 
     289b=float(ab(1)) 
     290oplot, mean_tao, yfit, color=250, thick=2 
     291; 
    292292fi_sst_trop=project_id_env+'sst_2000_2009_v50_trop.txt' 
    293293res=read_ascii(fi_sst_trop,data_start=1) 
     
    295295lat=reform(ff(0,*)) 
    296296lon=reform(ff(1,*)) 
    297 cor_tro=reform(ff(2,*))    
     297cor_tro=reform(ff(2,*)) 
    298298cor_trop=total(cor_tro)/n_elements(cor_tro) 
    299 bias_tro=reform(ff(3,*))   
     299bias_tro=reform(ff(3,*)) 
    300300bias_trop=total(bias_tro)/n_elements(bias_tro) 
    301 std_tro=reform(ff(4,*))    
     301std_tro=reform(ff(4,*)) 
    302302std_trop=total(std_tro)/n_elements(std_tro) 
    303 rmsd_tro=reform(ff(5,*))   
     303rmsd_tro=reform(ff(5,*)) 
    304304rmsd_trop=total(rmsd_tro)/n_elements(rmsd_tro) 
    305 mean_tao=reform(ff(6,*))   
     305mean_tao=reform(ff(6,*)) 
    306306mean_trop=bias_tro+mean_tao 
    307  
     307; 
    308308print, '' 
    309309print, 'TropFlux' 
    310310print, cor_trop, bias_trop, std_trop, rmsd_trop 
    311311cstat=string(cor_trop, bias_trop, std_trop, rmsd_trop, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    312  
     312; 
    313313splot, mean_tao, mean_trop, title='SST - TAO Vs TropFlux', subtitle='', $ 
    314314     charsize=1.1, xtitle='TAO SST', ytitle='TropFlux SST', small=[2,3,2],/noer, psym=2, $ 
     
    317317xyouts, 22.3,30.2, cstat, charsize=0.9 
    318318xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    319  
     319; 
    320320ab=linfit(mean_tao, mean_trop,yfit=yfit) 
    321 a=float(ab(0))  
    322 b=float(ab(1)) 
    323 oplot, mean_tao, yfit, color=250, thick=2 
    324  
     321a=float(ab(0)) 
     322b=float(ab(1)) 
     323oplot, mean_tao, yfit, color=250, thick=2 
     324; 
    325325fi_sst_oaflx=project_id_env+'sst_2000_2009_v50_oaflx.txt' 
    326326res=read_ascii(fi_sst_oaflx,data_start=1) 
     
    328328lat=reform(ff(0,*)) 
    329329lon=reform(ff(1,*)) 
    330 cor_oaf=reform(ff(2,*))    
     330cor_oaf=reform(ff(2,*)) 
    331331cor_oafl=total(cor_oaf)/n_elements(cor_oaf) 
    332 bias_oaf=reform(ff(3,*))   
     332bias_oaf=reform(ff(3,*)) 
    333333bias_oafl=total(bias_oaf)/n_elements(bias_oaf) 
    334 std_oaf=reform(ff(4,*))    
     334std_oaf=reform(ff(4,*)) 
    335335std_oafl=total(std_oaf)/n_elements(std_oaf) 
    336 rmsd_oaf=reform(ff(5,*))   
     336rmsd_oaf=reform(ff(5,*)) 
    337337rmsd_oafl=total(rmsd_oaf)/n_elements(rmsd_oaf) 
    338 mean_tao=reform(ff(6,*))   
     338mean_tao=reform(ff(6,*)) 
    339339mean_oafl=bias_oaf+mean_tao 
    340  
     340; 
    341341print, '' 
    342342print, 'OAFlux' 
    343343print, cor_oafl, bias_oafl, std_oafl, rmsd_oafl 
    344344cstat=string(cor_oafl, bias_oafl, std_oafl, rmsd_oafl, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    345  
     345; 
    346346splot, mean_tao, mean_oafl, title='SST - TAO Vs OAFlux', subtitle='', $ 
    347347     charsize=1.1, xtitle='TAO SST', ytitle='OAFlux SST', small=[2,3,3],/noer, psym=2, $ 
     
    350350xyouts, 22.3,30.2, cstat, charsize=0.9 
    351351xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    352  
     352; 
    353353ab=linfit(mean_tao, mean_oafl,yfit=yfit) 
    354 a=float(ab(0))  
    355 b=float(ab(1)) 
    356 oplot, mean_tao, yfit, color=250, thick=2 
    357  
    358  
    359  
     354a=float(ab(0)) 
     355b=float(ab(1)) 
     356oplot, mean_tao, yfit, color=250, thick=2 
     357; 
     358; 
     359; 
    360360fi_sst_ncep=project_id_env+'sst_2000_2009_v50_ncep.txt' 
    361361res=read_ascii(fi_sst_ncep,data_start=1) 
     
    363363lat=reform(ff(0,*)) 
    364364lon=reform(ff(1,*)) 
    365 cor_nce=reform(ff(2,*))    
     365cor_nce=reform(ff(2,*)) 
    366366cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    367 bias_nce=reform(ff(3,*))   
     367bias_nce=reform(ff(3,*)) 
    368368bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    369 std_nce=reform(ff(4,*))    
     369std_nce=reform(ff(4,*)) 
    370370std_ncep=total(std_nce)/n_elements(std_nce) 
    371 rmsd_nce=reform(ff(5,*))   
     371rmsd_nce=reform(ff(5,*)) 
    372372rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    373 mean_tao=reform(ff(6,*))   
     373mean_tao=reform(ff(6,*)) 
    374374mean_ncep=bias_nce+mean_tao 
    375  
     375; 
    376376print, '' 
    377377print, 'NCEP2' 
    378378print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    379379cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    380  
     380; 
    381381splot, mean_tao, mean_ncep, title='SST - TAO Vs NCEP2', subtitle='', $ 
    382382     charsize=1.1, xtitle='TAO SST', ytitle='NCEP2 SST', small=[2,3,4],/noer, psym=2, $ 
     
    385385xyouts, 22.3,30.2, cstat, charsize=0.9 
    386386xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    387  
     387; 
    388388ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    389 a=float(ab(0))  
    390 b=float(ab(1)) 
    391 oplot, mean_tao, yfit, color=250, thick=2 
    392  
    393  
     389a=float(ab(0)) 
     390b=float(ab(1)) 
     391oplot, mean_tao, yfit, color=250, thick=2 
     392; 
     393; 
    394394fi_sst_tmi=project_id_env+'sst_2000_2009_v50_tmi.txt' 
    395395res=read_ascii(fi_sst_tmi,data_start=1) 
     
    397397lat=reform(ff(0,*)) 
    398398lon=reform(ff(1,*)) 
    399 cor_tm=reform(ff(2,*))    
     399cor_tm=reform(ff(2,*)) 
    400400cor_tmi=total(cor_tm)/n_elements(cor_tm) 
    401 bias_tm=reform(ff(3,*))   
     401bias_tm=reform(ff(3,*)) 
    402402bias_tmi=total(bias_tm)/n_elements(bias_tm) 
    403 std_tm=reform(ff(4,*))    
     403std_tm=reform(ff(4,*)) 
    404404std_tmi=total(std_tm)/n_elements(std_tm) 
    405 rmsd_tm=reform(ff(5,*))   
     405rmsd_tm=reform(ff(5,*)) 
    406406rmsd_tmi=total(rmsd_tm)/n_elements(rmsd_tm) 
    407 mean_tao=reform(ff(6,*))   
     407mean_tao=reform(ff(6,*)) 
    408408mean_tmi=bias_tm+mean_tao 
    409  
     409; 
    410410print, '' 
    411411print, 'TMI' 
    412412print, cor_tmi, bias_tmi, std_tmi, rmsd_tmi 
    413413cstat=string(cor_tmi, bias_tmi, std_tmi, rmsd_tmi, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    414  
     414; 
    415415splot, mean_tao, mean_tmi, title='SST - TAO Vs TMI', subtitle='', $ 
    416416     charsize=1.1, xtitle='TAO SST', ytitle='TMI SST', small=[2,3,5],/noer, psym=2, $ 
     
    419419xyouts, 22.3,30.2, cstat, charsize=0.9 
    420420xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    421  
     421; 
    422422ab=linfit(mean_tao, mean_tmi,yfit=yfit) 
    423 a=float(ab(0))  
    424 b=float(ab(1)) 
    425 oplot, mean_tao, yfit, color=250, thick=2 
    426  
     423a=float(ab(0)) 
     424b=float(ab(1)) 
     425oplot, mean_tao, yfit, color=250, thick=2 
     426; 
    427427fi_sst_ncep1=project_id_env+'sst_2000_2009_v50_ncep1.txt' 
    428428res=read_ascii(fi_sst_ncep1,data_start=1) 
     
    430430lat=reform(ff(0,*)) 
    431431lon=reform(ff(1,*)) 
    432 cor_nce=reform(ff(2,*))    
     432cor_nce=reform(ff(2,*)) 
    433433cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    434 bias_nce=reform(ff(3,*))   
     434bias_nce=reform(ff(3,*)) 
    435435bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    436 std_nce=reform(ff(4,*))    
     436std_nce=reform(ff(4,*)) 
    437437std_ncep=total(std_nce)/n_elements(std_nce) 
    438 rmsd_nce=reform(ff(5,*))   
     438rmsd_nce=reform(ff(5,*)) 
    439439rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    440 mean_tao=reform(ff(6,*))   
     440mean_tao=reform(ff(6,*)) 
    441441mean_ncep=bias_nce+mean_tao 
    442  
     442; 
    443443print, '' 
    444444print, 'NCEP1' 
    445445print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    446446cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    447  
     447; 
    448448splot, mean_tao, mean_ncep, title='SST - TAO Vs NCEP_NCAR', subtitle='', $ 
    449449     charsize=1.1, xtitle='TAO SST', ytitle='NCEP SST', small=[2,3,6],/noer, psym=2, $ 
     
    452452xyouts, 22.3,30.2, cstat, charsize=0.9 
    453453xyouts, 22.3,29.5, 'cor   bias   std   rmsd', charsize=0.9 
    454  
     454; 
    455455ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    456 a=float(ab(0))  
    457 b=float(ab(1)) 
    458 oplot, mean_tao, yfit, color=250, thick=2 
    459  
     456a=float(ab(0)) 
     457b=float(ab(1)) 
     458oplot, mean_tao, yfit, color=250, thick=2 
     459; 
    460460closeps 
    461  
     461; 
    462462end 
  • trunk/src/paper01/fig3/statistics_3var_v1.pro

    r94 r97  
    5151pro statistics_3var_v1, tao,var1,var2, $ 
    5252    cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    53  
     53; 
    5454@cm_project 
    55 x=tao  
    56 y=var1  
     55x=tao 
     56y=var1 
    5757z=var2 
    58  
    59 ind1=where(finite(x,/nan))  
    60 ind2=where(finite(y,/nan))  
     58; 
     59ind1=where(finite(x,/nan)) 
     60ind2=where(finite(y,/nan)) 
    6161ind3=where(finite(z,/nan)) 
    6262ind=inter(ind1,union(ind2,ind3)) 
    63  
     63; 
    6464if (ind ne -1.) then begin 
    65    x(ind)=!Values.f_nan  
    66    y(ind)=!Values.f_nan  
     65   x(ind)=!Values.f_nan 
     66   y(ind)=!Values.f_nan 
    6767   z(ind)=!Values.f_nan 
    6868endif 
    69  
    70 nsmooth=5   ;; applying a 5 day smoothing 
    71  
     69; 
     70nsmooth=5   ; applying a 5 day smoothing 
     71; 
    7272x=ts_smooth(x,nsmooth,/nan) 
    7373y=ts_smooth(y,nsmooth,/nan) 
    7474z=ts_smooth(z,nsmooth,/nan) 
    75  
     75; 
    7676ind1=where(finite(x)) 
    7777ind2=where(finite(y)) 
     
    8282z=z(ind) 
    8383nn=n_elements(ind) 
    84  
     84; 
    8585cor1=correlate(x,y) 
    86 cor2=correlate(x,z)   
    87 ;; cor1=correlation(tropflux,tao) cor2=correlation(tropflux,rec) 
     86cor2=correlate(x,z) 
     87; cor1=correlation(tropflux,tao) cor2=correlation(tropflux,rec) 
    8888xxx=moment(x) 
    8989; mean1 and std1 --> for tropflux 
    90 mean1=xxx(0)  
    91 std1=sqrt(xxx(1))  
     90mean1=xxx(0) 
     91std1=sqrt(xxx(1)) 
    9292xxx=moment(y) 
    93 ;; mean2 and std2 --> for tao 
    94 mean2=xxx(0)  
     93; mean2 and std2 --> for tao 
     94mean2=xxx(0) 
    9595std2=sqrt(xxx(1)) 
    9696xxx=moment(z) 
    97 ;; mean3 and std3 --> for rec 
    98 mean3=xxx(0)  
    99 std3=sqrt(xxx(1))     
    100  
     97; mean3 and std3 --> for rec 
     98mean3=xxx(0) 
     99std3=sqrt(xxx(1)) 
     100; 
    101101bias1=mean2-mean1 
    102102st1=std2/std1 
    103 bias2=mean3-mean1  
     103bias2=mean3-mean1 
    104104st2=std3/std1 
    105  
    106 std1=st1  
     105; 
     106std1=st1 
    107107std2=st2 
    108108rmsd1=sqrt(total((x-y)*(x-y))/n_elements(x)) 
    109109rmsd2=sqrt(total((x-z)*(x-z))/n_elements(x)) 
    110  
     110; 
    111111end 
  • trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro

    r94 r97  
    9494reinitplt, /z,/invert 
    9595key_portrait = 1 
    96  
     96; 
    9797openps, FILENAME = project_od_env+'ws_validation_scatter_2000_2009_v50.ps' 
    98  
    99 ;; Give the location of mooring for validation of basic meteorological variables 
    100  
    101  
     98; 
     99; Give the location of mooring for validation of basic meteorological variables 
     100; 
     101; 
    102102sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ 
    103103           '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ 
     
    110110          '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ 
    111111          '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] 
    112  
     112; 
    113113ocean='global' 
    114  
    115 da1=10000101  
     114; 
     115da1=10000101 
    116116da2=10081231 
    117 nsmooth=1.    ;; statistics are with 7 day smoothed 
    118 ;;   This program will create the following text files with statistics of respective variables 
     117nsmooth=1.    ; statistics are with 7 day smoothed 
     118;   This program will create the following text files with statistics of respective variables 
    119119close,/all 
    120  
     120; 
    121121fi_ws_erai=project_id_env+'ws_2000_2009_erai_v50.txt' 
    122122openw,1,fi_ws_erai 
     
    131131fi_ws_ncep1=project_id_env+'ws_2000_2009_ncep1_v50.txt' 
    132132openw,6,fi_ws_ncep1 
    133  
    134  
     133; 
     134; 
    135135printf,1, 'x     y      cor    bias     std     rmsd      mean_tao' 
    136136printf,2, 'x     y      cor    bias     std     rmsd      mean_tao' 
     
    139139printf,5, 'x     y      cor    bias     std     rmsd      mean_tao' 
    140140printf,6, 'x     y      cor    bias     std     rmsd      mean_tao' 
    141  
    142 ;; first reading the whole ERAI uncorrected and corrected data 
    143  
     141; 
     142; first reading the whole ERAI uncorrected and corrected data 
     143; 
    144144file=project_id_env+'erai_ws_19890101_20091231_oafluxgrid.nc' 
    145145initncdf, file 
     
    148148unc=sqrt(u*u+v*v) 
    149149help, unc 
    150  
     150; 
    151151file=project_id_env+'TropFlux_ws_19890101_20091231_v20.nc' 
    152152initncdf, file 
    153153cor=read_ncdf('ws',date1,date2,file=file,/nostr) 
    154154help, cor 
    155  
     155; 
    156156file=project_id_env+'OAFlux_basic_variables_1985_2009.nc' 
    157157initncdf, file 
    158158oaf=read_ncdf("wind", date1, date2, file=file,/nostr) 
    159159help, oaf 
    160  
     160; 
    161161fi=project_id_env+'uwind_ncep2_oafluxgrid_19890101_20091231.nc' 
    162162initncdf, fi 
     
    167167nce=sqrt(u*u+v*v) 
    168168help, nce 
    169  
     169; 
    170170fi=project_id_env+'zonal_wind_speed_oafluxgrid_30N30S.nc' 
    171171initncdf, fi 
     
    176176ws_tmi=sqrt(u*u+v*v) 
    177177help, ws_tmi 
    178  
     178; 
    179179file=project_id_env+'wind_ncep1_19890101_20091231.nc' 
    180180initncdf, file 
     
    183183nce1=sqrt(u*u+v*v) 
    184184help, nce1 
    185  
     185; 
    186186nn=n_elements(sitelist) 
    187187for n=0, nn-1 do begin 
    188  
    189 ;; reading data from mooring 
    190  
    191     site=sitelist(n)  
     188; 
     189; reading data from mooring 
     190; 
     191    site=sitelist(n) 
    192192    csite=site 
    193193    print, csite 
     
    195195    y=y_site_location(site) 
    196196    if (y ge 0. and y le 30.) then y=y+360. 
    197     dx=0.5  
    198     dy=0.5  
     197    dx=0.5 
     198    dy=0.5 
    199199    box=[y-dy, y+dy, x-dx, x+dx] 
    200200    read_variables_v2, csite,date1,date2,nsmooth, $ 
    201201         at, sw,rh,sst,wu,wv,ws, lh 
    202  
     202; 
    203203    ws=alog(10./0.000152)/alog(4./0.000152)*ws 
    204  
    205 ;;  extracting the corrected and uncorrected ERAI data at the locations 
     204; 
     205;  extracting the corrected and uncorrected ERAI data at the locations 
    206206    nsmooth=1. 
    207  
     207; 
    208208    extract_flux_tropflux,unc,box, $ 
    209209        tropflux 
    210210    uncr=tropflux 
    211  
     211; 
    212212     extract_flux_tropflux,cor,box, $ 
    213213        tropflux 
    214214     corr=tropflux 
    215  
     215; 
    216216     extract_flux_tropflux,oaf,box, $ 
    217217        tropflux 
    218218     oafl=tropflux 
    219  
     219; 
    220220     extract_flux_tropflux,nce,box, $ 
    221221        tropflux 
    222222     ncep=tropflux 
    223  
     223; 
    224224     extract_flux_tropflux,ws_tmi,box, $ 
    225225        tropflux 
    226226     tmi=tropflux 
    227  
     227; 
    228228     extract_flux_tropflux,nce1,box, $ 
    229229        tropflux 
    230230     ncep1=tropflux 
    231  
    232     ind=where(finite(ws))  
    233     ws=ws(ind)  
    234     uncr_ws=uncr(ind)   
     231; 
     232    ind=where(finite(ws)) 
     233    ws=ws(ind) 
     234    uncr_ws=uncr(ind) 
    235235    corr_ws=corr(ind) 
    236     oafl=oafl(ind)  
    237     ncep=ncep(ind)  
    238     tmi=tmi(ind)  
     236    oafl=oafl(ind) 
     237    ncep=ncep(ind) 
     238    tmi=tmi(ind) 
    239239    ncep1=ncep1(ind) 
    240  
     240; 
    241241    mean_tao=total(ws)/n_elements(ws) 
    242  
     242; 
    243243    statistics_3var_v1, ws, uncr_ws, corr_ws, $ 
    244244         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    245  
     245; 
    246246    printf, 1, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    247247    printf, 2, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    248  
     248; 
    249249    statistics_3var_v1, ws, oafl, ncep, $ 
    250250         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    251251    printf, 3, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    252252    printf, 4, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f6.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    253  
     253; 
    254254    statistics_3var_v1, ws, tmi, ncep1, $ 
    255255         cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    256256    printf, 5, x, y, cor1, bias1, std1, rmsd1, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    257257    printf, 6, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f5.2,3x,f5.2,3x,f4.2,3x,f4.2,3x,f5.2)' 
    258  
     258; 
    259259endfor 
    260260close,/all 
     
    264264lat=reform(ff(0,*)) 
    265265lon=reform(ff(1,*)) 
    266 cor_era=reform(ff(2,*))    
     266cor_era=reform(ff(2,*)) 
    267267cor_erai=total(cor_era)/n_elements(cor_era) 
    268 bias_era=reform(ff(3,*))   
     268bias_era=reform(ff(3,*)) 
    269269bias_erai=total(bias_era)/n_elements(bias_era) 
    270 std_era=reform(ff(4,*))    
     270std_era=reform(ff(4,*)) 
    271271std_erai=total(std_era)/n_elements(std_era) 
    272 rmsd_era=reform(ff(5,*))   
     272rmsd_era=reform(ff(5,*)) 
    273273rmsd_erai=total(rmsd_era)/n_elements(rmsd_era) 
    274 mean_tao=reform(ff(6,*))   
     274mean_tao=reform(ff(6,*)) 
    275275mean_erai=bias_era+mean_tao 
    276  
     276; 
    277277print, '' 
    278278print, 'ERAI' 
     
    284284xyouts, 2.5,9.4, cstat, charsize=0.9 
    285285xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    286  
     286; 
    287287oplot, [2,10], [2,10] 
    288288ab=linfit(mean_tao, mean_erai,yfit=yfit) 
    289 a=float(ab(0))  
    290 b=float(ab(1)) 
    291 oplot, mean_tao, yfit, color=250, thick=2 
    292  
     289a=float(ab(0)) 
     290b=float(ab(1)) 
     291oplot, mean_tao, yfit, color=250, thick=2 
     292; 
    293293fi_ws_trop=project_id_env+'ws_2000_2009_trop_v50.txt' 
    294294res=read_ascii(fi_ws_trop,data_start=1) 
     
    296296lat=reform(ff(0,*)) 
    297297lon=reform(ff(1,*)) 
    298 cor_tro=reform(ff(2,*))    
     298cor_tro=reform(ff(2,*)) 
    299299cor_trop=total(cor_tro)/n_elements(cor_tro) 
    300 bias_tro=reform(ff(3,*))   
     300bias_tro=reform(ff(3,*)) 
    301301bias_trop=total(bias_tro)/n_elements(bias_tro) 
    302 std_tro=reform(ff(4,*))    
     302std_tro=reform(ff(4,*)) 
    303303std_trop=total(std_tro)/n_elements(std_tro) 
    304 rmsd_tro=reform(ff(5,*))   
     304rmsd_tro=reform(ff(5,*)) 
    305305rmsd_trop=total(rmsd_tro)/n_elements(rmsd_tro) 
    306 mean_tao=reform(ff(6,*))   
     306mean_tao=reform(ff(6,*)) 
    307307mean_trop=bias_tro+mean_tao 
    308  
     308; 
    309309print, '' 
    310310print, 'TropFlux' 
    311311print, cor_trop, bias_trop, std_trop, rmsd_trop 
    312312cstat=string(cor_trop, bias_trop, std_trop, rmsd_trop, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    313  
     313; 
    314314splot, mean_tao, mean_trop, title='WS - TAO Vs TropFlux', subtitle='', $ 
    315315     charsize=1.1, xtitle='TAO WS', ytitle='TropFlux WS', small=[2,3,2],/noer, psym=2, $ 
     
    318318xyouts, 2.5,9.4, cstat, charsize=0.9 
    319319xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    320  
     320; 
    321321ab=linfit(mean_tao, mean_trop,yfit=yfit) 
    322 a=float(ab(0))  
    323 b=float(ab(1)) 
    324 oplot, mean_tao, yfit, color=250, thick=2 
    325  
     322a=float(ab(0)) 
     323b=float(ab(1)) 
     324oplot, mean_tao, yfit, color=250, thick=2 
     325; 
    326326fi_ws_oaflx=project_id_env+'ws_2000_2009_oaflx_v50.txt' 
    327327res=read_ascii(fi_ws_oaflx,data_start=1) 
     
    329329lat=reform(ff(0,*)) 
    330330lon=reform(ff(1,*)) 
    331 cor_oaf=reform(ff(2,*))    
     331cor_oaf=reform(ff(2,*)) 
    332332cor_oafl=total(cor_oaf)/n_elements(cor_oaf) 
    333 bias_oaf=reform(ff(3,*))   
     333bias_oaf=reform(ff(3,*)) 
    334334bias_oafl=total(bias_oaf)/n_elements(bias_oaf) 
    335 std_oaf=reform(ff(4,*))    
     335std_oaf=reform(ff(4,*)) 
    336336std_oafl=total(std_oaf)/n_elements(std_oaf) 
    337 rmsd_oaf=reform(ff(5,*))   
     337rmsd_oaf=reform(ff(5,*)) 
    338338rmsd_oafl=total(rmsd_oaf)/n_elements(rmsd_oaf) 
    339 mean_tao=reform(ff(6,*))   
     339mean_tao=reform(ff(6,*)) 
    340340mean_oafl=bias_oaf+mean_tao 
    341  
     341; 
    342342print, '' 
    343343print, 'OAFlux' 
    344344print, cor_oafl, bias_oafl, std_oafl, rmsd_oafl 
    345345cstat=string(cor_oafl, bias_oafl, std_oafl, rmsd_oafl, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    346  
     346; 
    347347splot, mean_tao, mean_oafl, title='WS - TAO Vs OAFlux', subtitle='', $ 
    348348     charsize=1.1, xtitle='TAO WS', ytitle='OAFlux WS', small=[2,3,3],/noer, psym=2, $ 
     
    351351xyouts, 2.5,9.4, cstat, charsize=0.9 
    352352xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    353  
     353; 
    354354ab=linfit(mean_tao, mean_oafl,yfit=yfit) 
    355 a=float(ab(0))  
    356 b=float(ab(1)) 
    357 oplot, mean_tao, yfit, color=250, thick=2 
    358  
    359  
    360  
     355a=float(ab(0)) 
     356b=float(ab(1)) 
     357oplot, mean_tao, yfit, color=250, thick=2 
     358; 
     359; 
     360; 
    361361fi_ws_ncep=project_id_env+'ws_2000_2009_ncep_v50.txt' 
    362362res=read_ascii(fi_ws_ncep,data_start=1) 
     
    364364lat=reform(ff(0,*)) 
    365365lon=reform(ff(1,*)) 
    366 cor_nce=reform(ff(2,*))    
     366cor_nce=reform(ff(2,*)) 
    367367cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    368 bias_nce=reform(ff(3,*))   
     368bias_nce=reform(ff(3,*)) 
    369369bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    370 std_nce=reform(ff(4,*))    
     370std_nce=reform(ff(4,*)) 
    371371std_ncep=total(std_nce)/n_elements(std_nce) 
    372 rmsd_nce=reform(ff(5,*))   
     372rmsd_nce=reform(ff(5,*)) 
    373373rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    374 mean_tao=reform(ff(6,*))   
     374mean_tao=reform(ff(6,*)) 
    375375mean_ncep=bias_nce+mean_tao 
    376  
     376; 
    377377print, '' 
    378378print, 'NCEP2' 
    379379print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    380380cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    381  
     381; 
    382382splot, mean_tao, mean_ncep, title='WS - TAO Vs NCEP2', subtitle='', $ 
    383383     charsize=1.1, xtitle='TAO WS', ytitle='NCEP2 WS', small=[2,3,4],/noer, psym=2, $ 
     
    386386xyouts, 2.5,9.4, cstat, charsize=0.9 
    387387xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    388  
     388; 
    389389ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    390 a=float(ab(0))  
    391 b=float(ab(1)) 
    392 oplot, mean_tao, yfit, color=250, thick=2 
    393  
     390a=float(ab(0)) 
     391b=float(ab(1)) 
     392oplot, mean_tao, yfit, color=250, thick=2 
     393; 
    394394fi_ws_tmi=project_id_env+'ws_2000_2009_tmi_v50.txt' 
    395395res=read_ascii(fi_ws_tmi,data_start=1) 
     
    397397lat=reform(ff(0,*)) 
    398398lon=reform(ff(1,*)) 
    399 cor_tm=reform(ff(2,*))    
     399cor_tm=reform(ff(2,*)) 
    400400cor_tmi=total(cor_tm)/n_elements(cor_tm) 
    401 bias_tm=reform(ff(3,*))   
     401bias_tm=reform(ff(3,*)) 
    402402bias_tmi=total(bias_tm)/n_elements(bias_tm) 
    403 std_tm=reform(ff(4,*))    
     403std_tm=reform(ff(4,*)) 
    404404std_tmi=total(std_tm)/n_elements(std_tm) 
    405 rmsd_tm=reform(ff(5,*))   
     405rmsd_tm=reform(ff(5,*)) 
    406406rmsd_tmi=total(rmsd_tm)/n_elements(rmsd_tm) 
    407 mean_tao=reform(ff(6,*))   
     407mean_tao=reform(ff(6,*)) 
    408408mean_tmi=bias_tm+mean_tao 
    409  
     409; 
    410410print, '' 
    411411print, 'Qscat' 
    412412print, cor_tmi, bias_tmi, std_tmi, rmsd_tmi 
    413413cstat=string(cor_tmi, bias_tmi, std_tmi, rmsd_tmi, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    414  
     414; 
    415415splot, mean_tao, mean_tmi, title='WS - TAO Vs Qscat', subtitle='', $ 
    416416     charsize=1.1, xtitle='TAO WS', ytitle='TMI WS', small=[2,3,5],/noer, psym=2, $ 
     
    419419xyouts, 2.5,9.4, cstat, charsize=0.9 
    420420xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    421  
     421; 
    422422ab=linfit(mean_tao, mean_tmi,yfit=yfit) 
    423 a=float(ab(0))  
    424 b=float(ab(1)) 
    425 oplot, mean_tao, yfit, color=250, thick=2 
    426  
    427  
     423a=float(ab(0)) 
     424b=float(ab(1)) 
     425oplot, mean_tao, yfit, color=250, thick=2 
     426; 
     427; 
    428428fi_ws_ncep1=project_id_env+'ws_2000_2009_ncep1_v50.txt' 
    429429res=read_ascii(fi_ws_ncep1,data_start=1) 
     
    431431lat=reform(ff(0,*)) 
    432432lon=reform(ff(1,*)) 
    433 cor_nce=reform(ff(2,*))    
     433cor_nce=reform(ff(2,*)) 
    434434cor_ncep=total(cor_nce)/n_elements(cor_nce) 
    435 bias_nce=reform(ff(3,*))   
     435bias_nce=reform(ff(3,*)) 
    436436bias_ncep=total(bias_nce)/n_elements(bias_nce) 
    437 std_nce=reform(ff(4,*))    
     437std_nce=reform(ff(4,*)) 
    438438std_ncep=total(std_nce)/n_elements(std_nce) 
    439 rmsd_nce=reform(ff(5,*))   
     439rmsd_nce=reform(ff(5,*)) 
    440440rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) 
    441 mean_tao=reform(ff(6,*))   
     441mean_tao=reform(ff(6,*)) 
    442442mean_ncep=bias_nce+mean_tao 
    443  
     443; 
    444444print, '' 
    445445print, 'NCEP' 
    446446print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep 
    447447cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') 
    448  
     448; 
    449449splot, mean_tao, mean_ncep, title='WS - TAO Vs NCEP', subtitle='', $ 
    450450     charsize=1.1, xtitle='TAO WS', ytitle='NCEP WS', small=[2,3,6],/noer, psym=2, $ 
     
    453453xyouts, 2.5,9.4, cstat, charsize=0.9 
    454454xyouts, 2.5,8.5, 'cor   bias   std   rmsd', charsize=0.9 
    455  
     455; 
    456456ab=linfit(mean_tao, mean_ncep,yfit=yfit) 
    457 a=float(ab(0))  
    458 b=float(ab(1)) 
    459 oplot, mean_tao, yfit, color=250, thick=2 
    460  
     457a=float(ab(0)) 
     458b=float(ab(1)) 
     459oplot, mean_tao, yfit, color=250, thick=2 
     460; 
    461461closeps 
    462  
     462; 
    463463end 
Note: See TracChangeset for help on using the changeset viewer.