1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/solve_for_pressure.F,v 1.5 1998/06/09 15:58:36 adcroft 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 |
|
13 |
C == Global variables |
14 |
#include "SIZE.h" |
15 |
#include "EEPARAMS.h" |
16 |
#include "PARAMS.h" |
17 |
#include "DYNVARS.h" |
18 |
#include "CG2D.h" |
19 |
|
20 |
C == Routine arguments == |
21 |
C myThid - Number of this instance of SOLVE_FOR_PRESSURE |
22 |
INTEGER myThid |
23 |
CEndOfInterface |
24 |
|
25 |
C Local variables |
26 |
INTEGER i,j,k,bi,bj |
27 |
|
28 |
#ifdef ALLOW_CD |
29 |
C-- Save previous solution. |
30 |
DO bj=myByLo(myThid),myByHi(myThid) |
31 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
32 |
DO j=1-OLy,sNy+OLy |
33 |
DO i=1-OLx,sNx+OLx |
34 |
cg2d_xNM1(i,j,bi,bj) = cg2d_x(i,j,bi,bj) |
35 |
ENDDO |
36 |
ENDDO |
37 |
ENDDO |
38 |
ENDDO |
39 |
#endif |
40 |
|
41 |
C-- Find the surface pressure using a two-dimensional conjugate |
42 |
C-- gradient solver. |
43 |
C see CG2D.h for the interface to this routine. |
44 |
CALL CG2D( |
45 |
I cg2d_b, |
46 |
U cg2d_x, |
47 |
I myThid ) |
48 |
|
49 |
|
50 |
RETURN |
51 |
END |