;+ ; .. _ws_validation_scatter_2000_2009_v50.pro: ; ; ======================================= ; ws_validation_scatter_2000_2009_v50.pro ; ======================================= ; ; DESCRIPTION ; =========== ; ; .. graphviz:: ; ; digraph ws_validation_scatter_2000_2009_v50 { ; ; ws_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/ws_2000_2009_erai_v50.txt"]; ; ws_tropflux [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_2000_2009_trop_v50.txt"]; ; ws_oaflux [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_2000_2009_oaflx_v50.txt"]; ; ws_ncep [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_2000_2009_ncep_v50.txt"]; ; ws_ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_2000_2009_ncep1_v50.txt"]; ; ws_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_ws_19890101_20091231_oafluxgrid.nc"]; ; ws_tropflux_2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/TropFlux_ws_19890101_20091231_v20.nc"]; ; oaflux_basic [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/OAFlux_basic_variables_1985_2009.nc"]; ; uwind_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/uwind_ncep2_oafluxgrid_19890101_20091231.nc"]; ; vwind_ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/bwind_ncep2_oafluxgrid_19890101_20091231.nc"]; ; ws_tmi [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/zonal_wind_speed_oafluxgrid_30N30S.nc"]; ; ; figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_validation_scatter_2000_2009_v50.ps"]; ; ; ws_validation_scatter_2000_2009_v50 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro", ; label="${TROPFLUX}/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro"]; ; ; {ws_erai ws_erai_oafluxgrid ws_tropflux_2 oaflux_basic ws_ncep2 ws_tmi_2 ws_ncep1_2} -> {ws_validation_scatter_2000_2009_v50} -> {ws_tropflux ws_oaflux ws_tmi ws_ncep ws_ncep1 figure} ; } ; ; SEE ALSO ; ======== ; ; :ref:`project_profile.sh` ; :ref:`project_init.pro` ; :ref:`cm_project.pro` ; ; :func:`x_site_location` ; :func:`y_site_location` ; ; :ref:`read_variables_v2.pro` ; :ref:`statistics_3var_v1.pro` ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> date1=19890101L ; IDL> date2=20091231L ; IDL> ws_validation_scatter_2000_2009_v50, date1, date2 ; ; TODO ; ==== ; ; make it work on cratos : missing data ; ; ++ mooring data in graphviz ; ; coding rules ; ; complete description ; ; handle IO error ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; $URL$ ; ; - fplod 20110420T132401Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * remove hard coding path ; * add graphviz ; * externalize functions ; ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ;- pro ws_validation_scatter_2000_2009_v50, date1, date2 @cm_general @cm_project reinitplt, /z,/invert key_portrait = 1 openps, FILENAME = project_od_env+'ws_validation_scatter_2000_2009_v50.ps' ;; Give the location of mooring for validation of basic meteorological variables sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e', $ '8s165e', '8s180w', '8s155w', '8s125w', '8s110w', '8s95w', '5s156e', '5s165e', '5s180w', '5s170w', $ '5s155w', '5s140w', '5s125w', '5s110w', '5s95w', '2s156e', '2s165e', '2s180w', '2s170w', '2s155w', '2s140w', $ '2s125w', '2s110w', '2s95w', '0n147e', '0n156e', '0n165e', '0n180w', '0n170w', '0n155w', '0n140w', '0n125w', $ '0n110w', '0n95w', '2n147e', '2n156e', '2n165e', '2n180w', '2n170w', '2n155w', '2n140w', '2n125w', '2n110w', $ '2n95w', '5n147e', '5n156e', '5n165e', '5n170w', '5n155w', '5n140w', '5n125w', '5n110w', '5n95w', $ '8n156e', '8n165e', '8n180w', '8n170w', '9n140w', '8n125w', '8n110w', '8n95w', $ '0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] ocean='global' da1=10000101 & da2=10081231 nsmooth=1. ;; statistics are with 7 day smoothed ;; This program will create the following text files with statistics of respective variables close,/all fi_ws_erai=project_id_env+'ws_2000_2009_erai_v50.txt' openw,1,fi_ws_erai fi_ws_trop=project_id_env+'ws_2000_2009_trop_v50.txt' openw,2,fi_ws_trop fi_ws_oaflx=project_id_env+'ws_2000_2009_oaflx_v50.txt' openw,3,fi_ws_oaflx fi_ws_ncep=project_id_env+'ws_2000_2009_ncep_v50.txt' openw,4,fi_ws_ncep fi_ws_tmi=project_id_env+'ws_2000_2009_tmi_v50.txt' openw,5,fi_ws_tmi fi_ws_ncep1=project_id_env+'ws_2000_2009_ncep1_v50.txt' openw,6,fi_ws_ncep1 printf,1, 'x y cor bias std rmsd mean_tao' printf,2, 'x y cor bias std rmsd mean_tao' printf,3, 'x y cor bias std rmsd mean_tao' printf,4, 'x y cor bias std rmsd mean_tao' printf,5, 'x y cor bias std rmsd mean_tao' printf,6, 'x y cor bias std rmsd mean_tao' ;; first reading the whole ERAI uncorrected and corrected data file=project_id_env+'erai_ws_19890101_20091231_oafluxgrid.nc' initncdf, file u=read_ncdf('u10',date1,date2,file=file,/nostr) v=read_ncdf('v10',date1,date2,file=file,/nostr) unc=sqrt(u*u+v*v) help, unc file=project_id_env+'TropFlux_ws_19890101_20091231_v20.nc' initncdf, file cor=read_ncdf('ws',date1,date2,file=file,/nostr) help, cor file=project_id_env+'OAFlux_basic_variables_1985_2009.nc' initncdf, file oaf=read_ncdf("wind", date1, date2, file=file,/nostr) help, oaf fi=project_id_env+'uwind_ncep2_oafluxgrid_19890101_20091231.nc' initncdf, fi u=read_ncdf("u", date1-1, date2, file=fi,/nostr) fi=project_id_env+'vwind_ncep2_oafluxgrid_19890101_20091231.nc' initncdf, fi v=read_ncdf("v", date1-1, date2, file=fi,/nostr) nce=sqrt(u*u+v*v) help, nce fi=project_id_env+'zonal_wind_speed_oafluxgrid_30N30S.nc' initncdf, fi u=read_ncdf("u", date1, date2, file=fi,/nostr) fi=project_id_env+'meridional_wind_speed_oafluxgrid_30N30S.nc' initncdf, fi v=read_ncdf("v", date1, date2, file=fi,/nostr) ws_tmi=sqrt(u*u+v*v) help, ws_tmi file=project_id_env+'wind_ncep1_19890101_20091231.nc' initncdf, file u=read_ncdf("u", date1, date2, file=file,/nostr) v=read_ncdf("v", date1, date2, file=file,/nostr) nce1=sqrt(u*u+v*v) help, nce1 nn=n_elements(sitelist) for n=0, nn-1 do begin ;; reading data from mooring site=sitelist(n) & csite=site print, csite x=x_site_location(site) y=y_site_location(site) if (y ge 0. and y le 30.) then y=y+360. dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] read_variables_v2, csite,date1,date2,nsmooth, $ at, sw,rh,sst,wu,wv,ws, lh ws=alog(10./0.000152)/alog(4./0.000152)*ws ;; extracting the corrected and uncorrected ERAI data at the locations nsmooth=1. extract_flux_tropflux,unc,box, $ tropflux uncr=tropflux extract_flux_tropflux,cor,box, $ tropflux corr=tropflux extract_flux_tropflux,oaf,box, $ tropflux oafl=tropflux extract_flux_tropflux,nce,box, $ tropflux ncep=tropflux extract_flux_tropflux,ws_tmi,box, $ tropflux tmi=tropflux extract_flux_tropflux,nce1,box, $ tropflux ncep1=tropflux ind=where(finite(ws)) & ws=ws(ind) & uncr_ws=uncr(ind) & corr_ws=corr(ind) oafl=oafl(ind) & ncep=ncep(ind) & tmi=tmi(ind) & ncep1=ncep1(ind) mean_tao=total(ws)/n_elements(ws) statistics_3var_v1, ws, uncr_ws, corr_ws, $ cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 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)' 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)' statistics_3var_v1, ws, oafl, ncep, $ cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 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)' 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)' statistics_3var_v1, ws, tmi, ncep1, $ cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 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)' 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)' endfor close,/all fi_ws_erai=project_id_env+'ws_2000_2009_erai_v50.txt' res=read_ascii(fi_ws_erai,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_era=reform(ff(2,*)) & cor_erai=total(cor_era)/n_elements(cor_era) bias_era=reform(ff(3,*)) & bias_erai=total(bias_era)/n_elements(bias_era) std_era=reform(ff(4,*)) & std_erai=total(std_era)/n_elements(std_era) rmsd_era=reform(ff(5,*)) & rmsd_erai=total(rmsd_era)/n_elements(rmsd_era) mean_tao=reform(ff(6,*)) & mean_erai=bias_era+mean_tao print, '' print, 'ERAI' print, cor_erai, bias_erai, std_erai, rmsd_erai cstat=string(cor_erai, bias_erai, std_erai, rmsd_erai, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_erai, title='WS - TAO Vs ERAI', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='ERAI WS', small=[2,3,1], psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 oplot, [2,10], [2,10] ab=linfit(mean_tao, mean_erai,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 fi_ws_trop=project_id_env+'ws_2000_2009_trop_v50.txt' res=read_ascii(fi_ws_trop,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_tro=reform(ff(2,*)) & cor_trop=total(cor_tro)/n_elements(cor_tro) bias_tro=reform(ff(3,*)) & bias_trop=total(bias_tro)/n_elements(bias_tro) std_tro=reform(ff(4,*)) & std_trop=total(std_tro)/n_elements(std_tro) rmsd_tro=reform(ff(5,*)) & rmsd_trop=total(rmsd_tro)/n_elements(rmsd_tro) mean_tao=reform(ff(6,*)) & mean_trop=bias_tro+mean_tao print, '' print, 'TropFlux' print, cor_trop, bias_trop, std_trop, rmsd_trop cstat=string(cor_trop, bias_trop, std_trop, rmsd_trop, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_trop, title='WS - TAO Vs TropFlux', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='TropFlux WS', small=[2,3,2],/noer, psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 oplot, [2,10], [2,10] xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 ab=linfit(mean_tao, mean_trop,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 fi_ws_oaflx=project_id_env+'ws_2000_2009_oaflx_v50.txt' res=read_ascii(fi_ws_oaflx,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_oaf=reform(ff(2,*)) & cor_oafl=total(cor_oaf)/n_elements(cor_oaf) bias_oaf=reform(ff(3,*)) & bias_oafl=total(bias_oaf)/n_elements(bias_oaf) std_oaf=reform(ff(4,*)) & std_oafl=total(std_oaf)/n_elements(std_oaf) rmsd_oaf=reform(ff(5,*)) & rmsd_oafl=total(rmsd_oaf)/n_elements(rmsd_oaf) mean_tao=reform(ff(6,*)) & mean_oafl=bias_oaf+mean_tao print, '' print, 'OAFlux' print, cor_oafl, bias_oafl, std_oafl, rmsd_oafl cstat=string(cor_oafl, bias_oafl, std_oafl, rmsd_oafl, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_oafl, title='WS - TAO Vs OAFlux', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='OAFlux WS', small=[2,3,3],/noer, psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 oplot, [2,10], [2,10] xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 ab=linfit(mean_tao, mean_oafl,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 fi_ws_ncep=project_id_env+'ws_2000_2009_ncep_v50.txt' res=read_ascii(fi_ws_ncep,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_nce=reform(ff(2,*)) & cor_ncep=total(cor_nce)/n_elements(cor_nce) bias_nce=reform(ff(3,*)) & bias_ncep=total(bias_nce)/n_elements(bias_nce) std_nce=reform(ff(4,*)) & std_ncep=total(std_nce)/n_elements(std_nce) rmsd_nce=reform(ff(5,*)) & rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) mean_tao=reform(ff(6,*)) & mean_ncep=bias_nce+mean_tao print, '' print, 'NCEP2' print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_ncep, title='WS - TAO Vs NCEP2', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='NCEP2 WS', small=[2,3,4],/noer, psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 oplot, [2,10], [2,10] xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 ab=linfit(mean_tao, mean_ncep,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 fi_ws_tmi=project_id_env+'ws_2000_2009_tmi_v50.txt' res=read_ascii(fi_ws_tmi,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_tm=reform(ff(2,*)) & cor_tmi=total(cor_tm)/n_elements(cor_tm) bias_tm=reform(ff(3,*)) & bias_tmi=total(bias_tm)/n_elements(bias_tm) std_tm=reform(ff(4,*)) & std_tmi=total(std_tm)/n_elements(std_tm) rmsd_tm=reform(ff(5,*)) & rmsd_tmi=total(rmsd_tm)/n_elements(rmsd_tm) mean_tao=reform(ff(6,*)) & mean_tmi=bias_tm+mean_tao print, '' print, 'Qscat' print, cor_tmi, bias_tmi, std_tmi, rmsd_tmi cstat=string(cor_tmi, bias_tmi, std_tmi, rmsd_tmi, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_tmi, title='WS - TAO Vs Qscat', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='TMI WS', small=[2,3,5],/noer, psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 oplot, [2,10], [2,10] xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 ab=linfit(mean_tao, mean_tmi,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 fi_ws_ncep1=project_id_env+'ws_2000_2009_ncep1_v50.txt' res=read_ascii(fi_ws_ncep1,data_start=1) ff=res.field1 lat=reform(ff(0,*)) lon=reform(ff(1,*)) cor_nce=reform(ff(2,*)) & cor_ncep=total(cor_nce)/n_elements(cor_nce) bias_nce=reform(ff(3,*)) & bias_ncep=total(bias_nce)/n_elements(bias_nce) std_nce=reform(ff(4,*)) & std_ncep=total(std_nce)/n_elements(std_nce) rmsd_nce=reform(ff(5,*)) & rmsd_ncep=total(rmsd_nce)/n_elements(rmsd_nce) mean_tao=reform(ff(6,*)) & mean_ncep=bias_nce+mean_tao print, '' print, 'NCEP' print, cor_ncep, bias_ncep, std_ncep, rmsd_ncep cstat=string(cor_ncep, bias_ncep, std_ncep, rmsd_ncep, format='(f4.2,1x,f6.2,1x,f4.2,1x,f4.2)') splot, mean_tao, mean_ncep, title='WS - TAO Vs NCEP', subtitle='', $ charsize=1.1, xtitle='TAO WS', ytitle='NCEP WS', small=[2,3,6],/noer, psym=2, $ xrange=[2,10], yrange=[2,10], xmin=1,ymin=1 oplot, [2,10], [2,10] xyouts, 2.5,9.4, cstat, charsize=0.9 xyouts, 2.5,8.5, 'cor bias std rmsd', charsize=0.9 ab=linfit(mean_tao, mean_ncep,yfit=yfit) a=float(ab(0)) & b=float(ab(1)) oplot, mean_tao, yfit, color=250, thick=2 closeps end