1 SUBROUTINE P1P2 (PD,PX,NI,NJ)
2 DIMENSION PD(NI,NJ),PX(NI,NJ)
4 C THIS ROUTINE DETERMINES P(.) FROM P(X) BY A 4-POINT INTERPOLATION.
5 C ON THE X-GRID, A P(X) POINT OUTSIDE THE GRID DOMAIN IS ASSUMED TO
6 C SATISFY P(0,J)=P(1,J); P(NI,J)=P(NI-1,J); AND SIMILARLY FOR THE I`S.
13 1 PD(I,J)=0.25*(PX(I,J)+PX(I-1,J)+PX(I,J-1)+PX(I-1,J-1))
16 PD(I,1)=0.5*(PX(I,1)+PX(I-1,1))
17 2 PD(I,NJ)=0.5*(PX(I,NJ1)+PX(I-1,NJ1))
20 PD(1,J)=0.5*(PX(1,J)+PX(1,J-1))
21 3 PD(NI,J)=0.5*(PX(NI1,J)+PX(NI1,J-1))