/[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.22 - (show annotations) (download)
Tue Dec 5 05:25:08 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint59, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58t_post, checkpoint63g, checkpoint64, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58w_post, mitgcm_mapl_00, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint62b, checkpoint58v_post, checkpoint64q, checkpoint64p, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint62d, checkpoint61f, checkpoint58x_post, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61z, checkpoint61e, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61x, checkpoint61y
Changes since 1.21: +8 -5 lines
start to implement deep-atmosphere and/or anelastic formulation

1 C $Header: /u/gcmpack/MITgcm/model/src/calc_common_factors.F,v 1.21 2006/06/18 23:20:35 jmc 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 uVel, vVel,
11 O uFld, vFld, uTrans, vTrans, xA, yA,
12 I k,bi,bj, 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 "EEPARAMS.h"
32 #include "PARAMS.h"
33 #include "GRID.h"
34
35 C !INPUT/OUTPUT PARAMETERS:
36 C == Routine arguments ==
37 C uVel :: velocity, zonal component
38 C vVel :: velocity, meridional component
39 C uFld :: 2-D local copy of horizontal velocity, zonal component
40 C vFld :: 2-D local copy of horizontal velocity, merid. component
41 C uTrans :: Zonal volume transport through cell face
42 C vTrans :: Meridional volume transport through cell face
43 C xA :: Tracer cell face area normal to X
44 C yA :: Tracer cell face area normal to X
45 C k,bi,bj :: vertical & tile indices for this calculation
46 C myThid :: my Thread Id. number
47
48 _RL uVel (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
49 _RL vVel (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
50 _RL uFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
51 _RL vFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54 _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
55 _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
56 INTEGER k,bi,bj
57 INTEGER myThid
58
59 C !LOCAL VARIABLES:
60 C == Local variables ==
61 C i, j :: Loop counters
62 INTEGER i,j
63 CEOP
64
65 C-- Initialisation
66 c DO j=1-OLy,sNy+OLy
67 c DO i=1-OLx,sNx+OLx
68 c xA(i,j) = 0. _d 0
69 c yA(i,j) = 0. _d 0
70 c uFld(i,j) = 0. _d 0
71 c vFld(i,j) = 0. _d 0
72 c uTrans(i,j) = 0. _d 0
73 c vTrans(i,j) = 0. _d 0
74 c ENDDO
75 c ENDDO
76
77 C-- Calculate tracer cell face open areas
78 DO j=1-OLy,sNy+OLy
79 DO i=1-OLx,sNx+OLx
80 xA(i,j) = _dyG(i,j,bi,bj)*deepFacC(k)
81 & *drF(k)*_hFacW(i,j,k,bi,bj)
82 yA(i,j) = _dxG(i,j,bi,bj)*deepFacC(k)
83 & *drF(k)*_hFacS(i,j,k,bi,bj)
84 ENDDO
85 ENDDO
86
87 C-- Make a local copy of velocity component :
88 DO j=1-OLy,sNy+OLy
89 DO i=1-OLx,sNx+OLx
90 uFld(i,j) = uVel(i,j,k,bi,bj)
91 vFld(i,j) = vVel(i,j,k,bi,bj)
92 ENDDO
93 ENDDO
94
95 C-- Calculate "volume transports" through tracer cell faces.
96 C anelastic: scaled by rhoFacC (~ mass transport)
97 DO j=1-OLy,sNy+OLy
98 DO i=1-OLx,sNx+OLx
99 uTrans(i,j) = uFld(i,j)*xA(i,j)*rhoFacC(k)
100 vTrans(i,j) = vFld(i,j)*yA(i,j)*rhoFacC(k)
101 ENDDO
102 ENDDO
103
104 RETURN
105 END

  ViewVC Help
Powered by ViewVC 1.1.22