source: trunk/src/interp_olr_30n30s_1989_2009.pro @ 11

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

add some graph - io - in headers (cont.)

File size: 3.6 KB
Line 
1;+
2;
3; .. _interp_olr_30n30s_1989_2009.pro:
4;
5; ===============================
6; interp_olr_30n30s_1989_2009.pro
7; ===============================
8;
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 interp_olr_30n30s_1989_2009{
19;           graph [
20;           rankdir="LR",
21;           ]
22;           file_in [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc"];
23;
24;           mask [shape=ellipse,fontname=Courier,label="/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc"];
25;
26;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/newolr_oafluxgrid_30n30s_19890101_20091231.nc"];
27;
28;           interp_olr_30n30s_1989_2009 [shape=box,
29;           fontname=Courier,
30;           color=blue,
31;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/interp_olr_30n30s_1989_2009.pro",
32;           label="${TROPFLUX}/src/interp_olr_30n30s_1989_2009.pro"];
33;
34;           {file_in mask} -> {interp_olr_30n30s_1989_2009} -> {ncfile}
35;
36;         }
37;
38; SEE ALSO
39; ========
40;
41; EXAMPLES
42; ========
43;
44; ::
45;
46;  IDL> interp_olr_30n30s_1989_2009
47;
48; TODO
49; ====
50;
51; hard coded directory - usage of ${TROPFLUX_ID}
52;
53; coding rules
54;
55; EVOLUTIONS
56; ==========
57;
58; - fplod 20101215T113118Z aedon.locean-ipsl.upmc.fr (Darwin)
59;
60;   * add graph in header
61;
62; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
63;
64;   * minimal header
65;
66; - pbk 2008
67;
68;   * creation
69;
70;-
71pro interp_olr_30n30s_1989_2009
72@common
73
74filein='/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc'
75gridout='/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc'
76
77initncdf, filein
78domdef
79latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0))
80print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0)
81print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0)
82olrin=read_ncdf("olr",19881231, 20091231, file=filein,/nostr)
83
84mskin=glamt*0.+1.
85
86timein=time & jptin=jpt
87
88initncdf, gridout
89domdef
90latout=reform(gphit(0,*)) & lonout=reform(glamt(*,0))
91print, 'lat grid ',min(latout),max(latout),latout(1)-latout(0)
92print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0)
93mskout=read_ncdf("msk", file=gridout,/nostr)
94
95help, olrin,lonin,latin,mskin,lonout,latout,mskout
96
97olrout=fltarr(jpi,jpj,jptin)
98
99for jt=0,jptin-1 do begin
100
101  print, 'Interpolation jt=',jt,' / ',jptin-1
102  tab_olr=reform(olrin(*,*,jt))
103
104  olrout(*,*,jt)=call_interp2d(tab_olr,lonin,latin,mskin,lonout,latout,method='bilinear')
105
106  olrout(*,*,jt)=olrout(*,*,jt)*mskout+(1.-mskout)*1.e20
107
108endfor
109
110
111timein=timein & jptin=jpt
112
113timein=timein-julday(1,1,1950,00,00)
114
115lat=latout
116lon=lonout
117ncfile='!/Users/pkb/data/heat_budget/NOAA_OLR/newolr_oafluxgrid_30n30s_19890101_20091231.nc'
118lon_attr={units:'degrees_east',long_name:'Longitude'}
119lat_attr={units:'degrees_north',long_name:'Latitude'}
120time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'}
121olr_attr={units:'w/m^2',missing_value:1e20,long_name:'Outgoing Longwave Radiation',short_name:'olr',axis:'TYX'}
122olra_attr={units:'w/m^2',missing_value:1e20,long_name:'Outgoing Longwave Radiation Anomaly',short_name:'olra',axis:'TYX'}
123globattr={source:'NOAA OLR, cf http://www.cdc.noaa.gov/cdc/data.interp_OLR.html, interpolated to 1x1 degree grid and with oaflux mask'}
124
125
126ncfields = 'olr[longitude,latitude,time]=olrout:olr_attr; ' $
127                      + 'longitude[]=lon:lon_attr; ' $
128                      + 'latitude[]=lat:lat_attr; ' $
129                      + 'time[*time]=timein:time_attr ' $
130                      + ' @ globattr'
131
132@ncdf_quickwrite
133
134
135end
Note: See TracBrowser for help on using the repository browser.