;+ ; .. _lhf_validation_scatter_2000_2009.pro: ; ; ==================================== ; lhf_validation_scatter_2000_2009.pro ; ==================================== ; ; DESCRIPTION ; =========== ; ; .. graphviz:: ; ; digraph lhf_validation_scatter_2000_2009 { ; ; lhf_erai [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_2000_2009_erai_v52.txt"]; ; lhf_tropflux [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_2000_2009_trop_v52.txt"]; ; lhf_oaflux [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_2000_2009_oaflx_v52.txt"]; ; lhf_ncep [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_2000_2009_ncep_v52.txt"]; ; lhf_ncep2_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_ncep2_oafluxgrid_19890101_20091231.nc"]; ; lhf_ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_2000_2009_ncep1_v52.txt"]; ; lhf_ncep1_2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/fluxe_ncep1_19890101_20091231.nc"]; ; lhf_erai_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/erai_lhf_19890101_20091231_oafluxgrid.nc"]; ; lhf_tropflux2 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/TropFlux_19890101_20091231.nc"]; ; lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lhf_oafluxgrid_1985_2009.nc"]; ; ; figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_validation_scatter_2000_2009.ps"]; ; ; lhf_validation_scatter_2000_2009 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/brolhfer/trunk/src/paper01/fig7/lhf_validation_scatter_2000_2009.pro", ; label="${TROPFLUX}/src/paper01/fig7/lhf_validation_scatter_2000_2009.pro"]; ; ; {lhf_erai lhf_ncep2_oafluxgrid lhf_ncep1_2 lhf_erai_oafluxgrid lhf_tropflux2 lhf_oafluxgrid} -> {lhf_validation_scatter_2000_2009} -> {lhf_tropflux lhf_oaflux lhf_ncep lhf_ncep1 figure} ; } ; ; SEE ALSO ; ======== ; ; :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 ; ======== ; ; :: ; ; date1 = 19890101L ; date2 = 20091231L ; lhf_validation_scatter_2000_2009, 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 20110420T102937Z 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 lhf_validation_scatter_2000_2009,date1,date2 @cm_general @cm_project reinitplt, /z,/invert key_portrait = 1 ; openps, FILENAME = project_od_env+'lhf_validation_scatter_2000_2009.ps' ; ; evaluation is done for 20000101 - 20091231 period ; location of moorings ; 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' ; ; This program will create the following text files with statistics of respective variables close,/all ; fi_lhf_erai=project_id_env+'lhf_2000_2009_erai_v52.txt' openw,1,fi_lhf_erai fi_lhf_trop=project_id_env+'lhf_2000_2009_trop_v52.txt' openw,2,fi_lhf_trop fi_lhf_oaflx=project_id_env+'lhf_2000_2009_oaflx_v52.txt' openw,3,fi_lhf_oaflx fi_lhf_ncep=project_id_env+'lhf_2000_2009_ncep_v52.txt' openw,4,fi_lhf_ncep fi_lhf_ncep1=project_id_env+'lhf_2000_2009_ncep1_v52.txt' openw,5,fi_lhf_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' ; ; first reading the whole ERAI uncorrected and corrected data ; file=project_id_env+'erai_lhf_19890101_20091231_oafluxgrid.nc' initncdf, file unc=read_ncdf('lhf',date1,date2,file=file,/nostr) help, unc ; file=project_id_env+"TropFlux_19890101_20091231.nc" initncdf, file cor=read_ncdf('lhf',date1,date2,file=file,/nostr) cor=-1*cor help, cor ; file=project_id_env+'lhf_oafluxgrid_1985_2009.nc' initncdf, file oaf=read_ncdf("lhf", date1, date2, file=file,/nostr) help, oaf ; fi=project_id_env+'lhf_ncep2_oafluxgrid_19890101_20091231.nc' initncdf, fi nce=read_ncdf("lhf", date1, date2, file=fi,/nostr) help, nce ; file=project_id_env+'fluxe_ncep1_19890101_20091231.nc' initncdf, file nce1=-1*read_ncdf("lhf", date1, date2, file=file,/nostr) help, nce1 ; nsmooth=1. 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 ; lhf=lh ind=where(finite(lhf)) valid=n_elements(ind) ; if (valid ge 180. ) then begin ; 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,nce1,box, $ tropflux ncep1=tropflux ; ind=where(finite(lhf)) lhf=lhf(ind) uncr_lhf=uncr(ind) corr_lhf=corr(ind) oafl=oafl(ind) ncep=ncep(ind) ncep1=ncep1(ind) mean_tao=total(lhf,/nan)/n_elements(lhf) ; statistics_3var_v1, lhf, uncr_lhf, corr_lhf, $ 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, f4.2,3x,f7.2,3x,f4.2,3x,f5.2,3x,f6.2)' printf, 2, x, y, cor2, bias2, std2, rmsd2, mean_tao, format='(f6.2, 3x, f6.2, 3x, f4.2,3x,f7.2,3x,f4.2,3x,f5.2,3x,f6.2)' ; statistics_3var_v1, lhf, 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, f4.2,3x,f7.2,3x,f4.2,3x,f5.2,3x,f6.2)' printf, 4, x, y, cor2, bias2, std2, rmsd2, mean_tao,format='(f6.2, 3x, f6.2, 3x, f4.2,3x,f7.2,3x,f4.2,3x,f5.2,3x,f6.2)' ; statistics_3var_v1, lhf, ncep1, ncep, $ 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, f4.2,3x,f7.2,3x,f4.2,3x,f5.2,3x,f6.2)' ; endif endfor ; close,/all ; fi_lhf_erai=project_id_env+'lhf_2000_2009_erai_v52.txt' res=read_ascii(fi_lhf_erai,data_start=1) ff=res.field1 cor_erai=reform(ff(2,*)) bias_erai=reform(ff(3,*)) std_erai=reform(ff(4,*)) rmsd_erai=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_erai=mean_tao+bias_erai ; ind=where(finite(cor_erai)) cor=total(cor_erai,/nan)/n_elements(ind) ind=where(finite(bias_erai)) bias=total(bias_erai,/nan)/n_elements(ind) ind=where(finite(rmsd_erai)) rmsd=total(rmsd_erai,/nan)/n_elements(ind) ind=where(finite(std_erai)) std=total(std_erai,/nan)/n_elements(ind) ; print, '' print, 'ERAI' print, cor, bias, std, rmsd cstat=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)') ; splot, mean_tao, mean_erai, charsize=1.1, title='LHF - TAO Vs ERAI', $ xrange=[20,200], yrange=[20,200], small=[2,3,1], psym=2 xyouts, 50,25, cstat, charsize=1. xyouts, 50,10, 'cor bias std rmsd', charsize=1. ; x=mean_tao y=mean_erai ab=linfit(x,y,yfit=yfit) a=float(ab(0)) b=float(ab(1)) print, a,b oplot, x, yfit, thick=2, color=250 oplot, [20,200], [20,200] ; fi_lhf_trop=project_id_env+'lhf_2000_2009_trop_v52.txt' res=read_ascii(fi_lhf_trop,data_start=1) ff=res.field1 cor_trop=reform(ff(2,*)) bias_trop=reform(ff(3,*)) std_trop=reform(ff(4,*)) rmsd_trop=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_trop=mean_tao+bias_trop ; ind=where(finite(cor_trop)) cor=total(cor_trop,/nan)/n_elements(ind) ind=where(finite(bias_trop)) bias=total(bias_trop,/nan)/n_elements(ind) ind=where(finite(rmsd_trop)) rmsd=total(rmsd_trop,/nan)/n_elements(ind) ind=where(finite(std_trop)) std=total(std_trop,/nan)/n_elements(ind) ; print, '' print, 'TropFlux' print, cor, bias, std, rmsd cstat=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)') ; splot, mean_tao, mean_trop, charsize=1.1, title='LHF - TAO Vs TropFlux', $ xrange=[20,200], yrange=[20,200], small=[2,3,2],/noer, psym=2 x=mean_tao y=mean_trop xyouts, 50,25, cstat, charsize=1. xyouts, 50,10, 'cor bias std rmsd', charsize=1. ; ab=linfit(x,y,yfit=yfit) a=float(ab(0)) b=float(ab(1)) print, a,b oplot, x, yfit, thick=2, color=250 oplot, [20,200], [20,200] ; fi_lhf_oaflx=project_id_env+'lhf_2000_2009_oaflx_v52.txt' res=read_ascii(fi_lhf_oaflx,data_start=1) ff=res.field1 cor_oaf=reform(ff(2,*)) bias_oaf=reform(ff(3,*)) std_oaf=reform(ff(4,*)) rmsd_oaf=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_oaf=mean_tao+bias_oaf ; ind=where(finite(cor_oaf)) cor=total(cor_oaf,/nan)/n_elements(ind) ind=where(finite(bias_oaf)) bias=total(bias_oaf,/nan)/n_elements(ind) ind=where(finite(rmsd_oaf)) rmsd=total(rmsd_oaf,/nan)/n_elements(ind) ind=where(finite(std_oaf)) std=total(std_oaf,/nan)/n_elements(ind) ; print, '' print, 'OAFlux' print, cor, bias, std, rmsd cstat=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)') ; splot, mean_tao, mean_oaf, charsize=1.1, title='LHF - TAO Vs OAFlux', $ xrange=[20,200], yrange=[20,200], small=[2,3,3],/noer, psym=2 xyouts, 50,25, cstat, charsize=1. xyouts, 50,10, 'cor bias std rmsd', charsize=1. ; x=mean_tao y=mean_oaf ab=linfit(x,y,yfit=yfit) a=float(ab(0)) b=float(ab(1)) print, a,b oplot, x, yfit, thick=2, color=250 oplot, [20,200], [20,200] ; fi_lhf_ncep=project_id_env+'lhf_2000_2009_ncep_v52.txt' res=read_ascii(fi_lhf_ncep,data_start=1) ff=res.field1 cor_nce=reform(ff(2,*)) bias_nce=reform(ff(3,*)) std_nce=reform(ff(4,*)) rmsd_nce=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_nce=mean_tao+bias_nce ; ind=where(finite(cor_nce)) cor=total(cor_nce,/nan)/n_elements(ind) ind=where(finite(bias_nce)) bias=total(bias_nce,/nan)/n_elements(ind) ind=where(finite(rmsd_nce)) rmsd=total(rmsd_nce,/nan)/n_elements(ind) ind=where(finite(std_nce)) std=total(std_nce,/nan)/n_elements(ind) ; print, '' print, 'NCEP2' print, cor, bias, std, rmsd cstat=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)') ; splot, mean_tao, mean_nce, charsize=1.1, title='LHF - TAO Vs NCEP2', $ xrange=[20,200], yrange=[20,200], small=[2,3,4],/noer, psym=2 xyouts, 50,25, cstat, charsize=1. xyouts, 50,10, 'cor bias std rmsd', charsize=1. ; x=mean_tao y=mean_nce ab=linfit(x,y,yfit=yfit) a=float(ab(0)) b=float(ab(1)) print, a,b oplot, x, yfit, thick=2, color=250 oplot, [20,200], [20,200] ; fi_lhf_ncep1=project_id_env+'lhf_2000_2009_ncep1_v52.txt' res=read_ascii(fi_lhf_ncep1,data_start=1) ff=res.field1 cor_nce=reform(ff(2,*)) bias_nce=reform(ff(3,*)) std_nce=reform(ff(4,*)) rmsd_nce=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_nce=mean_tao+bias_nce ; ind=where(finite(cor_nce)) cor=total(cor_nce,/nan)/n_elements(ind) ind=where(finite(bias_nce)) bias=total(bias_nce,/nan)/n_elements(ind) ind=where(finite(rmsd_nce)) rmsd=total(rmsd_nce,/nan)/n_elements(ind) ind=where(finite(std_nce)) std=total(std_nce,/nan)/n_elements(ind) ; print, '' print, 'NCEP1' print, cor, bias, std, rmsd cstat=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.2,2x,f4.2,1x,f6.2)') ; splot, mean_tao, mean_nce, charsize=1.1, title='LHF - TAO Vs NCEP1', $ xrange=[20,200], yrange=[20,200], small=[2,3,5],/noer, psym=2 xyouts, 50,25, cstat, charsize=1. xyouts, 50,10, 'cor bias std rmsd', charsize=1. ; x=mean_tao y=mean_nce ab=linfit(x,y,yfit=yfit) a=float(ab(0)) b=float(ab(1)) print, a,b oplot, x, yfit, thick=2, color=250 oplot, [20,200], [20,200] ; closeps ; end