1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/solve_for_pressure.F,v 1.7 1998/11/06 22:44:49 cnh Exp $ |
2 |
|
3 |
#include "CPP_OPTIONS.h" |
4 |
|
5 |
CStartOfInterface |
6 |
SUBROUTINE SOLVE_FOR_PRESSURE( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE SOLVE_FOR_PRESSURE | |
9 |
C | o Controls inversion of two and/or three-dimensional | |
10 |
C | elliptic problems for the pressure field. | |
11 |
C \==========================================================/ |
12 |
IMPLICIT NONE |
13 |
|
14 |
C == Global variables |
15 |
#include "SIZE.h" |
16 |
#include "EEPARAMS.h" |
17 |
#include "PARAMS.h" |
18 |
#include "DYNVARS.h" |
19 |
#include "CG2D.h" |
20 |
|
21 |
C == Routine arguments == |
22 |
C myThid - Number of this instance of SOLVE_FOR_PRESSURE |
23 |
INTEGER myThid |
24 |
CEndOfInterface |
25 |
|
26 |
C Local variables |
27 |
INTEGER i,j,k,bi,bj |
28 |
|
29 |
#ifdef INCLUDE_CD_CODE |
30 |
C-- Save previous solution. |
31 |
DO bj=myByLo(myThid),myByHi(myThid) |
32 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
33 |
DO j=1-OLy,sNy+OLy |
34 |
DO i=1-OLx,sNx+OLx |
35 |
cg2d_xNM1(i,j,bi,bj) = cg2d_x(i,j,bi,bj) |
36 |
ENDDO |
37 |
ENDDO |
38 |
ENDDO |
39 |
ENDDO |
40 |
#endif |
41 |
|
42 |
C-- Find the surface pressure using a two-dimensional conjugate |
43 |
C-- gradient solver. |
44 |
C see CG2D.h for the interface to this routine. |
45 |
CALL CG2D( |
46 |
I cg2d_b, |
47 |
U cg2d_x, |
48 |
I myThid ) |
49 |
|
50 |
|
51 |
RETURN |
52 |
END |