/[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.26 - (show annotations) (download)
Fri May 20 16:35:57 2011 UTC (13 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62z, checkpoint62y, checkpoint63g, checkpoint64, checkpoint65, checkpoint63, checkpoint66a, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.25: +8 -1 lines
zero out velocity outside OB interior region: This has no effect on the
 solution but just to prevent unrealistic velocity ouside OB.

1 C $Header: /u/gcmpack/MITgcm/model/src/correction_step.F,v 1.25 2009/11/29 03:12:32 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: CORRECTION_STEP
9 C !INTERFACE:
10 SUBROUTINE CORRECTION_STEP( bi, bj, iMin, iMax, jMin, jMax,
11 I k, phiSurfX, phiSurfY,
12 I myTime, myThid )
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | S/R CORRECTION_STEP
16 C | o Corrects the horizontal flow fields with the surface
17 C | pressure (and Non-Hydrostatic pressure).
18 C *==========================================================*
19 C \ev
20
21 C !USES:
22 IMPLICIT NONE
23 C == Global variables ==
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28 #include "DYNVARS.h"
29 #ifdef ALLOW_NONHYDROSTATIC
30 #include "NH_VARS.h"
31 #endif
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C == Routine Arguments ==
35 C bi, bj :: Tile indices
36 C iMin,iMax,jMin,jMax :: Loop counters range
37 C k :: Level index
38 C phiSurfX, phiSurfY :: Surface Potential gradient
39 C myTime :: Current time in simulation
40 C myThid :: my Thread Id number
41 _RL phiSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42 _RL phiSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43 INTEGER bi,bj
44 INTEGER iMin,iMax,jMin,jMax
45 INTEGER k
46 _RL myTime
47 INTEGER myThid
48
49 C !LOCAL VARIABLES:
50 C == Local variables ==
51 C i,j :: Loop counters
52 C psFac, nhFac :: Scaling parameters for supressing gradients
53 INTEGER i,j
54 _RL psFac, nhFac
55 CEOP
56
57 C On/off scaling parameters (including anelastic & deep-model factors)
58 psFac = pfFacMom*implicSurfPress
59 & *recip_deepFacC(k)*recip_rhoFacC(k)
60 IF ( use3Dsolver ) THEN
61 nhFac = pfFacMom*implicitNHPress
62 & *recip_deepFacC(k)*recip_rhoFacC(k)
63 ELSE
64 nhFac = 0.
65 ENDIF
66
67 C Step forward zonal velocity
68 DO j=jMin,jMax
69 DO i=iMin,iMax
70 uVel(i,j,k,bi,bj)=( gU(i,j,k,bi,bj)
71 & -deltaTmom*psFac*phiSurfX(i,j)
72 #ifdef ALLOW_NONHYDROSTATIC
73 & -deltaTmom*nhFac*_recip_dxC(i,j,bi,bj)
74 & *(phi_nh(i,j,k,bi,bj)-phi_nh(i-1,j,k,bi,bj))
75 #endif
76 & )*_maskW(i,j,k,bi,bj)
77 #ifdef ALLOW_OBCS
78 & *maskInW(i,j,bi,bj)
79 #endif
80 ENDDO
81 ENDDO
82
83 C Step forward meridional velocity
84 DO j=jMin,jMax
85 DO i=iMin,iMax
86 vVel(i,j,k,bi,bj)=( gV(i,j,k,bi,bj)
87 & -deltaTmom*psFac*phiSurfY(i,j)
88 #ifdef ALLOW_NONHYDROSTATIC
89 & -deltaTmom*nhFac*_recip_dyC(i,j,bi,bj)
90 & *(phi_nh(i,j,k,bi,bj)-phi_nh(i,j-1,k,bi,bj))
91 #endif
92 & )*_maskS(i,j,k,bi,bj)
93 #ifdef ALLOW_OBCS
94 & *maskInS(i,j,bi,bj)
95 #endif
96 ENDDO
97 ENDDO
98
99 RETURN
100 END

  ViewVC Help
Powered by ViewVC 1.1.22