1 |
adcroft |
1.8 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/solve_for_pressure.F,v 1.7 1998/11/06 22:44:49 cnh Exp $ |
2 |
cnh |
1.1 |
|
3 |
adcroft |
1.5 |
#include "CPP_OPTIONS.h" |
4 |
cnh |
1.1 |
|
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 |
adcroft |
1.8 |
IMPLICIT NONE |
13 |
cnh |
1.1 |
|
14 |
cnh |
1.4 |
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 |
cnh |
1.1 |
C == Routine arguments == |
22 |
|
|
C myThid - Number of this instance of SOLVE_FOR_PRESSURE |
23 |
|
|
INTEGER myThid |
24 |
|
|
CEndOfInterface |
25 |
cnh |
1.4 |
|
26 |
|
|
C Local variables |
27 |
cnh |
1.6 |
INTEGER i,j,k,bi,bj |
28 |
cnh |
1.4 |
|
29 |
cnh |
1.7 |
#ifdef INCLUDE_CD_CODE |
30 |
cnh |
1.4 |
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 |
cnh |
1.1 |
|
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 |
cnh |
1.6 |
I cg2d_b, |
47 |
|
|
U cg2d_x, |
48 |
cnh |
1.1 |
I myThid ) |
49 |
|
|
|
50 |
|
|
|
51 |
|
|
RETURN |
52 |
|
|
END |