/[MITgcm]/MITgcm/model/src/correction_step.F
ViewVC logotype

Contents of /MITgcm/model/src/correction_step.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Jun 1 20:36:13 1998 UTC (26 years, 1 month ago) by adcroft
Branch: MAIN
Swapped the time-stepping algorithm around (just a little bit).
We now officially use the predictor-corrector terminology.
We make the prediction step at the end of the dynamics() section
and store the result in the gUNm1, gVNm1, gTNm1 arrays.
The "tricky" part is that at the beginning of the dynamics section,
where the "correction" is made, theses arrays must be initialised
at the beginning of any run. A new routine init_predictor() does this.
This is "all" in preparation for implicit diffusion. Let's hope
it's enough...

1 C $Header$
2
3 #include "CPP_EEOPTIONS.h"
4
5 C /==========================================================\
6 C | S/R CORRECTION_STEP |
7 C | o Corrects the horizontal flow fields with the surface |
8 C | pressure gradient. |
9 C \==========================================================/
10 SUBROUTINE CORRECTION_STEP( bi, bj, iMin, iMax, jMin, jMax,
11 I K, pSurfX, pSurfY,
12 I myThid )
13 implicit none
14 ! Common
15 #include "SIZE.h"
16 #include "DYNVARS.h"
17 #include "PARAMS.h"
18 #include "GRID.h"
19 #include "EEPARAMS.h"
20 #include "CG2D.h"
21 C == Routine Arguments ==
22 INTEGER bi,bj,iMin,iMax,jMin,jMax
23 INTEGER K
24 _RL pSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
25 _RL pSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 INTEGER myThid
27 C == Local variables ==
28 INTEGER i,j
29 _RL ab15,ab05,hxFac,hyFac,rRhoNil
30
31 C Adams-Bashforth timestepping weights
32 ab15=1.5+abeps
33 ab05=-0.5-abeps
34
35 C On/off scaling paramters
36 hxFac = pfFacMom
37 hyFac = pfFacMom
38
39 rRhoNil=1. / rhonil
40
41 C Step forward zonal velocity
42 DO j=jMin,jMax
43 DO i=iMin,iMax
44 uVel(i,j,k,bi,bj)=( gUNm1(i,j,k,bi,bj)
45 & -deltaTmom*hxFac*rRhonil *pSurfX(i,j)
46 & )*_maskW(i,j,k,bi,bj)
47 gUNm1(i,j,k,bi,bj)=gU(i,j,k,bi,bj)
48 ENDDO
49 ENDDO
50
51 C Step forward meridional velocity
52 DO j=jMin,jMax
53 DO i=iMin,iMax
54 vVel(i,j,k,bi,bj)=( gVNm1(i,j,k,bi,bj)
55 & -deltaTmom*hyFac*rRhonil *pSurfY(i,j)
56 & )*_maskS(i,j,k,bi,bj)
57 gVNm1(i,j,k,bi,bj)=gV(i,j,k,bi,bj)
58 ENDDO
59 ENDDO
60
61 C Step forward temperature velocity
62 DO j=jMin,jMax
63 DO i=iMin,iMax
64 theta(i,j,k,bi,bj)=gTNm1(i,j,k,bi,bj)
65 gTNm1(i,j,k,bi,bj)=gT(i,j,k,bi,bj)
66 ENDDO
67 ENDDO
68
69 RETURN
70 END

  ViewVC Help
Powered by ViewVC 1.1.22