[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; .. _TropFlux_swr_BLND_19890101_20091231.pro: |
---|
| 4 | ; |
---|
| 5 | ; ======================================= |
---|
| 6 | ; TropFlux_swr_BLND_19890101_20091231.pro |
---|
| 7 | ; ======================================= |
---|
| 8 | ; |
---|
[8] | 9 | ; .. only:: man |
---|
[6] | 10 | ; |
---|
[8] | 11 | ; Figure is visible on PDF and HTML documents only. |
---|
| 12 | ; |
---|
| 13 | ; .. only:: html |
---|
| 14 | ; |
---|
| 15 | ; .. graphviz:: |
---|
| 16 | ; |
---|
| 17 | ; digraph TropFlux_swr_BLND_19890101_20091231 { |
---|
| 18 | ; graph [ |
---|
| 19 | ; rankdir="LR", |
---|
| 20 | ; ] |
---|
| 21 | ; file_dt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; |
---|
| 22 | ; file_nrt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"]; |
---|
| 23 | ; file_gustiness [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"]; |
---|
| 24 | ; |
---|
| 25 | ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"]; |
---|
| 26 | ; |
---|
| 27 | ; TropFlux_swr_BLND_19890101_20091231 [shape=box, |
---|
| 28 | ; fontname=Courier, |
---|
| 29 | ; color=blue, |
---|
| 30 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_BLND_19890101_20091231.pro", |
---|
| 31 | ; label="${TROPFLUX}/src/TropFlux_swr_BLND_19890101_20091231.pro"]; |
---|
| 32 | ; {file_dt file_nrt file_gustiness} -> {TropFlux_swr_BLND_19890101_20091231} ->{ ncfile} |
---|
| 33 | ; |
---|
| 34 | ; } |
---|
| 35 | ; |
---|
[6] | 36 | ; SEE ALSO |
---|
| 37 | ; ======== |
---|
| 38 | ; |
---|
| 39 | ; EXAMPLES |
---|
| 40 | ; ======== |
---|
| 41 | ; |
---|
| 42 | ; :: |
---|
| 43 | ; |
---|
| 44 | ; IDL> tropflux_swr_blnd_19890101_20091231 |
---|
| 45 | ; |
---|
| 46 | ; |
---|
| 47 | ; TODO |
---|
| 48 | ; ==== |
---|
| 49 | ; |
---|
| 50 | ; hard coded directory - usage of ${TROPFLUX_ID} |
---|
| 51 | ; |
---|
| 52 | ; coding rules |
---|
| 53 | ; |
---|
| 54 | ; EVOLUTIONS |
---|
| 55 | ; ========== |
---|
| 56 | ; |
---|
[8] | 57 | ; - fplod 20101215T085754Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 58 | ; |
---|
| 59 | ; * add graph in header |
---|
| 60 | ; |
---|
[6] | 61 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 62 | ; |
---|
| 63 | ; * minimal header |
---|
| 64 | ; |
---|
| 65 | ; - pbk 2008 |
---|
| 66 | ; |
---|
| 67 | ; * creation |
---|
| 68 | ; |
---|
| 69 | ;- |
---|
[5] | 70 | pro TropFlux_swr_BLND_19890101_20091231 |
---|
| 71 | @common |
---|
| 72 | dir="/Users/pkb/data/TropFlux/" |
---|
| 73 | |
---|
| 74 | file=dir+"TropFlux_swr_19890101_20071231_DT_v50.nc" |
---|
| 75 | initncdf, file |
---|
| 76 | dt=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) |
---|
| 77 | help, dt |
---|
| 78 | |
---|
| 79 | file=dir+"TropFlux_swr_19890101_20091231_NRT_v50.nc" |
---|
| 80 | initncdf, file |
---|
| 81 | nrt=read_ncdf("sw", 20080100, 20100112, file=file,/nostr) |
---|
| 82 | help, nrt |
---|
| 83 | |
---|
| 84 | swr_nrt=read_ncdf("sw", 19880101, 20100112, file=file,/nostr) |
---|
| 85 | |
---|
| 86 | swr_dt=[[[dt]],[[nrt]]] |
---|
| 87 | help, swr_dt, swr_nrt |
---|
| 88 | |
---|
| 89 | swr_merged=swr_dt*0. |
---|
| 90 | |
---|
| 91 | time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) |
---|
| 92 | |
---|
| 93 | a=interpol([1.,0.],[julday(10,01,2007),julday(12,31,2007)],time) |
---|
| 94 | a=((a > 0.) < 1.) |
---|
| 95 | for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt) |
---|
| 96 | |
---|
| 97 | file=dir+"TropFlux_gustiness_19890101_20091231_v50.nc" |
---|
| 98 | initncdf, file |
---|
| 99 | time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) |
---|
| 100 | lat=reform(gphit(0,0:jpj-1)) |
---|
| 101 | lon=reform(glamt(0:jpi-1,0)) |
---|
| 102 | cda0=string(jul2date(time(0)),format='(i8.8)') |
---|
| 103 | cda1=string(jul2date(time(jpt-1)),format='(i8.8)') |
---|
| 104 | |
---|
| 105 | time=time-julday(1,1,1950,00,00) |
---|
| 106 | ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc |
---|
| 107 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 108 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 109 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
| 110 | sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'} |
---|
| 111 | globattr={source:'ISCCP based SWR until 2007, after 2007 timeseries is completed with OLR based SWR. A linear transition is applied from ISCCP based SWR to OLR based SWR'} |
---|
| 112 | |
---|
| 113 | ncfields = 'swr[longitude,latitude,time]=swr_merged:sw_attr; ' $ |
---|
| 114 | + 'longitude[]=lon:lon_attr; ' $ |
---|
| 115 | + 'latitude[]=lat:lat_attr; ' $ |
---|
| 116 | + 'time[*time]=time:time_attr ' $ |
---|
| 117 | + ' @ globattr' |
---|
| 118 | |
---|
| 119 | @ncdf_quickwrite |
---|
| 120 | |
---|
| 121 | end |
---|