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

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

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


Revision 1.10 - (show annotations) (download)
Sun Nov 13 01:44:14 2011 UTC (12 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: 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, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63f, checkpoint63g, checkpoint64, checkpoint65, checkpoint65r, checkpoint65p, checkpoint65q, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.9: +3 -52 lines
- move bi,bj loops inside INTEGR_CONTINUITY ;
- call INTEGR_CONTINUITY directly from forward_step.F
  (previously called from momentum_correction_step.F)
- call UPDATE_ETAH from integr_continuity.F and update initialise_varia.F,
  forward_step.F and pkg/ecco/the_main_loop.F

1 C $Header: /u/gcmpack/MITgcm/model/src/momentum_correction_step.F,v 1.9 2011/05/23 00:41:09 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: MOMENTUM_CORRECTION_STEP
9 C !INTERFACE:
10 SUBROUTINE MOMENTUM_CORRECTION_STEP( myTime, myIter, myThid )
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE MOMENTUM_CORRECTION_STEP
14 C *==========================================================*
15 C |1rst Part : Update U,V.
16 C |
17 C | The arrays used for time stepping are cycled.
18 C | Momentum:
19 C | V(n) = Gv(n) - dt * grad Eta
20 C |
21 C |part1: update U,V
22 C | U*,V* (contained in gU,gV) have the surface
23 C | pressure gradient term added and the result stored
24 C | in U,V (contained in uVel, vVel)
25 C |
26 C |part2: Adjustments
27 C | o Filter U,V (Shapiro Filter, Zonal_Filter)
28 C *==========================================================*
29 C \ev
30
31 C !USES:
32 IMPLICIT NONE
33 C == Global variables ===
34 #include "SIZE.h"
35 #include "EEPARAMS.h"
36 #include "PARAMS.h"
37 #include "DYNVARS.h"
38
39 #ifdef ALLOW_SHAP_FILT
40 #include "SHAP_FILT.h"
41 #endif
42 #ifdef ALLOW_ZONAL_FILT
43 #include "ZONAL_FILT.h"
44 #endif
45
46 C !INPUT/OUTPUT PARAMETERS:
47 C == Routine arguments ==
48 C myTime :: Current time in simulation
49 C myIter :: Current iteration number in simulation
50 C myThid :: my Thread Id. number
51 _RL myTime
52 INTEGER myIter
53 INTEGER myThid
54
55 C !LOCAL VARIABLES:
56 C == Local variables
57 _RL phiSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
58 _RL phiSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
59 INTEGER iMin,iMax
60 INTEGER jMin,jMax
61 INTEGER bi,bj
62 INTEGER k,i,j
63 CEOP
64
65 DO bj=myByLo(myThid),myByHi(myThid)
66 DO bi=myBxLo(myThid),myBxHi(myThid)
67
68 C-- Set up work arrays that need valid initial values
69 DO j=1-OLy,sNy+OLy
70 DO i=1-OLx,sNx+OLx
71 phiSurfX(i,j)=0.
72 phiSurfY(i,j)=0.
73 ENDDO
74 ENDDO
75
76 C Loop range: Gradients of Eta are evaluated so valid
77 C range is all but first row and column in overlaps.
78 iMin = 1-OLx+1
79 iMax = sNx+OLx
80 jMin = 1-OLy+1
81 jMax = sNy+OLy
82
83 C- Calculate gradient of surface Potentiel
84 CALL CALC_GRAD_PHI_SURF(
85 I bi,bj,iMin,iMax,jMin,jMax,
86 I etaN,
87 O phiSurfX,phiSurfY,
88 I myThid )
89
90 IF (momStepping) THEN
91 C-- Loop over all layers, top to bottom
92 DO k=1,Nr
93 C- Update velocity fields: V(n) = V** - dt * grad Eta
94 CALL CORRECTION_STEP(
95 I bi,bj,iMin,iMax,jMin,jMax,k,
96 I phiSurfX,phiSurfY,myTime,myThid )
97 ENDDO
98 ENDIF
99
100 #ifdef ALLOW_OBCS
101 IF (useOBCS) THEN
102 CALL OBCS_APPLY_UV( bi, bj, 0, uVel, vVel, myThid )
103 ENDIF
104 #endif /* ALLOW_OBCS */
105
106 C-- End of 1rst bi,bj loop
107 ENDDO
108 ENDDO
109
110 C--- 2nd Part : Adjustment.
111
112 C-- Filter (and exchange)
113 #ifdef ALLOW_SHAP_FILT
114 IF (useSHAP_FILT) THEN
115 IF ( .NOT.shap_filt_uvStar ) THEN
116 CALL TIMER_START('SHAP_FILT_UV [MOM_CORR_STEP]',myThid)
117 CALL SHAP_FILT_APPLY_UV( uVel, vVel, myTime, myIter, myThid )
118 CALL TIMER_STOP ('SHAP_FILT_UV [MOM_CORR_STEP]',myThid)
119 ENDIF
120 ENDIF
121 #endif
122 #ifdef ALLOW_ZONAL_FILT
123 IF (useZONAL_FILT) THEN
124 IF ( .NOT.zonal_filt_uvStar ) THEN
125 CALL TIMER_START('ZONAL_FILT_UV [MOM_CORR_STEP]',myThid)
126 CALL ZONAL_FILT_APPLY_UV( uVel, vVel, myThid )
127 CALL TIMER_STOP ('ZONAL_FILT_UV [MOM_CORR_STEP]',myThid)
128 ENDIF
129 ENDIF
130 #endif
131
132 RETURN
133 END

  ViewVC Help
Powered by ViewVC 1.1.22