[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; .. _TropFlux_swr_DT_19890101_20071231.pro: |
---|
| 4 | ; |
---|
| 5 | ; ===================================== |
---|
| 6 | ; TropFlux_swr_DT_19890101_20071231.pro |
---|
| 7 | ; ===================================== |
---|
| 8 | ; |
---|
| 9 | ; |
---|
[8] | 10 | ; .. graphviz:: |
---|
| 11 | ; |
---|
| 12 | ; digraph TropFlux_swr_DT_19890101_20071231 { |
---|
| 13 | ; graph [ |
---|
| 14 | ; rankdir="LR", |
---|
| 15 | ; ] |
---|
| 16 | ; |
---|
| 17 | ; file_swr [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc"]; |
---|
| 18 | ; |
---|
| 19 | ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; |
---|
| 20 | ; |
---|
| 21 | ; TropFlux_swr_DT_19890101_20071231 [shape=box, |
---|
| 22 | ; fontname=Courier, |
---|
| 23 | ; color=blue, |
---|
| 24 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_DT_19890101_20071231.pro", |
---|
| 25 | ; label="${TROPFLUX}/src/TropFlux_swr_DT_19890101_20071231.pro"]; |
---|
| 26 | ; |
---|
| 27 | ; {file_swr}-> {TropFlux_swr_DT_19890101_20071231} -> {ncfile} |
---|
| 28 | ; |
---|
| 29 | ; } |
---|
| 30 | ; |
---|
[6] | 31 | ; SEE ALSO |
---|
| 32 | ; ======== |
---|
| 33 | ; |
---|
[20] | 34 | ; :func:`initncdf <saxo:initncdf>` |
---|
| 35 | ; :func:`read_ncdf <saxo:read_ncdf>` |
---|
| 36 | ; :func:`grossemoyenne <saxo:grossemoyenne>` |
---|
| 37 | ; :func:`julday <saxo:julday>` |
---|
| 38 | ; :func:`caldat <saxo:caldat>` |
---|
| 39 | ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` |
---|
| 40 | ; |
---|
[6] | 41 | ; EXAMPLES |
---|
| 42 | ; ======== |
---|
| 43 | ; |
---|
| 44 | ; :: |
---|
| 45 | ; |
---|
| 46 | ; IDL> tropflux_swr_dt_19890101_20071231 |
---|
| 47 | ; |
---|
| 48 | ; TODO |
---|
| 49 | ; ==== |
---|
| 50 | ; |
---|
| 51 | ; hard coded directory - usage of ${TROPFLUX_ID} |
---|
| 52 | ; |
---|
| 53 | ; coding rules |
---|
| 54 | ; |
---|
| 55 | ; EVOLUTIONS |
---|
| 56 | ; ========== |
---|
| 57 | ; |
---|
[8] | 58 | ; - fplod 20101215T091726Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 59 | ; |
---|
| 60 | ; * add graph in header |
---|
| 61 | ; |
---|
[6] | 62 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 63 | ; |
---|
| 64 | ; * minimal header |
---|
| 65 | ; |
---|
| 66 | ; - pbk 2008 |
---|
| 67 | ; |
---|
| 68 | ; * creation |
---|
| 69 | ; |
---|
| 70 | ;- |
---|
[5] | 71 | pro TropFlux_swr_DT_19890101_20071231 |
---|
| 72 | @common |
---|
| 73 | file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc' |
---|
| 74 | initncdf, file |
---|
| 75 | |
---|
| 76 | sw=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) |
---|
| 77 | help, sw |
---|
| 78 | |
---|
| 79 | sw_mean=grossemoyenne(sw, 't',/nan) |
---|
| 80 | help, sw_mean |
---|
| 81 | |
---|
| 82 | tt=time & jpt=n_elements(time) |
---|
| 83 | caldat, time,mon,day,yea |
---|
| 84 | sw_m=sw*0. & sw_bias=sw*0. |
---|
| 85 | |
---|
| 86 | for jt=0,jpt-1 do begin |
---|
| 87 | jtt=(time(jt)-julday(1,1,yea(jt))) < 364 |
---|
| 88 | swr=reform(sw_mean(*,*)) |
---|
| 89 | sw_m(*,*,jt)=swr |
---|
| 90 | sw_bias(*,*,jt)=(((swr-295.4)*18.36/(200.-295.4)) > 0.) < 18.37 |
---|
| 91 | endfor |
---|
| 92 | |
---|
| 93 | help, sw_m, sw_bias |
---|
| 94 | swa=sw-sw_m |
---|
| 95 | swa=swa/(0.901273) ;; variability correction (seasonal_cycle_swr_isccp.pro) |
---|
| 96 | |
---|
| 97 | swr=sw_m+swa-sw_bias ;; new swr, corrected for bias and variability |
---|
| 98 | ;writing field |
---|
| 99 | ;time=julday(1,1,1989)+lindgen(7670) |
---|
| 100 | cda0=string(jul2date(tt(0)),format='(i8.8)') |
---|
| 101 | cda1=string(jul2date(tt(jpt-1)),format='(i8.8)') |
---|
| 102 | |
---|
| 103 | lat=reform(gphit(0,0:jpj-1)) |
---|
| 104 | lon=reform(glamt(0:jpi-1,0)) |
---|
| 105 | time=time-julday(1,1,1950) & jpt=n_elements(time) |
---|
| 106 | |
---|
| 107 | ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc' |
---|
| 108 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 109 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 110 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
| 111 | sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'} |
---|
| 112 | globattr={source:'Obtained from ISCCP. Corrections has been done on mean bias and variability',timerange:cda0+' - '+cda1} |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $ |
---|
| 116 | + 'longitude[]=lon:lon_attr; ' $ |
---|
| 117 | + 'latitude[]=lat:lat_attr; ' $ |
---|
| 118 | + 'time[*time]=time:time_attr ' $ |
---|
| 119 | + ' @ globattr' |
---|
| 120 | |
---|
| 121 | @ncdf_quickwrite |
---|
| 122 | |
---|
| 123 | end |
---|