;+ ; .. _net_flux_validation_scatter_2000_2007.pro: ; ; ========================================= ; net_flux_validation_scatter_2000_2007.pro ; ========================================= ; ; DESCRIPTION ; =========== ; ; This program will create the text files with statistics of respective variables ; ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc` ; containing ++ ; has been produced by ; :ref:`TropFlux_swr_DT_19890101_20071231.pro`. ; ; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc` ; containing ++ ; has been produced by ; :ref:`TropFlux_swr_NRT_19890101_20091231.pro`. ; ; :file:`${PROJECT_OD}/TropFlux_19890101_20091231.nc` ; ; containing ++ ; has been produced by ; :ref:`TropFlux_19890101_20091231.pro`. ; ; .. graphviz:: ; ; digraph net_flux_validation_scatter_2000_2007 { ; ; tropflux_general [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_19890101_20091231.nc"]; ; tropflux_dt_swr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc"]; ; tropflux_nrt_swr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc"]; ; ncep2 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/NCEP2_flux_19890101_20090729.nc"]; ; erai [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc"]; ; shf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/shf_oafluxgrid_1985_2008.nc"]; ; lhf_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lhf_oafluxgrid_1985_2008.nc"]; ; lwr_oafluxgrid [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/lwr_oafluxgrid_1985_2007.nc"]; ; ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/fluxe_ncep1_19890101_20091231.nc"]; ; net_nrt_erai [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_2000_2007_erai.txt"]; ; net_nrt_trop [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_2000_2007_trop.txt"]; ; net_nrt_ncep [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_2000_2007_ncep.txt"]; ; net_nrt_ncep1 [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_2000_2007_ncep1.txt"]; ; net_nrt_tropd [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_2000_2007_tropd.txt"]; ; ; figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/net_flux_validation_scatter_2000_2007.ps"]; ; ; net_flux_validation_scatter_2000_2007 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro", ; label="${TROPFLUX}/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro"]; ; ; {tropflux_general tropflux_dt_swr tropflux_nrt_swr ncep2 erai shf_oafluxgrid lhf_oafluxgrid lwr_oafluxgrid ncep1} -> {net_flux_validation_scatter_2000_2007} -> {net_nrt_erai net_nrt_trop net_nrt_ncep net_nrt_ncep1 net_nrt_tropd figure} ; } ; ; SEE ALSO ; ======== ; ; :ref:`project_profile.sh` ; :ref:`project_init.pro` ; :ref:`cm_project.pro` ; ; :func:`x_site_location` ; :func:`y_site_location` ; ; :ref:`statistics_3var_v1.pro` ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> date1=19890101L ; IDL> date2=20091231L ; IDL> net_flux_validation_scatter_2000_2007, date1, date2 ; ; TODO ; ==== ; ; make it work on cratos : missing data ; ; coding rules ; ; complete description ; ; handle IO error ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; $URL$ ; ; - fplod 20110817T101928Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * remove v50 from filenames ; * replace PROJECT_ID by PROJECT_OD ; * complete description (not finish) ; ; - fplod 20110420T114953Z 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 net_flux_validation_scatter_2000_2007, date1, date2 @cm_general @cm_project reinitplt, /z,/invert key_portrait = 1 openps, FILENAME = project_od_env+'net_flux_validation_scatter_2000_2007.ps' 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'] jda1=date2jul(date1) jda2=date2jul(date2) jpt=(jda2-jda1+1l) time=jda1+dindgen(jpt) & tt=time ocean='net_flux' nsmooth=1. file_trop=project_od_env+'TropFlux_19890101_20091231.nc' initncdf, file_trop shf_trop=read_ncdf("shf", date1, date2, file=file_trop,/nostr) lhf_trop=read_ncdf("lhf", date1, date2, file=file_trop,/nostr) lwr_trop=read_ncdf("lwr", date1, date2, file=file_trop,/nostr) file_trop=project_od_env+'TropFlux_swr_19890101_20071231_DT.nc' initncdf, file_trop swr_dt=read_ncdf("swr", date1, date2, file=file_trop,/nostr) trop=swr_dt+(lwr_trop+lhf_trop+shf_trop) help, trop file_trop=project_od_env+'TropFlux_swr_19890101_20091231_NRT.nc' initncdf, file_trop swr_nrt=read_ncdf("sw", date1-1, date2, file=file_trop,/nostr) tropd=swr_nrt+(lwr_trop+lhf_trop+shf_trop) help, tropd file_ncep=project_od_env+'NCEP2_flux_19890101_20090729.nc' initncdf, file_ncep shf=read_ncdf("shf", date1, date2, file=file_ncep,/nostr) lhf=read_ncdf("lhf", date1, date2, file=file_ncep,/nostr) lwr=read_ncdf("lwr", date1, date2, file=file_ncep,/nostr) swr=read_ncdf("swr", date1, date2, file=file_ncep,/nostr) ;ncep=swr-(lhf+shf+ref_lw) ncep=swr-(lhf+shf+lwr) help, ncep file_erai=project_od_env+'erai_fluxes_19930101_20090801_TROP_oafluxgrid.nc' initncdf, file_erai shf=read_ncdf("shf", date1, date2, file=file_erai,/nostr) lhf=read_ncdf("lhf", date1, date2, file=file_erai,/nostr) lwr=read_ncdf("lwr", date1, date2, file=file_erai,/nostr) swr=read_ncdf("swr", date1, date2, file=file_erai,/nostr) & swr=-1*swr erai=swr-(lwr+lhf+shf) help, erai file_oaf=project_od_env+'shf_oafluxgrid_1985_2008.nc' initncdf, file_oaf shf=read_ncdf("shf", date1, date2, file=file_oaf,/nostr) file_oaf=project_od_env+'lhf_oafluxgrid_1985_2008.nc' initncdf, file_oaf lhf=read_ncdf("lhf", date1, date2, file=file_oaf,/nostr) file_oaf=project_od_env+'lwr_oafluxgrid_1985_2007.nc' initncdf, file_oaf lwr=read_ncdf("lwr", date1, date2, file=file_oaf,/nostr) file_oaf=project_od_env+'swr_oafluxgrid_1985_2007.nc' initncdf, file_oaf swr=read_ncdf("swr", date1, date2, file=file_oaf,/nostr) & swr_trop=swr oafl=swr-(lwr+lhf+shf) help, oafl file=project_od_env+'fluxe_ncep1_19890101_20091231.nc' initncdf, file lwr=read_ncdf("lwr", date1, date2, file=file,/nostr) swr=read_ncdf("swr", date1, date2, file=file,/nostr) lhf=read_ncdf("lhf", date1, date2, file=file,/nostr) shf=read_ncdf("shf", date1, date2, file=file,/nostr) ncep1=swr+lwr+shf+lhf help, ncep1 close,/all fi_net_NRT_erai=project_od_env+'net_2000_2007_erai.txt' openw,1,fi_net_NRT_erai fi_net_NRT_trop=project_od_env+'net_2000_2007_trop.txt' openw,2,fi_net_NRT_trop fi_net_NRT_oaflx=project_od_env+'net_2000_2007_oaflx.txt' openw,3,fi_net_NRT_oaflx fi_net_NRT_ncep=project_od_env+'net_2000_2007_ncep.txt' openw,4,fi_net_NRT_ncep fi_net_NRT_ncep1=project_od_env+'net_2000_2007_ncep1.txt' openw,5,fi_net_NRT_ncep1 fi_net_NRT_tropd=project_od_env+'net_2000_2007_tropd.txt' openw,6,fi_net_NRT_tropd 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' 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_net_flux, csite,date1,date2,nsmooth, $ net tao=net & ind=where(finite(tao)) & valid=n_elements(ind) ;; if (valid ge 180. ) then begin extract_flux_tropflux, oafl, box, $ tropflux oaflux=tropflux extract_flux_tropflux, ncep, box, $ tropflux ncepflux=tropflux extract_flux_tropflux, erai, box, $ tropflux eraiflux=tropflux extract_flux_tropflux, trop, box, $ tropflux tropflux_new=tropflux extract_flux_tropflux, ncep1, box, $ tropflux ncepflux1=tropflux extract_flux_tropflux, tropd, box, $ tropflux tropdf=tropflux ind=where(finite(tao)) & tao=tao(ind) & oaf_net=oaflux(ind) & nce_net=ncepflux(ind) & trop_net=tropflux_new(ind) erai_net=eraiflux(ind) & nce1_net=ncepflux1(ind) & tropd_net=tropdf(ind) mean_tao=total(tao,/nan)/n_elements(ind) statistics_3var_v1, tao, erai_net, trop_net, $ 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,f6.2,3x,f7.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,f6.2,3x,f7.2)' statistics_3var_v1, tao,oaf_net , nce_net, $ 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,f6.2,3x,f7.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,f6.2,3x,f7.2)' statistics_3var_v1, tao,nce1_net , tropd_net, $ 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,f6.2,3x,f7.2)' printf, 6, x, y, cor2, bias2, std2, rmsd2, mean_tao,format='(f6.2, 3x, f6.2, 3x, f4.2,3x,f7.2,3x,f4.2,3x,f6.2,3x,f7.2)' endif endfor close,/all fi_net_NRT_erai=project_od_env+'net_2000_2007_erai.txt' res=read_ascii(fi_net_NRT_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='NET_Flux - TAO Vs ERAI', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,1], psym=2, xmin=1,ymin=1 xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, '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, [-100,200], [-100,200] fi_net_NRT_trop=project_od_env+'net_2000_2007_trop.txt' res=read_ascii(fi_net_NRT_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='NET_Flux - TAO Vs TropFlux', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,2],/noer, psym=2, xmin=1,ymin=1 xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, 'cor bias std rmsd', charsize=1. x=mean_tao & y=mean_trop 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, [-100,200], [-100,200] fi_net_NRT_oaflx=project_od_env+'net_2000_2007_oaflx.txt' res=read_ascii(fi_net_NRT_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='NET_Flux - TAO Vs OAFlux', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,3],/noer, psym=2, xmin=1,ymin=1 x=mean_tao & y=mean_oaf xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, '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, [-100,200], [-100,200] fi_net_NRT_ncep=project_od_env+'net_2000_2007_ncep.txt' res=read_ascii(fi_net_NRT_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='NET_Flux - TAO Vs NCEP2', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,4],/noer, psym=2, xmin=1,ymin=1 xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, '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, [-100,200], [-100,200] fi_net_NRT_ncep1=project_od_env+'net_2000_2007_ncep1.txt' res=read_ascii(fi_net_NRT_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, '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='NET_Flux - TAO Vs NCEP2', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,5],/noer, psym=2, xmin=1,ymin=1 xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, '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, [-100,200], [-100,200] fi_net_NRT_tropd=project_od_env+'net_2000_2007_tropd.txt' res=read_ascii(fi_net_NRT_tropd,data_start=1) ff=res.field1 cor_tropd=reform(ff(2,*)) bias_tropd=reform(ff(3,*)) std_tropd=reform(ff(4,*)) rmsd_tropd=reform(ff(5,*)) mean_tao=reform(ff(6,*)) mean_tropd=mean_tao+bias_tropd ind=where(finite(cor_tropd)) & cor=total(cor_tropd,/nan)/n_elements(ind) ind=where(finite(bias_tropd)) & bias=total(bias_tropd,/nan)/n_elements(ind) ind=where(finite(rmsd_tropd)) & rmsd=total(rmsd_tropd,/nan)/n_elements(ind) ind=where(finite(std_tropd)) & std=total(std_tropd,/nan)/n_elements(ind) print, '' print, 'TropFlux_NRT' 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_tropd, charsize=1.1, title='NET_Flux - TAO Vs TropFlux_NRT', $ xrange=[-100,200], yrange=[-100,200], small=[2,3,6],/noer, psym=2, xmin=1,ymin=1 xyouts, -50,-40, cstat, charsize=1. xyouts, -40,-80, 'cor bias std rmsd', charsize=1. x=mean_tao & y=mean_tropd 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, [-100,200], [-100,200] closeps end