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

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

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


Revision 1.2 - (show annotations) (download)
Thu Dec 22 00:11:11 2011 UTC (12 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64a, checkpoint63r, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint64n, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint64b, checkpoint63h, checkpoint63m, checkpoint64e, checkpoint63i, checkpoint63q, checkpoint64d, checkpoint64c, checkpoint64g, checkpoint64f, checkpoint63j, checkpoint63l, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint63n, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint63k, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64i, checkpoint63o, checkpoint63p, checkpoint64h, checkpoint63s, checkpoint64k, checkpoint64, checkpoint65, checkpoint64j, checkpoint64m, checkpoint64l, HEAD
Changes since 1.1: +7 -7 lines
remove/avoid un-used variables

1 C $Header: /u/gcmpack/MITgcm/model/src/update_etaws.F,v 1.1 2011/12/08 22:35:43 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: UPDATE_ETAWS
8 C !INTERFACE:
9 SUBROUTINE UPDATE_ETAWS( myTime, myIter, myThid )
10 C !DESCRIPTION: \bv
11 C *==========================================================*
12 C | SUBROUTINE UPDATE_ETAWS
13 C | o For hybrid sigma-coordinate, derive SSH value
14 C | (etaHw & etaHs) and SSH tendency (dEtaWdt & dEtaSdt)
15 C | at grid-cell Western and Southern edges.
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 #ifdef NONLIN_FRSURF
43 # ifndef DISABLE_SIGMA_CODE
44 C Local variables
45 C i,j,bi,bj :: Loop counters
46 INTEGER i,j,bi,bj
47 CEOP
48
49 IF ( nonlinFreeSurf.GT.0 .AND. selectSigmaCoord.NE.0 ) THEN
50
51 DO bj=myByLo(myThid),myByHi(myThid)
52 DO bi=myBxLo(myThid),myBxHi(myThid)
53 C- 1rst bi,bj loop :
54
55 C-- copy etaHX -> dEtaXdt
56 DO j=1-OLy,sNy+OLy
57 DO i=1-OLx,sNx+OLx
58 dEtaWdt(i,j,bi,bj) = etaHw(i,j,bi,bj)
59 dEtaSdt(i,j,bi,bj) = etaHs(i,j,bi,bj)
60 ENDDO
61 ENDDO
62
63 DO j=1,sNy+1
64 DO i=1,sNx+1
65 etaHw(i,j,bi,bj) = ( etaH (i-1,j,bi,bj)
66 & + etaH ( i ,j,bi,bj) )*0.5 _d 0
67 etaHs(i,j,bi,bj) = ( etaH (i,j-1,bi,bj)
68 & + etaH (i, j ,bi,bj) )*0.5 _d 0
69 c etaHw(i,j,bi,bj) = 0.5 _d 0
70 c & *( etaH (i-1,j,bi,bj)*rA(i-1,j,bi,bj)
71 c & + etaH ( i ,j,bi,bj)*rA( i ,j,bi,bj)
72 c & )*recip_rAw(i,j,bi,bj)
73 c etaHs(i,j,bi,bj) = 0.5 _d 0
74 c & *( etaH (i,j-1,bi,bj)*rA(i,j-1,bi,bj)
75 c & + etaH (i, j ,bi,bj)*rA(i, j ,bi,bj)
76 c & )*recip_rAs(i,j,bi,bj)
77 ENDDO
78 ENDDO
79
80 C- end 1rst bi,bj loop.
81 ENDDO
82 ENDDO
83
84 CALL EXCH_UV_XY_RL( etaHw, etaHs, .FALSE., myThid )
85
86 DO bj=myByLo(myThid),myByHi(myThid)
87 DO bi=myBxLo(myThid),myBxHi(myThid)
88 C- 2nd bi,bj loop :
89
90 DO j=1-OLy,sNy+OLy
91 DO i=1-OLx,sNx+OLx
92 dEtaWdt(i,j,bi,bj) = ( etaHw(i,j,bi,bj)
93 & - dEtaWdt(i,j,bi,bj) )/deltaTfreesurf
94 dEtaSdt(i,j,bi,bj) = ( etaHs(i,j,bi,bj)
95 & - dEtaSdt(i,j,bi,bj) )/deltaTfreesurf
96 ENDDO
97 ENDDO
98
99 C- end 2nd bi,bj loop.
100 ENDDO
101 ENDDO
102
103 ENDIF
104 # endif /* DISABLE_SIGMA_CODE */
105 #endif /* NONLIN_FRSURF */
106
107 #endif /* EXACT_CONSERV */
108
109 RETURN
110 END

  ViewVC Help
Powered by ViewVC 1.1.22