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