[6] | 1 | ;+ |
---|
| 2 | ; |
---|
[74] | 3 | ; .. _TropFlux_NRT_ncdf.pro: |
---|
[6] | 4 | ; |
---|
[74] | 5 | ; ===================== |
---|
| 6 | ; TropFlux_NRT_ncdf.pro |
---|
| 7 | ; ===================== |
---|
[6] | 8 | ; |
---|
[7] | 9 | ; .. graphviz:: |
---|
| 10 | ; |
---|
[74] | 11 | ; digraph tropflux_nrt_ncdf { |
---|
[7] | 12 | ; graph [ |
---|
| 13 | ; rankdir="LR", |
---|
| 14 | ; ] |
---|
[9] | 15 | ; file1 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"]; |
---|
| 16 | ; file2 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_lwr_19890101_20091231_v50.nc"]; |
---|
[7] | 17 | ; file3 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc"]; |
---|
| 18 | ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"]; |
---|
[74] | 19 | ; |
---|
| 20 | ; tropflux_nrt_ncdf [shape=box, |
---|
[7] | 21 | ; fontname=Courier, |
---|
| 22 | ; color=blue, |
---|
[74] | 23 | ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_NRT_ncdf.pro", |
---|
| 24 | ; label="${PROJECT}/src/TropFlux_NRT_ncdf.pro" ]; |
---|
| 25 | ; |
---|
| 26 | ; {file1 file2 file3} -> {tropflux_nrt_ncdf} -> {ncfile} |
---|
[7] | 27 | ; } |
---|
| 28 | ; |
---|
[6] | 29 | ; SEE ALSO |
---|
| 30 | ; ======== |
---|
| 31 | ; |
---|
[20] | 32 | ; :func:`initncdf <saxo:initncdf>` |
---|
| 33 | ; :func:`read_ncdf <saxo:read_ncdf>` |
---|
| 34 | ; :func:`julday <saxo:julday>` |
---|
| 35 | ; :func:`jul2date <saxo:jul2date>` |
---|
| 36 | ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` |
---|
| 37 | ; |
---|
[6] | 38 | ; EXAMPLES |
---|
| 39 | ; ======== |
---|
| 40 | ; |
---|
| 41 | ; :: |
---|
| 42 | ; |
---|
[74] | 43 | ; IDL> tropflux_nrt_ncdf |
---|
[6] | 44 | ; |
---|
| 45 | ; TODO |
---|
| 46 | ; ==== |
---|
| 47 | ; |
---|
[50] | 48 | ; hard coded directory - usage of ${PROJECT_ID} |
---|
[6] | 49 | ; |
---|
| 50 | ; coding rules |
---|
| 51 | ; |
---|
[78] | 52 | ; create 4 files instead of one now |
---|
| 53 | ; |
---|
[6] | 54 | ; EVOLUTIONS |
---|
| 55 | ; ========== |
---|
| 56 | ; |
---|
[81] | 57 | ; $Id$ |
---|
| 58 | ; |
---|
| 59 | ; $URL$ |
---|
| 60 | ; |
---|
[74] | 61 | ; - fplod 20110809T133815Z cratos (Linux) |
---|
| 62 | ; |
---|
| 63 | ; * remove v50 from pro name and in the graph |
---|
| 64 | ; |
---|
[7] | 65 | ; - fplod 20101214T112526Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 66 | ; |
---|
| 67 | ; * add graph |
---|
[74] | 68 | ; |
---|
[6] | 69 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 70 | ; |
---|
| 71 | ; * minimal header |
---|
| 72 | ; |
---|
| 73 | ; - pbk 2008 |
---|
| 74 | ; |
---|
| 75 | ; * creation |
---|
| 76 | ; |
---|
| 77 | ;- |
---|
[74] | 78 | pro TropFlux_NRT_ncdf |
---|
[5] | 79 | @common |
---|
[7] | 80 | |
---|
[5] | 81 | dir="/Users/pkb/data/TropFlux/" |
---|
| 82 | file=dir+"TropFlux_swr_19890101_20091231_BLND.nc" |
---|
| 83 | initncdf, file |
---|
| 84 | st=19800101 & en=20101231 |
---|
| 85 | |
---|
| 86 | swr=read_ncdf("swr", st, en, file=file,/nostr) |
---|
| 87 | |
---|
| 88 | file=dir+"TropFlux_lwr_19890101_20091231_v50.nc" |
---|
| 89 | initncdf, file |
---|
| 90 | lwr=read_ncdf("lwr", st, en, file=file,/nostr) |
---|
| 91 | |
---|
| 92 | file=dir+"TropFlux_19890101_20091231_v51.nc" |
---|
| 93 | initncdf, file |
---|
| 94 | lhf=read_ncdf("lhf", st, en, file=file,/nostr) |
---|
| 95 | shf=read_ncdf("shf", st, en, file=file,/nostr) |
---|
| 96 | |
---|
| 97 | help, swr, lwr, lhf, shf |
---|
| 98 | |
---|
| 99 | ;time=julday(1,1,1989)+lindgen(7670)+0.5 & jpt=n_elements(time) |
---|
| 100 | time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) |
---|
| 101 | |
---|
| 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) |
---|
[7] | 106 | ; |
---|
[5] | 107 | lat=reform(gphit(0,0:jpj-1)) |
---|
| 108 | lon=reform(glamt(0:jpi-1,0)) |
---|
| 109 | |
---|
| 110 | ncfile='!/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc' |
---|
| 111 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
| 112 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
| 113 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
| 114 | sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'} |
---|
| 115 | lw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Longwave Radiation',short_name:'lwr',axis:'TYX'} |
---|
| 116 | sh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Sensible Heat Flux',short_name:'shf',axis:'TYX'} |
---|
| 117 | lh_attr={units:'w/m^2',missing_value:1.e20,long_name:'Latent Heat Flux',short_name:'lhf',axis:'TYX'} |
---|
| 118 | |
---|
| 119 | 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'} |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $ |
---|
| 123 | +'lwr[longitude,latitude,time]=lwr:lw_attr; ' $ |
---|
| 124 | +'lhf[longitude,latitude,time]=lhf:lh_attr; ' $ |
---|
| 125 | +'shf[longitude,latitude,time]=shf:sh_attr; ' $ |
---|
| 126 | + 'longitude[]=lon:lon_attr; ' $ |
---|
| 127 | + 'latitude[]=lat:lat_attr; ' $ |
---|
| 128 | + 'time[*time]=time:time_attr ' $ |
---|
| 129 | + ' @ globattr' |
---|
| 130 | |
---|
| 131 | @ncdf_quickwrite |
---|
| 132 | |
---|
| 133 | end |
---|