/[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.19 - (show annotations) (download)
Thu Oct 9 04:19:18 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52d_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint52e_pre, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51r_post, checkpoint51i_post, checkpoint52d_post, checkpoint52a_pre, branch-netcdf, checkpoint51o_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.18: +1 -4 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 C $Header: /u/u3/gcmpack/MITgcm/model/src/calc_common_factors.F,v 1.18.20.1 2003/10/02 18:10:45 edhill 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
36 C !INPUT/OUTPUT PARAMETERS:
37 C == Routine arguments ==
38 C bi, bj, iMin, iMax, jMin, jMax :: Range of points for which calculation
39 C results will be set.
40 C xA :: Tracer cell face area normal to X
41 C yA :: Tracer cell face area normal to X
42 C uTrans :: Zonal volume transport through cell face
43 C vTrans :: Meridional volume transport through cell face
44 C rTrans :: R-direction volume transport through cell face
45 C maskUp :: land/water mask for Wvel points (above tracer level)
46 C myThid ::Instance number for this innvocation of CALC_COMMON_FACTORS
47 C
48 INTEGER bi,bj,iMin,iMax,jMin,jMax,k
49 _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50 _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
51 _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54 _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
55 C
56 INTEGER myThid
57
58 C !LOCAL VARIABLES:
59 C == Local variables ==
60 C I, J :: Loop counters
61 INTEGER i,j
62 CEOP
63
64 C-- Initialisation
65 DO j=1-OLy,sNy+OLy
66 DO i=1-OLx,sNx+OLx
67 xA(i,j) = 0. _d 0
68 yA(i,j) = 0. _d 0
69 uTrans(i,j) = 0. _d 0
70 vTrans(i,j) = 0. _d 0
71 rTrans(i,j) = 0. _d 0
72 ENDDO
73 ENDDO
74
75 C-- Calculate mask for tracer cells (0 => land, 1 => water)
76 IF (K .EQ. 1) THEN
77 DO j=jMin,jMax
78 DO i=iMin,iMax
79 maskUp(i,j) = 0.
80 ENDDO
81 ENDDO
82 ELSE
83 DO j=jMin,jMax
84 DO i=iMin,iMax
85 maskUp(i,j) = maskC(i,j,k-1,bi,bj)*maskC(i,j,k,bi,bj)
86 ENDDO
87 ENDDO
88 ENDIF
89
90 C-- Calculate tracer cell face open areas
91 DO j=jMin,jMax
92 DO i=iMin,iMax
93 xA(i,j) = _dyG(i,j,bi,bj)
94 & *drF(k)*_hFacW(i,j,k,bi,bj)
95 yA(i,j) = _dxG(i,j,bi,bj)
96 & *drF(k)*_hFacS(i,j,k,bi,bj)
97 ENDDO
98 ENDDO
99
100 C-- Calculate velocity field "volume transports" through
101 C-- tracer cell faces.
102 DO j=jMin,jMax
103 DO i=iMin,iMax
104 uTrans(i,j) = uVel(i,j,k,bi,bj)*xA(i,j)
105 vTrans(i,j) = vVel(i,j,k,bi,bj)*yA(i,j)
106 ENDDO
107 ENDDO
108
109 C-- Calculate vertical "volume transport" through
110 C-- tracer cell face *above* this level.
111 DO j=jMin,jMax
112 DO i=iMin,iMax
113 rTrans(i,j) = wVel(i,j,k,bi,bj)*rA(i,j,bi,bj)
114 ENDDO
115 ENDDO
116
117 RETURN
118 END

  ViewVC Help
Powered by ViewVC 1.1.22