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 | ;- |
---|
63 | pro cronin_gustiness_ncdf |
---|
64 | @common |
---|
65 | da1=19880101 & da2=20101231 |
---|
66 | date1=19890101 & date2=20081231 |
---|
67 | |
---|
68 | file_sst='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc' |
---|
69 | initncdf, file_sst |
---|
70 | sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) & sst=reform(sst-273.15) |
---|
71 | help, sst |
---|
72 | |
---|
73 | sst_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 | |
---|
77 | jpt=n_elements(time) |
---|
78 | |
---|
79 | wg_tot=sst*0. |
---|
80 | for jt=0, jpt-1 do begin |
---|
81 | wg_tot(*,*,jt)=(((sst_clim(*,*)-23.7)*2.1/(29.8-23.7)) > 1.) <2.1 |
---|
82 | endfor |
---|
83 | help, wg_tot |
---|
84 | |
---|
85 | ;; writing field |
---|
86 | time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) |
---|
87 | |
---|
88 | cda0=string(jul2date(time(0)),format='(i8.8)') |
---|
89 | cda1=string(jul2date(time(jpt-1)),format='(i8.8)') |
---|
90 | tt=time-julday(1,1,1950,00,00,00) |
---|
91 | xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*)) |
---|
92 | |
---|
93 | ncfile='!/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc' |
---|
94 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
95 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
96 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:' 1950-JAN-01 00:00:00'} |
---|
97 | gust_attr={units:'m/s',missing_value:valmask,long_name:'Climatological gustiness',short_name:'wg',axis:'TYX'} |
---|
98 | globattr={source:'Climatological wind gustiness obtained by fitting cronins gustiness values against sst ',timerange:cda0+' - '+cda1} |
---|
99 | |
---|
100 | ncfields = '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 | |
---|
108 | return |
---|
109 | end |
---|