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

Annotation of /MITgcm/model/src/timestep.F

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


Revision 1.7 - (hide annotations) (download)
Mon Jun 1 20:36:13 1998 UTC (26 years ago) by adcroft
Branch: MAIN
Changes since 1.6: +10 -30 lines
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 adcroft 1.7 C $Header: /u/gcmpack/models/MITgcmUV/model/src/timestep.F,v 1.6 1998/05/30 02:10:16 cnh Exp $
2 cnh 1.1
3     #include "CPP_EEOPTIONS.h"
4    
5     C /==========================================================\
6     C | S/R TIMESTEP |
7     C | o Step model fields forward in time |
8     C \==========================================================/
9 adcroft 1.4 SUBROUTINE TIMESTEP( bi, bj, iMin, iMax, jMin, jMax,
10 adcroft 1.7 I K,
11 adcroft 1.4 I myThid )
12 cnh 1.1 implicit none
13     ! Common
14     #include "SIZE.h"
15     #include "DYNVARS.h"
16     #include "PARAMS.h"
17     #include "GRID.h"
18     C == Routine Arguments ==
19     INTEGER bi,bj,iMin,iMax,jMin,jMax
20 adcroft 1.4 INTEGER K
21 cnh 1.1 INTEGER myThid
22     C == Local variables ==
23 adcroft 1.4 INTEGER i,j
24 adcroft 1.7 _RL ab15,ab05
25 cnh 1.1
26     C Adams-Bashforth timestepping weights
27     ab15=1.5+abeps
28     ab05=-0.5-abeps
29    
30 adcroft 1.7 C Step forward zonal velocity (store in Gu)
31 cnh 1.1 DO j=jMin,jMax
32     DO i=iMin,iMax
33 adcroft 1.7 gUNm1(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)
34 cnh 1.1 & +deltaTmom*(ab15*gU(i,j,k,bi,bj)+ab05*gUNm1(i,j,k,bi,bj)
35 adcroft 1.7 & )*_maskW(i,j,k,bi,bj)
36 cnh 1.1 ENDDO
37     ENDDO
38 adcroft 1.7 C Step forward meridional velocity (store in Gv)
39 cnh 1.1 DO j=jMin,jMax
40     DO i=iMin,iMax
41 adcroft 1.7 gVNm1(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)
42 cnh 1.1 & +deltaTmom*(ab15*gV(i,j,k,bi,bj)+ab05*gVNm1(i,j,k,bi,bj)
43 adcroft 1.7 & )*_maskS(i,j,k,bi,bj)
44 cnh 1.1 ENDDO
45     ENDDO
46     C Step forward temperature
47     DO j=jMin,jMax
48     DO i=iMin,iMax
49 adcroft 1.7 gTNm1(i,j,k,bi,bj)=theta(i,j,k,bi,bj)
50 cnh 1.1 & +deltaTtracer*(ab15*gT(i,j,k,bi,bj)+ab05*gTNm1(i,j,k,bi,bj))
51     ENDDO
52     ENDDO
53    
54     RETURN
55     END

  ViewVC Help
Powered by ViewVC 1.1.22