function fpoisson_solver,pp ; Purpose: solve poisson on a sphere, leaving SPHEREPACK to do the hard work ; 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; ' ; We'll put the result here pp1=pp ; First, prepare the data file x=xc(pp,/arr) y=yc(pp,/arr) spawn,'rm fort.52 2> /dev/null' 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 ; Now run stoat spawn,rm+dir+'poisson_solver1 > /dev/null' ; Read in results pp1.data=readfromfile('fort.51') ; And thats it! return,pp1 end