pro ws_tropflux_1d_to_1m_ncdf @common ;----------------------------------------------------------------------------- file="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc" initncdf, file st=19890101 & en=20101231 ws=read_ncdf("ws", st, en, file=file,/nostr) help, ws tt=time ; ;; Monthly data ; jpt=22*12. & time=timegen(jpt,start=julday(1,15,1989),units='Months') caldat, tt,m,d,y caldat, time, mon,day,yea wsm=fltarr(nxt,nyt,jpt) for jt=0,jpt-1 do begin ind=where((m eq mon(jt)) and (y eq yea(jt))) wsm(*,*,jt)=total(ws(*,*,ind),3)/n_elements(ind) endfor ;----------------------------------------------------------------------------- cda0=string(jul2date(time(0)),format='(i8.8)') cda1=string(jul2date(time(jpt-1)),format='(i8.8)') time=time-julday(1,1,1950,00,00,00) xlon=reform(glamt(firstxt:lastxt,0) ) & ylat=reform(gphit(0,firstyt:lastyt)) ncfile='!/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1m_1989_2010.nc' lon_attr={units:'degrees_east',long_name:'Longitude'} lat_attr={units:'degrees_north',long_name:'Latitude'} time_attr={units:'days since 1950-01-01 00:00:00',long_name:'Time axis',time_origin:'1950-JAN-01 00:00:00'} ws_attr={units:'m/s',missing_value:1.e20,long_name:'Mean wind speed at 10m height',short_name:'ws',axis:'TYX'} 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/'} ncfields = 'ws[longitude,latitude,time]=wsm:ws_attr; ' $ + 'longitude[]=xlon:lon_attr; ' $ + 'latitude[]=ylat:lat_attr; ' $ + 'time[*time]=time:time_attr ' $ + ' @ globattr' @ncdf_quickwrite ;------------------------------------------------------------ return end