;+ ; ; .. _swr_isccp_tropflux_new_v1.pro: ; ; ============================= ; swr_isccp_tropflux_new_v1.pro ; ============================= ; ; DESCRIPTION ; =========== ; ; :file:`${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc` ; containing ; sst corrected on OAFLUX grid ; has been produced by ; :func:`sst_correction_ncdf`. ; ; ++ are written in ; :file:`${PROJECT_OD}/correlation_isccp_olr.idl` ; ; This output file ; :file:`${PROJECT_OD}/correlation_isccp_olr.idl` ; will be used by ; :ref:`swr_isccp_tropflux_correlation_fig10.pro`. ; ; .. graphviz:: ; ; digraph swr_isccp_tropflux_new_v1 { ; ; swr [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/swr_oafluxgrid_1985_2007.nc"]; ; sw [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/sw_reconstred_1989_2009.nc"]; ; olr [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/olr_oafluxgrid_30n30s.nc"]; ; sst [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc"]; ; cor_olr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/correlation_isccp_olr.idl"]; ; figure [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/correlation_rmsd_olra_swra_smooth.ps"]; ; ; swr_isccp_tropflux_new_v1 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/broswrer/trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro", ; label="${TROPFLUX}/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro"]; ; ; {swr sw olr sst} -> {swr_isccp_tropflux_new_v1} -> {col_olr figure} ; } ; ; SEE ALSO ; ======== ; ; :ref:`project_profile.sh` ; :ref:`project_init.pro` ; :ref:`cm_project.pro` ; ; EXAMPLES ; ======== ; ; :: ; ; swr_isccp_tropflux_new_v1 ; ; TODO ; ==== ; ; make it work on cratos : missing data swr_oafluxgrid_1985_2007.nc, etc. ; ; no more save to avoid IDL dependant files ; ; coding rules ; ; complete description ; ; handle IO error ; ; EVOLUTIONS ; ========== ; ; $Id$ ; ; $URL$ ; ; - fplod 20110817T100234Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * remove _v20 in filename ; * add PROJECT_OD to saved file ; ; - fplod 20110420T113330Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * remove hard coding path ; * add graphviz ; ; - fplod 20110411T142955Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ;- pro swr_isccp_tropflux_new_v1 ; @cm_4cal @cm_4data @cm_4mesh @cm_4data @cm_project ; reinitplt, /z,/invert key_portrait = 1 ; openps, FILENAME = project_od_env+'correlation_rmsd_olra_swra_smooth.ps' st=19890101 en=20071231 ; file=project_od_env+'swr_oafluxgrid_1985_2007.nc' initncdf, file sw_isccp=read_ncdf("swr", st, en, file=file,/nostr) ; file=project_od_env+'sw_reconstred_1989_2009.nc' initncdf, file sw_trop=read_ncdf("sw", st, en+1, file=file,/nostr) ; file=project_od_env+'olr_oafluxgrid_30n30s.nc' initncdf, file olr=read_ncdf("olr", st, en, file=file,/nostr) ; help, sw_isccp, sw_trop , olr ; ;creating climatology ; ny=(2007-1989)+1 nt=365*ny ; olri=total(reform(olr(*,*,0:nt-1),nxt,nyt,365,ny),4)/ny swi=total(reform(sw_isccp(*,*,0:nt-1),nxt,nyt,365,ny),4)/ny help, olri, swi ; ; applying smoothing nsmooth=45 ; swi=[[[swi]],[[swi]],[[swi]]] olri=[[[olri]],[[olri]],[[olri]]] si=size(sw) n1=si(1) n2=si(2) ; for j=0,n2-1 do begin for i=0,n1-1 do begin x=reform(swi(i,j,*)) y=reform(olri(i,j,*)) swi(i,j,*)=smooth(x,nsmooth) olri(i,j,*)=smooth(y,nsmooth) endfor endfor ; swi=swi[*,*,365:365+364] olri=olri[*,*,365:365+364] help, swi, olri ; caldat, time,mon,day,yea swm=olr*0. olrm=olr*0. for jt=0,jpt-1 do begin jtt=(time(jt)-julday(1,1,yea(jt))) < 364 swm(*,*,jt)=swi(*,*,jtt) olrm(*,*,jt)=olri(*,*,jtt) print, jt endfor swa=sw_isccp-swm ; swr anomaly olra=olr-olrm ; olr anomaly help, swa, olra m=reform(sw_trop(*,*,0)) tmask=finite(m) cor_olr=fltarr(jpi,jpj)+!values.f_nan rms_olr=fltarr(jpi,jpj)+!values.f_nan ; for jj=0,jpj-1 do begin for ji=0,jpi-1 do begin if (tmask(ji,jj)) then begin print, 'over',jj, '/', jpj-1 ; swr_ano=reform(swa(ji,jj,*)) olr_ano=reform(olra(ji,jj,*)) ; cor_olr(ji,jj)=correlate(swr_ano,olr_ano) rms_olr(ji,jj)=(total((swr_ano-olr_ano)^2)/(jpt-1l))^.5 ; endif endfor endfor ; cor=fltarr(jpi,jpj)+!values.f_nan rms=fltarr(jpi,jpj)+!values.f_nan for jj=1,jpj-2 do begin for ji=1,jpi-2 do begin if (tmask(ji,jj)) then begin cor(ji,jj)=(cor_olr(ji-1,jj)+cor_olr(ji+1,jj)+cor_olr(ji,jj-1)+cor_olr(ji,jj+1))*tmask(ji,jj)/(tmask(ji-1,jj)+tmask(ji+1,jj)+tmask(ji,jj-1)+tmask(ji,jj+1)) endif endfor endfor ; save, cor, cor_olr, filename=project_od_env + 'correlation_isccp_olr.idl' ; lct=64 cs=0.9 marge1=[0,0,-5,0] help, cor ; plt, cor_olr,0.5,1, lct=lct, $ small=[1,4,1],/rempl,/noer,/nocont, $ charsize=cs,/nocolorb,marge=marge, $ subt='',title='a) Correlation (OLRA, SWRA)',xminor=1,yminor=1 ; file=project_od_env+'TropFlux_sst_19890101_20091231.nc" initncdf, file sst=read_ncdf("sst", 19890101, 20091231, file=file,/nostr) sst=grossemoyenne(sst, "t",/nan) ; plt, cor_olr,0.5,1, lct=lct, $ small=[1,4,3],/rempl,/noer,/nocont, $ charsize=cs,marge=marge, $ subt='',title='a) Correlation (OLRA, SWRA)',xminor=1,yminor=1, $ contour=sst, contmin=26.5, contmax=28.5, contint=1. ; plt, rms_olr, lct=lct, $ small=[1,4,4],/rempl,/noer,/nocont, $ charsize=cs, marge=marge,/nocolorb, $ subt='',title='b) RMS Difference (OLRA, SWRA)',xminor=1,yminor=1 ; closeps ; end