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