source: trunk/src/cronin_gustiness_ncdf.pro @ 70

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

replace TROPFLUX by PROJECT

File size: 3.0 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="${PROJECT}/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; SEE ALSO
33; ========
34;
35; :func:`initncdf <saxo:initncdf>`
36; :func:`julday <saxo:julday>`
37; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`
38;
39; TODO
40; ====
41;
42; hard coded directory - usage of ${PROJECT_ID}
43;
44; coding rules
45;
46; EVOLUTIONS
47; ==========
48;
49; - fplod 20101215T092619Z aedon.locean-ipsl.upmc.fr (Darwin)
50;
51;   * add graph in header
52;
53; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
54;
55;   * minimal header
56;
57; - pbk 2008
58;
59;   * creation
60;
61;-
62pro cronin_gustiness_ncdf
63@common
64da1=19880101 & da2=20101231
65date1=19890101 & date2=20081231
66
67file_sst='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc'
68initncdf, file_sst
69sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) & sst=reform(sst-273.15)
70help, sst
71
72sst_clim=grossemoyenne(sst, 't',/nan)
73;wg=0.175*sst_clim-3.17  ;; line fit obtained from the scatter (Cronin gustiness Vs ERAI SST)
74;help, wg
75
76jpt=n_elements(time)
77
78wg_tot=sst*0.
79for jt=0, jpt-1 do begin
80    wg_tot(*,*,jt)=(((sst_clim(*,*)-23.7)*2.1/(29.8-23.7)) > 1.) <2.1
81endfor
82help, wg_tot
83
84;; writing field
85time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time)
86
87cda0=string(jul2date(time(0)),format='(i8.8)')
88cda1=string(jul2date(time(jpt-1)),format='(i8.8)')
89tt=time-julday(1,1,1950,00,00,00)
90xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*))
91
92ncfile='!/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc'
93lon_attr={units:'degrees_east',long_name:'Longitude'}
94lat_attr={units:'degrees_north',long_name:'Latitude'}
95time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'}
96gust_attr={units:'m/s',missing_value:valmask,long_name:'Climatological gustiness',short_name:'wg',axis:'TYX'}
97globattr={source:'Climatological wind gustiness obtained by fitting cronins gustiness values against sst ',timerange:cda0+' - '+cda1}
98
99ncfields = 'wg[longitude,latitude,time]=wg_tot:gust_attr; ' $
100                      + 'longitude[]=xlon:lon_attr; ' $
101                      + 'latitude[]=ylat:lat_attr; ' $
102                      + 'tt[*time]=tt:time_attr ' $
103                      + ' @ globattr'
104
105@ncdf_quickwrite
106
107return
108end
Note: See TracBrowser for help on using the repository browser.