function flaplacian,pp,noisy=noisy ; Purpose: compute laplacian on a sphere ; Category pp fortran ; Note: this routine uses SPHEREPACK to do the work. ; see ~wmc/wave/pros/sfvp1/index.html for more info ; The routine will work on alphas ONLY dir='/users/icd/wmc/wave/pros/sfvp1/' rm='rm fort.51 2> /dev/null; ' exe='laplacian1.'+!version.os+'.exe' ; We'll put the result here pp1=pp ; First, prepare the data file for the prog "laplacian" - fort.52 x=xc(pp,/arr) y=yc(pp,/arr) openw,lun,/get,'fort.52' printf,lun,pp.lbnpt,pp.lbrow for i=0,pp.lbrow-1 do for j=0,pp.lbnpt-1 do printf,lun,pp.data(j,i) close,lun free_lun,lun if (keyword_set(noisy)) then begin print,'Written data file fort.52:' spawn,'ls -l fort.52' endif ; Now run stoat cmd=rm+dir+exe if (keyword_set(noisy)) then print,'About to spawn: '+cmd spawn,cmd,junk if (keyword_set(noisy)) then print,junk ; Read in results pp1.data=readfromfile('fort.51') ; And thats it! return,pp1 end