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

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

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


Revision 1.13 - (show annotations) (download)
Thu Dec 8 22:35:43 2011 UTC (12 years, 5 months 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, checkpoint63g, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, 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, HEAD
Changes since 1.12: +13 -81 lines
take sigma-coords related code out of update_etah.F into new S/R UPDATE_ETAWS

1 C $Header: /u/gcmpack/MITgcm/model/src/update_etah.F,v 1.12 2011/05/20 16:29:49 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: UPDATE_ETAH
9 C !INTERFACE:
10 SUBROUTINE UPDATE_ETAH( myTime, myIter, myThid )
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE UPDATE_ETAH
14 C | o Update etaH after mom-correction-step/integr_continuity
15 C | (required with NLFS to derive surface layer thickness)
16 C *==========================================================*
17 C \ev
18
19 C !USES:
20 IMPLICIT NONE
21 C == Global variables
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "DYNVARS.h"
26 #include "GRID.h"
27 #include "SURFACE.h"
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine arguments ==
31 C myTime :: Current time in simulation
32 C myIter :: Current iteration number
33 C myThid :: my Thread Id number
34 _RL myTime
35 INTEGER myIter
36 INTEGER myThid
37
38 C !LOCAL VARIABLES:
39 #ifdef EXACT_CONSERV
40 C Local variables in common block
41
42 C Local variables
43 C i,j,bi,bj :: Loop counters
44 INTEGER i,j,bi,bj
45 CEOP
46
47 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
48
49 DO bj=myByLo(myThid),myByHi(myThid)
50 DO bi=myBxLo(myThid),myBxHi(myThid)
51
52 C-- before updating etaH, save current etaH field in etaHnm1
53 DO j=1-Oly,sNy+Oly
54 DO i=1-Olx,sNx+Olx
55 etaHnm1(i,j,bi,bj) = etaH(i,j,bi,bj)
56 ENDDO
57 ENDDO
58
59 C-- Update etaH at the end of the time step :
60 C Incorporate the Explicit part of -Divergence(Barotropic_Flow)
61
62 IF (implicDiv2Dflow.EQ. 1. _d 0) THEN
63 DO j=1-Oly,sNy+Oly
64 DO i=1-Olx,sNx+Olx
65 etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
66 ENDDO
67 ENDDO
68
69 ELSE
70 DO j=1,sNy
71 DO i=1,sNx
72 etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
73 & + (1. - implicDiv2Dflow)*dEtaHdt(i,j,bi,bj)
74 & *deltaTfreesurf
75 ENDDO
76 ENDDO
77 ENDIF
78
79 #ifdef ALLOW_OBCS
80 C-- Apply OBC to etaH (NonLin-FreeSurf): needed since viscous terms
81 C depend on hFacZ which is not only function of boundary hFac values.
82 IF ( useOBCS.AND.nonlinFreeSurf.GT.0 )
83 & CALL OBCS_APPLY_ETA( bi, bj, etaH, myThid )
84 #endif /* ALLOW_OBCS */
85
86 C- end bi,bj loop.
87 ENDDO
88 ENDDO
89
90 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
91
92 IF ( implicDiv2Dflow .NE. 1. _d 0 .OR.
93 & ( useOBCS.AND.nonlinFreeSurf.GT.0 ) )
94 & CALL EXCH_XY_RL( etaH, myThid )
95
96 #endif /* EXACT_CONSERV */
97
98 RETURN
99 END

  ViewVC Help
Powered by ViewVC 1.1.22