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

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

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


Revision 1.7 - (show annotations) (download)
Wed Sep 26 18:09:16 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint46g_pre, release1_p13_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, release1_p13, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1_p11, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46h_pre, checkpoint46a_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, checkpoint45, checkpoint46h_post, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.6: +18 -15 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/integrate_for_w.F,v 1.6 2001/05/29 14:01:37 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: INTEGRATE_FOR_W
8 C !INTERFACE:
9 SUBROUTINE INTEGRATE_FOR_W(
10 I bi,bj,k,uFld,vFld,
11 O wFld,
12 I myThid)
13
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | SUBROUTINE CALC_COMMON_FACTORS
17 C | o Integrate for vertical velocity.
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
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine arguments ==
31 C uFld, vFld :: Zonal and meridional flow
32 C wFld :: Vertical flow
33 INTEGER bi,bj,k
34 _RL uFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
35 _RL vFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
36 _RL wFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
37 INTEGER myThid
38
39 C !LOCAL VARIABLES:
40 C == Local variables ==
41 C uTrans, vTrans :: Temps. for volume transports
42 INTEGER i,j
43 _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 CEOP
46
47 C-- Calculate velocity field "volume transports" through
48 C tracer cell faces.
49 DO j=1-Oly,sNy+Oly
50 DO i=1-Olx,sNx+Olx
51 uTrans(i,j) = uFld(i,j,k,bi,bj)*
52 & _dyG(i,j,bi,bj)
53 & *drF(k)*_hFacW(i,j,k,bi,bj)
54 vTrans(i,j) = vFld(i,j,k,bi,bj)*
55 & _dxG(i,j,bi,bj)
56 & *drF(k)*_hFacS(i,j,k,bi,bj)
57 ENDDO
58 ENDDO
59
60 C-- Calculate vertical "volume transport" through face k
61 C between tracer cell k-1 & k
62 IF (rigidLid) THEN
63 C- o Rigid-Lid case: zero at lower and upper boundaries
64 IF (k.eq.1) THEN
65 DO j=1-Oly,sNy+Oly-1
66 DO i=1-Olx,sNx+Olx-1
67 wFld(i,j,k,bi,bj) = 0.
68 ENDDO
69 ENDDO
70 ELSEIF (k.eq.Nr) THEN
71 DO j=1-Oly,sNy+Oly-1
72 DO i=1-Olx,sNx+Olx-1
73 wFld(i,j,k,bi,bj) =
74 & -( uTrans(i+1,j)-uTrans(i,j)
75 & +vTrans(i,j+1)-vTrans(i,j)
76 & )*recip_rA(i,j,bi,bj)
77 & *maskC(i,j,k,bi,bj)*maskC(i,j,k-1,bi,bj)
78 ENDDO
79 ENDDO
80 ELSE
81 DO j=1-Oly,sNy+Oly-1
82 DO i=1-Olx,sNx+Olx-1
83 wFld(i,j,k,bi,bj) =
84 & ( wFld(i,j,k+1,bi,bj)
85 & -( uTrans(i+1,j)-uTrans(i,j)
86 & +vTrans(i,j+1)-vTrans(i,j)
87 & )*recip_rA(i,j,bi,bj)
88 & )*maskC(i,j,k,bi,bj)*maskC(i,j,k-1,bi,bj)
89 ENDDO
90 ENDDO
91 ENDIF
92 ELSE
93 C- o Linear Free Surface case:
94 C non zero at surface ; zero under-ground and at r_lower boundary
95 IF (k.eq.Nr) THEN
96 DO j=1-Oly,sNy+Oly-1
97 DO i=1-Olx,sNx+Olx-1
98 wFld(i,j,k,bi,bj) =
99 & -( uTrans(i+1,j)-uTrans(i,j)
100 & +vTrans(i,j+1)-vTrans(i,j)
101 & )*recip_rA(i,j,bi,bj)
102 & *maskC(i,j,k,bi,bj)
103 ENDDO
104 ENDDO
105 ELSE
106 DO j=1-Oly,sNy+Oly-1
107 DO i=1-Olx,sNx+Olx-1
108 wFld(i,j,k,bi,bj) =
109 & ( wFld(i,j,k+1,bi,bj)
110 & -( uTrans(i+1,j)-uTrans(i,j)
111 & +vTrans(i,j+1)-vTrans(i,j)
112 & )*recip_rA(i,j,bi,bj)
113 & )*maskC(i,j,k,bi,bj)
114 ENDDO
115 ENDDO
116 ENDIF
117 C- endif - rigid-lid / linear Free-Surf.
118 ENDIF
119
120 RETURN
121 END

  ViewVC Help
Powered by ViewVC 1.1.22