source: trunk/src/TropFlux_swr_DT_19890101_20071231.pro @ 6

Last change on this file since 6 was 6, checked in by pinsard, 14 years ago

minimal header in .pro

File size: 2.5 KB
Line 
1;+
2;
3; .. _TropFlux_swr_DT_19890101_20071231.pro:
4;
5; =====================================
6; TropFlux_swr_DT_19890101_20071231.pro
7; =====================================
8;
9;
10; SEE ALSO
11; ========
12;
13; EXAMPLES
14; ========
15;
16; ::
17;
18;  IDL> tropflux_swr_dt_19890101_20071231
19;
20; TODO
21; ====
22;
23; hard coded directory - usage of ${TROPFLUX_ID}
24;
25; coding rules
26;
27; EVOLUTIONS
28; ==========
29;
30; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
31;
32;   * minimal header
33;
34; - pbk 2008
35;
36;   * creation
37;
38;-
39pro TropFlux_swr_DT_19890101_20071231
40@common
41;----------------------------------------------------------------
42file='/Volumes/Iomega_HDD/work/flux_reconstruction/OAFLX_GRID/swr_oafluxgrid_1985_2007.nc'
43initncdf, file
44
45sw=read_ncdf("swr", 19890101, 20071231, file=file,/nostr)
46;----------------------------------------------------------------
47help, sw
48
49sw_mean=grossemoyenne(sw, 't',/nan)
50help, sw_mean
51
52;----------------------------------------------------------------
53tt=time & jpt=n_elements(time)
54caldat, time,mon,day,yea
55sw_m=sw*0. &  sw_bias=sw*0.
56
57for jt=0,jpt-1 do begin
58  jtt=(time(jt)-julday(1,1,yea(jt))) < 364
59  swr=reform(sw_mean(*,*))
60  sw_m(*,*,jt)=swr
61  sw_bias(*,*,jt)=(((swr-295.4)*18.36/(200.-295.4)) > 0.) < 18.37
62endfor
63
64help, sw_m, sw_bias
65swa=sw-sw_m
66swa=swa/(0.901273)       ;; variability correction (seasonal_cycle_swr_isccp.pro)
67
68swr=sw_m+swa-sw_bias       ;; new swr, corrected for bias and variability
69;----------------------------------------------------------------
70;writing field
71;time=julday(1,1,1989)+lindgen(7670)
72cda0=string(jul2date(tt(0)),format='(i8.8)')
73cda1=string(jul2date(tt(jpt-1)),format='(i8.8)')
74
75lat=reform(gphit(0,0:jpj-1))
76lon=reform(glamt(0:jpi-1,0))
77time=time-julday(1,1,1950) & jpt=n_elements(time)
78
79ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc'
80lon_attr={units:'degrees_east',long_name:'Longitude'}
81lat_attr={units:'degrees_north',long_name:'Latitude'}
82time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'}
83sw_attr={units:'w/m^2',missing_value:1.e20,long_name:'Net Shortwave Radiation',short_name:'swr',axis:'TYX'}
84globattr={source:'Obtained from ISCCP.  Corrections has been done on mean bias and variability',timerange:cda0+' - '+cda1}
85
86
87ncfields = 'swr[longitude,latitude,time]=swr:sw_attr; ' $
88                      + 'longitude[]=lon:lon_attr; ' $
89                      + 'latitude[]=lat:lat_attr; ' $
90                      + 'time[*time]=time:time_attr ' $
91                      + ' @ globattr'
92
93@ncdf_quickwrite
94
95end
Note: See TracBrowser for help on using the repository browser.