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

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

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


Revision 1.12 - (hide annotations) (download)
Mon Sep 11 23:00:13 2000 UTC (23 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: branch-atmos-merge-start, checkpoint33, checkpoint32, checkpoint31, checkpoint34
Branch point for: branch-atmos-merge
Changes since 1.11: +3 -2 lines
Cosmetic.

1 heimbach 1.12 C $Header: /u/gcmpack/models/MITgcmUV/model/src/correction_step.F,v 1.11 1999/03/22 15:54:03 adcroft Exp $
2 adcroft 1.1
3 cnh 1.10 #include "CPP_OPTIONS.h"
4 adcroft 1.1
5     C /==========================================================\
6     C | S/R CORRECTION_STEP |
7     C | o Corrects the horizontal flow fields with the surface |
8 cnh 1.7 C | slope. |
9 adcroft 1.1 C \==========================================================/
10     SUBROUTINE CORRECTION_STEP( bi, bj, iMin, iMax, jMin, jMax,
11 cnh 1.8 I K, etaSurfX, etaSurfY,
12 adcroft 1.6 I myCurrentTime, myThid )
13 cnh 1.7 IMPLICIT NONE
14 heimbach 1.12
15     C == Global variables ==
16 adcroft 1.1 #include "SIZE.h"
17     #include "DYNVARS.h"
18 cnh 1.3 #include "EEPARAMS.h"
19 adcroft 1.1 #include "PARAMS.h"
20     #include "GRID.h"
21     #include "CG2D.h"
22 adcroft 1.11 #ifdef ALLOW_NONHYDROSTATIC
23     #include "CG3D.h"
24     #endif
25 adcroft 1.1 C == Routine Arguments ==
26 cnh 1.9 C etaSurfX, etaSurfY - Surface slope
27 cnh 1.7 C bi,bj,iMin,iMax,jMin,jMax, K - Loop counters
28 cnh 1.9 C myThid - Instance number for
29     C this call to S/R CORRECTION_STEP
30     C myCurrentTime - Current simulation time for this instance.
31 cnh 1.8 _RL etaSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
32     _RL etaSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
33 adcroft 1.1 INTEGER bi,bj,iMin,iMax,jMin,jMax
34     INTEGER K
35     INTEGER myThid
36 adcroft 1.6 _RL myCurrentTime
37 cnh 1.7
38 adcroft 1.1 C == Local variables ==
39     INTEGER i,j
40 adcroft 1.11 _RL hxFac,hyFac
41     _RL hx3dFac,hy3dFac
42 adcroft 1.1
43     C On/off scaling paramters
44     hxFac = pfFacMom
45     hyFac = pfFacMom
46 adcroft 1.11 IF ( nonHydrostatic ) THEN
47     hx3dFac = pfFacMom
48     hy3dFac = pfFacMom
49     ELSE
50     hx3dFac = 0.
51     hy3dFac = 0.
52     ENDIF
53 adcroft 1.1
54     C Step forward zonal velocity
55     DO j=jMin,jMax
56     DO i=iMin,iMax
57     uVel(i,j,k,bi,bj)=( gUNm1(i,j,k,bi,bj)
58 cnh 1.9 & -deltaTmom*hxFac*gBaro*etaSurfX(i,j)
59 adcroft 1.11 #ifdef ALLOW_NONHYDROSTATIC
60     & -deltaTmom*hx3dFac*gravity*_recip_dxC(i,j,bi,bj)*
61     & (cg3d_x(i,j,k,bi,bj)-cg3d_x(i-1,j,k,bi,bj))
62     #endif
63 adcroft 1.1 & )*_maskW(i,j,k,bi,bj)
64     gUNm1(i,j,k,bi,bj)=gU(i,j,k,bi,bj)
65     ENDDO
66     ENDDO
67    
68     C Step forward meridional velocity
69     DO j=jMin,jMax
70     DO i=iMin,iMax
71     vVel(i,j,k,bi,bj)=( gVNm1(i,j,k,bi,bj)
72 cnh 1.9 & -deltaTmom*hyFac*gBaro*etaSurfY(i,j)
73 adcroft 1.11 #ifdef ALLOW_NONHYDROSTATIC
74     & -deltaTmom*hy3dFac*gravity*_recip_dyC(i,j,bi,bj)*
75     & (cg3d_x(i,j,k,bi,bj)-cg3d_x(i,j-1,k,bi,bj))
76     #endif
77 adcroft 1.1 & )*_maskS(i,j,k,bi,bj)
78     gVNm1(i,j,k,bi,bj)=gV(i,j,k,bi,bj)
79 adcroft 1.4 ENDDO
80     ENDDO
81    
82     C Rotate theta/gT/gTnm1
83 cnh 1.10 IF ( tempStepping ) THEN
84     DO j=jMin,jMax
85     DO i=iMin,iMax
86     theta(i,j,k,bi,bj)=gTNm1(i,j,k,bi,bj)
87     gTNm1(i,j,k,bi,bj)=gT(i,j,k,bi,bj)
88     ENDDO
89 adcroft 1.4 ENDDO
90 cnh 1.10 ENDIF
91 adcroft 1.4
92     C Rotate salt/gS/gSnm1
93 cnh 1.10 IF ( saltStepping ) THEN
94     DO j=jMin,jMax
95     DO i=iMin,iMax
96     salt(i,j,k,bi,bj)=gSNm1(i,j,k,bi,bj)
97     gSNm1(i,j,k,bi,bj)=gS(i,j,k,bi,bj)
98     ENDDO
99 adcroft 1.1 ENDDO
100 cnh 1.10 ENDIF
101 adcroft 1.1
102     RETURN
103     END

  ViewVC Help
Powered by ViewVC 1.1.22