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