[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; .. _TropFlux_NRT_ncdf_v50.pro: |
---|
| 4 | ; |
---|
| 5 | ; ========================= |
---|
| 6 | ; TropFlux_NRT_ncdf_v50.pro |
---|
| 7 | ; ========================= |
---|
| 8 | ; |
---|
[7] | 9 | ; |
---|
| 10 | ; .. only:: man |
---|
| 11 | ; |
---|
| 12 | ; Figure is visible on PDF and HTML documents only. |
---|
| 13 | ; |
---|
| 14 | ; .. only:: html |
---|
| 15 | ; |
---|
| 16 | ; .. graphviz:: |
---|
| 17 | ; |
---|
| 18 | ; digraph TropFlux_NRT_ncdf_v50 { |
---|
| 19 | ; graph [ |
---|
| 20 | ; rankdir="LR", |
---|
| 21 | ; ] |
---|
[9] | 22 | ; file1 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"]; |
---|
| 23 | ; file2 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_lwr_19890101_20091231_v50.nc"]; |
---|
[7] | 24 | ; file3 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc"]; |
---|
| 25 | ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"]; |
---|
| 26 | ; TropFlux_NRT_ncdf_v50 [shape=box, |
---|
| 27 | ; fontname=Courier, |
---|
| 28 | ; color=blue, |
---|
| 29 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_NRT_ncdf_v50.pro", |
---|
| 30 | ; label="${TROPFLUX}/src/TropFlux_NRT_ncdf_v50.pro" ]; |
---|
| 31 | ; {file1 file2 file3} -> {TropFlux_NRT_ncdf_v50} -> {ncfile} |
---|
| 32 | ; } |
---|
| 33 | ; |
---|
[6] | 34 | ; SEE ALSO |
---|
| 35 | ; ======== |
---|
| 36 | ; |
---|
| 37 | ; EXAMPLES |
---|
| 38 | ; ======== |
---|
| 39 | ; |
---|
| 40 | ; :: |
---|
| 41 | ; |
---|
[7] | 42 | ; IDL> tropflux_nrt_ncdf_v50 |
---|
[6] | 43 | ; |
---|
| 44 | ; TODO |
---|
| 45 | ; ==== |
---|
| 46 | ; |
---|
| 47 | ; hard coded directory - usage of ${TROPFLUX_ID} |
---|
| 48 | ; |
---|
| 49 | ; coding rules |
---|
| 50 | ; |
---|
| 51 | ; EVOLUTIONS |
---|
| 52 | ; ========== |
---|
| 53 | ; |
---|
[7] | 54 | ; - fplod 20101214T112526Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 55 | ; |
---|
| 56 | ; * add graph |
---|
[6] | 57 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 58 | ; |
---|
| 59 | ; * minimal header |
---|
| 60 | ; |
---|
| 61 | ; - pbk 2008 |
---|
| 62 | ; |
---|
| 63 | ; * creation |
---|
| 64 | ; |
---|
| 65 | ;- |
---|
[5] | 66 | pro TropFlux_NRT_ncdf_v50 |
---|
| 67 | @common |
---|
[7] | 68 | |
---|
[5] | 69 | dir="/Users/pkb/data/TropFlux/" |
---|
| 70 | file=dir+"TropFlux_swr_19890101_20091231_BLND.nc" |
---|
| 71 | initncdf, file |
---|
| 72 | st=19800101 & en=20101231 |
---|
| 73 | |
---|
| 74 | swr=read_ncdf("swr", st, en, file=file,/nostr) |
---|
| 75 | |
---|
| 76 | file=dir+"TropFlux_lwr_19890101_20091231_v50.nc" |
---|
| 77 | initncdf, file |
---|
| 78 | lwr=read_ncdf("lwr", st, en, file=file,/nostr) |
---|
| 79 | |
---|
| 80 | file=dir+"TropFlux_19890101_20091231_v51.nc" |
---|
| 81 | initncdf, file |
---|
| 82 | lhf=read_ncdf("lhf", st, en, file=file,/nostr) |
---|
| 83 | shf=read_ncdf("shf", st, en, file=file,/nostr) |
---|
| 84 | |
---|
| 85 | help, swr, lwr, lhf, shf |
---|
| 86 | |
---|
| 87 | ;time=julday(1,1,1989)+lindgen(7670)+0.5 & jpt=n_elements(time) |
---|
| 88 | time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) |
---|
| 89 | |
---|
| 90 | cda0=string(jul2date(time(0)),format='(i8.8)') |
---|
| 91 | cda1=string(jul2date(time(jpt-1)),format='(i8.8)') |
---|
| 92 | |
---|
| 93 | time=time-julday(1,1,1950,00,00) |
---|
[7] | 94 | ; |
---|
[5] | 95 | lat=reform(gphit(0,0:jpj-1)) |
---|
| 96 | lon=reform(glamt(0:jpi-1,0)) |
---|
| 97 | |
---|
| 98 | ncfile='!/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc' |
---|
| 99 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 100 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 101 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
| 102 | sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'} |
---|
| 103 | lw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Longwave Radiation',short_name:'lwr',axis:'TYX'} |
---|
| 104 | sh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Sensible Heat Flux',short_name:'shf',axis:'TYX'} |
---|
| 105 | lh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Latent Heat Flux',short_name:'lhf',axis:'TYX'} |
---|
| 106 | |
---|
| 107 | globattr={Source:'TropFlux - Air-Sea Fluxes for the Global Tropics', Resolution:'1 x 1 degree and daily', IDL_program_name:'TropFlux_ncdf.pro',Timerange:cda0+' - '+cda1, More_Info:'ISCCP based SWR until 2007 and OLR based SWR after that with a 90 day linear transition between the two'} |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $ |
---|
| 111 | +'lwr[longitude,latitude,time]=lwr:lw_attr; ' $ |
---|
| 112 | +'lhf[longitude,latitude,time]=lhf:lh_attr; ' $ |
---|
| 113 | +'shf[longitude,latitude,time]=shf:sh_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 |
---|