1 | pro ws_tropflux_1d_to_1m_ncdf |
---|
2 | @common |
---|
3 | ;----------------------------------------------------------------------------- |
---|
4 | file="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc" |
---|
5 | initncdf, file |
---|
6 | st=19890101 & en=20101231 |
---|
7 | ws=read_ncdf("ws", st, en, file=file,/nostr) |
---|
8 | |
---|
9 | help, ws |
---|
10 | |
---|
11 | tt=time |
---|
12 | ; |
---|
13 | ;; Monthly data |
---|
14 | ; |
---|
15 | jpt=22*12. & time=timegen(jpt,start=julday(1,15,1989),units='Months') |
---|
16 | caldat, tt,m,d,y |
---|
17 | caldat, time, mon,day,yea |
---|
18 | |
---|
19 | wsm=fltarr(nxt,nyt,jpt) |
---|
20 | |
---|
21 | for jt=0,jpt-1 do begin |
---|
22 | |
---|
23 | ind=where((m eq mon(jt)) and (y eq yea(jt))) |
---|
24 | wsm(*,*,jt)=total(ws(*,*,ind),3)/n_elements(ind) |
---|
25 | |
---|
26 | endfor |
---|
27 | |
---|
28 | |
---|
29 | ;----------------------------------------------------------------------------- |
---|
30 | cda0=string(jul2date(time(0)),format='(i8.8)') |
---|
31 | cda1=string(jul2date(time(jpt-1)),format='(i8.8)') |
---|
32 | time=time-julday(1,1,1950,00,00,00) |
---|
33 | xlon=reform(glamt(firstxt:lastxt,0) ) & ylat=reform(gphit(0,firstyt:lastyt)) |
---|
34 | |
---|
35 | ncfile='!/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1m_1989_2010.nc' |
---|
36 | |
---|
37 | lon_attr={units:'degrees_east',long_name:'Longitude'} |
---|
38 | lat_attr={units:'degrees_north',long_name:'Latitude'} |
---|
39 | |
---|
40 | time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} |
---|
41 | ws_attr={units:'m/s',missing_value:1.e20,long_name:'Mean wind speed at 10m height',short_name:'ws',axis:'TYX'} |
---|
42 | globattr={Source:'TropFlux - Air-Sea Fluxes for the Global Tropics', Metodology:'Praveen Kumar et al., Clim. Dyn 2011', Producer_Agency:'Joint research colloboration between IPSL, Paris and NIO, India', Time_range:cda0+' - '+cda1, Creation_date:'20110815', Website:'http://www.locean-ipsl.upmc.fr/tropflux/'} |
---|
43 | |
---|
44 | |
---|
45 | ncfields = 'ws[longitude,latitude,time]=wsm:ws_attr; ' $ |
---|
46 | + 'longitude[]=xlon:lon_attr; ' $ |
---|
47 | + 'latitude[]=ylat:lat_attr; ' $ |
---|
48 | + 'time[*time]=time:time_attr ' $ |
---|
49 | + ' @ globattr' |
---|
50 | |
---|
51 | @ncdf_quickwrite |
---|
52 | |
---|
53 | ;------------------------------------------------------------ |
---|
54 | return |
---|
55 | |
---|
56 | end |
---|
57 | |
---|