;+ ; .. _sst_validation_scatter_2000_2009_basin.pro: ; ; ========================================== ; sst_validation_scatter_2000_2009_basin.pro ; ========================================== ; ; DESCRIPTION ; =========== ; ; .. graphviz:: ; ; digraph sst_validation_scatter_2000_2009_basin { ; graph [ ; rankdir="LR", ; ] ; sst_erai [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/sst_2000_2009_erai_*.txt"]; ; sst_tropflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_trop_*.txt"]; ; sst_oaflux [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_oaflx_*.txt"]; ; sst_ncep [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep_*.txt"]; ; sst_ncep1 [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_ncep1_*.txt"]; ; sst_tmi [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_2000_2009_tmi_*.txt"]; ; ; figure [shape=ellipse,fontname=Courier,label="${TROPFLUX_OD}/sst_validation_scatter_2000_2009_basin.ps"]; ; ; sst_validation_scatter_2000_2009_basin [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/brosster/trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro", ; label="${TROPFLUX}/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro"]; ; ; {sst_erai} -> {sst_validation_scatter_2000_2009_basin} -> {sst_tropflux sst_oaflux sst_ncep sst_ncep1 figure} ; } ; ; SEE ALSO ; ======== ; ; :ref:`tropflux_profile.sh` ; :ref:`tropflux_init.pro` ; :ref:`cm_tropflux.pro` ; ; :func:`x_site_location` ; :func:`y_site_location` ; ; :ref:`read_variables_v2.pro` ; :ref:`statistics_3var_v1.pro` ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> @tropflux_init ; IDL> date1=19890101L ; IDL> date2=20091231L ; IDL> sst_validation_scatter_2000_2009_basin, date1, date2 ; ; TODO ; ==== ; ; make it work on cratos : pb restore ; ; ++ mooring data in graphviz ; ; coding rules ; ; get rid of spwan ; ; complete description ; ; handle IO error ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; - fplod 20110420T101535Z 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 sst_validation_scatter_2000_2009_basin, date1, date2 @cm_general @cm_tropflux reinitplt, /z,/invert key_portrait = 1 openps, FILENAME = 'idl.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='IO' ;sitelist=['8s67e','12s55e', '8s55e', '8s80.5e', '1.5s80.5e', '0n80.5e', '1.5n80.5e', '1.5s90e', $ ; '0n90e', '1.5n90e', '4n90e','8n90e','12n90e', '15n90e', '5s95e'] ocean='Pac' sitelist=['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'] ocean='AO' sitelist=['0n0e', '0n10w', '0n23w', '0n35w', '10s10w', '12n23w', '12n38w', '14s32w', '15n38w', '19s34w', '20n38w', $ '21n23w', '4n23w', '4n38w', '6s10w', '8n38w', '8s30w'] nsmooth=1. ;; This program will create the following text files with statistics of respective variables close,/all fi_sst_erai=tropflux_id_env+'sst_2000_2009_erai_'+ocean+'.txt' openw,1,fi_sst_erai fi_sst_trop=tropflux_id_env+'sst_2000_2009_trop_'+ocean+'.txt' openw,2,fi_sst_trop fi_sst_oaflx=tropflux_id_env+'sst_2000_2009_oaflx_'+ocean+'.txt' openw,3,fi_sst_oaflx fi_sst_ncep=tropflux_id_env+'sst_2000_2009_ncep_'+ocean+'.txt' openw,4,fi_sst_ncep fi_sst_tmi=tropflux_id_env+'sst_2000_2009_tmi_'+ocean+'.txt' openw,5,fi_sst_tmi fi_sst_ncep1=tropflux_id_env+'sst_2000_2009_ncep1_'+ocean+'.txt' openw,6,fi_sst_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 ;save, unc, cor, oaf, nce, sst_tmi, nce1, filename="sst_era_trop_oaf_nce_tmi_2000_2009_global.idl" ;; full data from 2000-2009 period are read first, and hence the above lines are commented restore, file="/Users/pkb/work/MY_SAXO/sst_era_trop_oaf_nce_tmi_2000_2009_global.idl" help, unc, cor, oaf, nce, sst_tmi, nce1 ;; data from 20000101, 20090931 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 ind=where(finite(sst)) & valid=n_elements(ind) if (valid ge 180) then begin ;; 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,sst_tmi,box, $ tropflux tmi=tropflux extract_flux_tropflux,nce1,box, $ tropflux ncep1=tropflux ind=where(finite(sst)) & sst=sst(ind) & uncr_sst=uncr(ind) & corr_sst=corr(ind) oafl=oafl(ind) & ncep=ncep(ind) & tmi=tmi(ind) & ncep1=ncep1(ind) mean_tao=total(sst,/nan)/n_elements(ind) statistics_3var_v1, sst, uncr_sst, corr_sst, $ 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,f6.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,f6.2)' statistics_3var_v1, sst, 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,f6.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,f6.2)' statistics_3var_v1, sst, 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,f6.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,f6.2)' endif endfor close,/all fi_sst_erai=tropflux_id_env+'sst_2000_2009_erai_'+ocean+'.txt' res=read_ascii(fi_sst_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='SST - TAO Vs ERAI', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='ERAI SST', small=[2,3,1], psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.5, 'cor bias std rmsd', charsize=0.9 oplot, [22,31], [22,31] 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_sst_trop=tropflux_id_env+'sst_2000_2009_trop_'+ocean+'.txt' res=read_ascii(fi_sst_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='SST - TAO Vs TropFlux', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='TropFlux SST', small=[2,3,2],/noer, psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 oplot, [22,31], [22,31] xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.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_sst_oaflx=tropflux_id_env+'sst_2000_2009_oaflx_'+ocean+'.txt' res=read_ascii(fi_sst_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='SST - TAO Vs OAFlux', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='OAFlux SST', small=[2,3,3],/noer, psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 oplot, [22,31], [22,31] xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.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_sst_ncep=tropflux_id_env+'sst_2000_2009_ncep_'+ocean+'.txt' res=read_ascii(fi_sst_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='SST - TAO Vs NCEP2', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='NCEP2 SST', small=[2,3,4],/noer, psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 oplot, [22,31], [22,31] xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.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_sst_tmi=tropflux_id_env+'sst_2000_2009_tmi_'+ocean+'.txt' res=read_ascii(fi_sst_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, 'TMI' 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='SST - TAO Vs TMI', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='TMI SST', small=[2,3,5],/noer, psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 oplot, [22,31], [22,31] xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.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_sst_ncep1=tropflux_id_env+'sst_2000_2009_ncep1_'+ocean+'.txt' res=read_ascii(fi_sst_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, 'NCEP1' 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='SST - TAO Vs NCEP_NCAR', subtitle='', $ charsize=1.1, xtitle='TAO SST', ytitle='NCEP SST', small=[2,3,6],/noer, psym=2, $ xrange=[22,31], yrange=[22,31], xmin=1,ymin=1 oplot, [22,31], [22,31] xyouts, 22.3,30.2, cstat, charsize=0.9 xyouts, 22.3,29.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 fig=tropflux_od_env+'sst_validation_scatter_2000_2009_'+ocean+'.ps' spawn, 'mv '+psdir+'idl.ps '+fig spawn, 'gv '+fig end