;+ ; ; .. _TropFlux_swr_DT_19890101_20071231.pro: ; ; ===================================== ; TropFlux_swr_DT_19890101_20071231.pro ; ===================================== ; ; ; .. graphviz:: ; ; digraph tropflux_swr_dt_19890101_20071231 { ; graph [ ; rankdir="LR", ; ] ; ; file_swr [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc"]; ; ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; ; ; tropflux_swr_dt_19890101_20071231 [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_DT_19890101_20071231.pro", ; label="${PROJECT}/src/TropFlux_swr_DT_19890101_20071231.pro"]; ; ; {file_swr}-> {tropflux_swr_dt_19890101_20071231} -> {ncfile} ; ; } ; ; SEE ALSO ; ======== ; ; :func:`initncdf ` ; :func:`read_ncdf ` ; :func:`grossemoyenne ` ; :func:`julday ` ; :func:`caldat ` ; :func:`ncdf_quickwrite ` ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> tropflux_swr_dt_19890101_20071231 ; ; TODO ; ==== ; ; hard coded directory - usage of ${PROJECT_ID} ; ; coding rules ; ; change the name to swr_dt_correction_ndcf.pro ; ; EVOLUTIONS ; ========== ; ; - fplod 20101215T091726Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * add graph in header ; ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ; - pbk 2008 ; ; * creation ; ;- pro TropFlux_swr_DT_19890101_20071231 @common file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc' initncdf, file sw=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) help, sw sw_mean=grossemoyenne(sw, 't',/nan) help, sw_mean tt=time & jpt=n_elements(time) caldat, time,mon,day,yea sw_m=sw*0. & sw_bias=sw*0. for jt=0,jpt-1 do begin jtt=(time(jt)-julday(1,1,yea(jt))) < 364 swr=reform(sw_mean(*,*)) sw_m(*,*,jt)=swr sw_bias(*,*,jt)=(((swr-295.4)*18.36/(200.-295.4)) > 0.) < 18.37 endfor help, sw_m, sw_bias swa=sw-sw_m swa=swa/(0.901273) ;; variability correction (seasonal_cycle_swr_isccp.pro) swr=sw_m+swa-sw_bias ;; new swr, corrected for bias and variability ;writing field ;time=julday(1,1,1989)+lindgen(7670) cda0=string(jul2date(tt(0)),format='(i8.8)') cda1=string(jul2date(tt(jpt-1)),format='(i8.8)') lat=reform(gphit(0,0:jpj-1)) lon=reform(glamt(0:jpi-1,0)) time=time-julday(1,1,1950) & jpt=n_elements(time) ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc' lon_attr={units:'degrees_east',long_name:'Longitude'} lat_attr={units:'degrees_north',long_name:'Latitude'} time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'} globattr={source:'Obtained from ISCCP. Corrections has been done on mean bias and variability',timerange:cda0+' - '+cda1} ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $ + 'longitude[]=lon:lon_attr; ' $ + 'latitude[]=lat:lat_attr; ' $ + 'time[*time]=time:time_attr ' $ + ' @ globattr' @ncdf_quickwrite end