1 subroutine argos_pme_getgrd(node,nsl,lsldo,maxsl,grid) 2c 3 implicit none 4c 5#include "argos_pme_common.fh" 6#include "global.fh" 7c 8 integer node,nsl 9 logical lsldo(np,mgz) 10 integer maxsl(4,np,mgz) 11 real*8 grid(mgrx,mgry,*) 12c 13 integer k,ilsl,ihsl,jlsl,jhsl 14 integer minx,maxx,miny,maxy 15c 16 do 1 k=1,nsl 17 if(lsldo(node+1,k)) then 18 minx=maxsl(1,node+1,k) 19 maxx=maxsl(2,node+1,k) 20 miny=maxsl(3,node+1,k) 21 maxy=maxsl(4,node+1,k) 22c minx=1 23c maxx=ngx 24c miny=1 25c maxy=ngy 26 call ga_distribution(lslab(k),node,ilsl,ihsl,jlsl,jhsl) 27 call ga_get(lslab(k),ilsl+minx-1,ilsl+maxx-1,jlsl+miny-1, 28 + jlsl+maxy-1,grid(minx,miny,k),mgrx) 29 endif 30 1 continue 31c 32 return 33 end 34c $Id$ 35