source: trunk/src/cronin_gustiness_ncdf.pro @ 11

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

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

File size: 3.0 KB
Line 
1;+
2;
3; .. _cronin_gustiness_ncdf.pro:
4;
5; =========================
6; cronin_gustiness_ncdf.pro
7; =========================
8;
9;
10;
11; .. only:: man
12;
13; Figure is visible on PDF and HTML documents only.
14;
15; .. only:: html
16;
17;     .. graphviz::
18;
19;        digraph cronin_gustiness_ncdf {
20;           graph [
21;           rankdir="LR",
22;           ]
23;           file_sst [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc"];
24;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"];
25;           cronin_gustiness_ncdf [shape=box,
26;           fontname=Courier,
27;           color=blue,
28;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/cronin_gustiness_ncdf.pro",
29;           label="${TROPFLUX}/src/cronin_gustiness_ncdf.pro"];
30;           {file_sst} -> {cronin_gustiness_ncdf} -> {ncfile}
31;        }
32;
33; EXAMPLES
34; ========
35;
36; ::
37;
38;  IDL> cronin_gustiness_ncdf
39;
40; TODO
41; ====
42;
43; hard coded directory - usage of ${TROPFLUX_ID}
44;
45; coding rules
46;
47; EVOLUTIONS
48; ==========
49;
50; - fplod 20101215T092619Z aedon.locean-ipsl.upmc.fr (Darwin)
51;
52;   * add graph in header
53;
54; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
55;
56;   * minimal header
57;
58; - pbk 2008
59;
60;   * creation
61;
62;-
63pro cronin_gustiness_ncdf
64@common
65da1=19880101 & da2=20101231
66date1=19890101 & date2=20081231
67
68file_sst='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc'
69initncdf, file_sst
70sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) & sst=reform(sst-273.15)
71help, sst
72
73sst_clim=grossemoyenne(sst, 't',/nan)
74;wg=0.175*sst_clim-3.17  ;; line fit obtained from the scatter (Cronin gustiness Vs ERAI SST)
75;help, wg
76
77jpt=n_elements(time)
78
79wg_tot=sst*0.
80for jt=0, jpt-1 do begin
81    wg_tot(*,*,jt)=(((sst_clim(*,*)-23.7)*2.1/(29.8-23.7)) > 1.) <2.1
82endfor
83help, wg_tot
84
85;; writing field
86time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
87
88cda0=string(jul2date(time(0)),format='(i8.8)')
89cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
90tt=time-julday(1,1,1950,00,00,00)
91xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*))
92
93ncfile='!/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc'
94lon_attr={units:'degrees_east',long_name:'Longitude'}
95lat_attr={units:'degrees_north',long_name:'Latitude'}
96time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'}
97gust_attr={units:'m/s',missing_value:valmask,long_name:'Climatological gustiness',short_name:'wg',axis:'TYX'}
98globattr={source:'Climatological wind gustiness obtained by fitting cronins gustiness values against sst ',timerange:cda0+' - '+cda1}
99
100ncfields = 'wg[longitude,latitude,time]=wg_tot:gust_attr; ' $
101                      + 'longitude[]=xlon:lon_attr; ' $
102                      + 'latitude[]=ylat:lat_attr; ' $
103                      + 'tt[*time]=tt:time_attr ' $
104                      + ' @ globattr'
105
106@ncdf_quickwrite
107
108return
109end
Note: See TracBrowser for help on using the repository browser.