;+ ; ; .. _cronin_gustiness_ncdf.pro: ; ; ========================= ; cronin_gustiness_ncdf.pro ; ========================= ; ; .. graphviz:: ; ; digraph cronin_gustiness_ncdf { ; graph [ ; rankdir="LR", ; ] ; file_sst [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc"]; ; ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"]; ; cronin_gustiness_ncdf [shape=box, ; fontname=Courier, ; color=blue, ; URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/cronin_gustiness_ncdf.pro", ; label="${PROJECT}/src/cronin_gustiness_ncdf.pro"]; ; {file_sst} -> {cronin_gustiness_ncdf} -> {ncfile} ; } ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> cronin_gustiness_ncdf ; ; SEE ALSO ; ======== ; ; :func:`initncdf ` ; :func:`julday ` ; :func:`ncdf_quickwrite ` ; ; TODO ; ==== ; ; hard coded directory - usage of ${PROJECT_ID} ; ; coding rules ; ; EVOLUTIONS ; ========== ; ; - fplod 20101215T092619Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * add graph in header ; ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ; - pbk 2008 ; ; * creation ; ;- pro cronin_gustiness_ncdf @common da1=19880101 & da2=20101231 date1=19890101 & date2=20081231 file_sst='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231.nc' initncdf, file_sst sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) & sst=reform(sst-273.15) help, sst sst_clim=grossemoyenne(sst, 't',/nan) ;wg=0.175*sst_clim-3.17 ;; line fit obtained from the scatter (Cronin gustiness Vs ERAI SST) ;help, wg jpt=n_elements(time) wg_tot=sst*0. for jt=0, jpt-1 do begin wg_tot(*,*,jt)=(((sst_clim(*,*)-23.7)*2.1/(29.8-23.7)) > 1.) <2.1 endfor help, wg_tot ;; writing field time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) cda0=string(jul2date(time(0)),format='(i8.8)') cda1=string(jul2date(time(jpt-1)),format='(i8.8)') tt=time-julday(1,1,1950,00,00,00) xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*)) ncfile='!/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.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'} gust_attr={units:'m/s',missing_value:valmask,long_name:'Climatological gustiness',short_name:'wg',axis:'TYX'} globattr={source:'Climatological wind gustiness obtained by fitting cronins gustiness values against sst ',timerange:cda0+' - '+cda1} ncfields = 'wg[longitude,latitude,time]=wg_tot:gust_attr; ' $ + 'longitude[]=xlon:lon_attr; ' $ + 'latitude[]=ylat:lat_attr; ' $ + 'tt[*time]=tt:time_attr ' $ + ' @ globattr' @ncdf_quickwrite return end