source: trunk/src/TropFlux_swr_DT_19890101_20071231.pro @ 13

Last change on this file since 13 was 12, checked in by pinsard, 13 years ago

fix for graph in PDF

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