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