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

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

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


Revision 1.18 - (show annotations) (download)
Wed Sep 26 18:09:13 2001 UTC (22 years, 9 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50g_post, checkpoint46b_post, checkpoint43a-release1mods, checkpoint44g_post, checkpoint48c_post, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, release1_p13, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, chkpt44d_post, checkpoint51, release1_p8, release1_p9, checkpoint50d_post, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, release1_b1, checkpoint48b_post, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint43, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, release1_chkpt44d_post, checkpoint47a_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, release1_p11, checkpoint47d_post, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint48h_post, ecco_c50_e29, ecco_c50_e28, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint46b_pre, chkpt44c_pre, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47j_post, ecco_c50_e33a, branch-exfmods-tag, branchpoint-genmake2, checkpoint46e_pre, checkpoint45b_post, release1-branch-end, release1_final_v1, checkpoint51b_post, release1_p12_pre, checkpoint46c_pre, checkpoint46, checkpoint44f_post, checkpoint47b_post, checkpoint44b_post, ecco_c51_e34, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50c_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, checkpoint51c_post, ecco_c44_e22, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, ecco_c44_e25, checkpoint51i_pre, checkpoint48a_post, checkpoint47f_post, checkpoint50e_post, 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, checkpoint51e_post, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint50, checkpoint51f_pre, chkpt44c_post, checkpoint47h_post, checkpoint44f_pre, checkpoint51g_post, checkpoint46d_post, checkpoint50b_post, release1-branch_branchpoint, checkpoint51a_post, checkpoint48g_post
Branch point for: c24_e25_ice, branch-exfmods-curt, release1_coupled, release1_final, release1-branch, branch-genmake2, release1, ecco-branch, release1_50yr, icebear
Changes since 1.17: +31 -25 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_common_factors.F,v 1.17 2001/07/30 20:20:43 heimbach Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CALC_COMMON_FACTORS
8 C !INTERFACE:
9 SUBROUTINE CALC_COMMON_FACTORS(
10 I bi,bj,iMin,iMax,jMin,jMax,k,
11 O xA,yA,uTrans,vTrans,rTrans,maskUp,
12 I myThid)
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE CALC_COMMON_FACTORS
16 C | o Calculate common data (such as volume flux) for use
17 C | by "Right hand side" subroutines.
18 C *==========================================================*
19 C | Here, we calculate terms or spatially varying factors
20 C | that are used at various points in the "RHS" subroutines.
21 C | This reduces the amount of total work, total memory
22 C | and therefore execution time and is generally a good
23 C | idea.
24 C *==========================================================*
25 C \ev
26
27 C !USES:
28 IMPLICIT NONE
29 C == GLobal variables ==
30 #include "SIZE.h"
31 #include "DYNVARS.h"
32 #include "EEPARAMS.h"
33 #include "PARAMS.h"
34 #include "GRID.h"
35 #ifdef ALLOW_NONHYDROSTATIC
36 #include "GW.h"
37 #endif
38
39 C !INPUT/OUTPUT PARAMETERS:
40 C == Routine arguments ==
41 C bi, bj, iMin, iMax, jMin, jMax :: Range of points for which calculation
42 C results will be set.
43 C xA :: Tracer cell face area normal to X
44 C yA :: Tracer cell face area normal to X
45 C uTrans :: Zonal volume transport through cell face
46 C vTrans :: Meridional volume transport through cell face
47 C rTrans :: R-direction volume transport through cell face
48 C maskUp :: land/water mask for Wvel points (above tracer level)
49 C myThid ::Instance number for this innvocation of CALC_COMMON_FACTORS
50 C
51 INTEGER bi,bj,iMin,iMax,jMin,jMax,k
52 _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54 _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
55 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
56 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
57 _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
58 C
59 INTEGER myThid
60
61 C !LOCAL VARIABLES:
62 C == Local variables ==
63 C I, J :: Loop counters
64 INTEGER i,j
65 CEOP
66
67 C-- Initialisation
68 DO j=1-OLy,sNy+OLy
69 DO i=1-OLx,sNx+OLx
70 xA(i,j) = 0. _d 0
71 yA(i,j) = 0. _d 0
72 uTrans(i,j) = 0. _d 0
73 vTrans(i,j) = 0. _d 0
74 rTrans(i,j) = 0. _d 0
75 ENDDO
76 ENDDO
77
78 C-- Calculate mask for tracer cells (0 => land, 1 => water)
79 IF (K .EQ. 1) THEN
80 DO j=jMin,jMax
81 DO i=iMin,iMax
82 maskUp(i,j) = 0.
83 ENDDO
84 ENDDO
85 ELSE
86 DO j=jMin,jMax
87 DO i=iMin,iMax
88 maskUp(i,j) = maskC(i,j,k-1,bi,bj)*maskC(i,j,k,bi,bj)
89 ENDDO
90 ENDDO
91 ENDIF
92
93 C-- Calculate tracer cell face open areas
94 DO j=jMin,jMax
95 DO i=iMin,iMax
96 xA(i,j) = _dyG(i,j,bi,bj)
97 & *drF(k)*_hFacW(i,j,k,bi,bj)
98 yA(i,j) = _dxG(i,j,bi,bj)
99 & *drF(k)*_hFacS(i,j,k,bi,bj)
100 ENDDO
101 ENDDO
102
103 C-- Calculate velocity field "volume transports" through
104 C-- tracer cell faces.
105 DO j=jMin,jMax
106 DO i=iMin,iMax
107 uTrans(i,j) = uVel(i,j,k,bi,bj)*xA(i,j)
108 vTrans(i,j) = vVel(i,j,k,bi,bj)*yA(i,j)
109 ENDDO
110 ENDDO
111
112 C-- Calculate vertical "volume transport" through
113 C-- tracer cell face *above* this level.
114 DO j=jMin,jMax
115 DO i=iMin,iMax
116 rTrans(i,j) = wVel(i,j,k,bi,bj)*rA(i,j,bi,bj)
117 ENDDO
118 ENDDO
119
120 RETURN
121 END

  ViewVC Help
Powered by ViewVC 1.1.22