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

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

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


Revision 1.9 - (show annotations) (download)
Thu Jul 18 23:17:37 2002 UTC (21 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47j_post, checkpoint48d_pre, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint47f_post, checkpoint46j_post, checkpoint47c_post, checkpoint50e_post, checkpoint50c_post, checkpoint46i_post, checkpoint47d_post, checkpoint47a_post, checkpoint46f_post, checkpoint47h_post, checkpoint46d_pre, checkpoint48e_post, checkpoint46e_post, checkpoint48h_post, checkpoint48d_post, checkpoint50c_pre, checkpoint46c_post, branchpoint-genmake2, checkpoint46h_pre, checkpoint46k_post, checkpoint46e_pre, checkpoint50d_pre, checkpoint48f_post, checkpoint47i_post, checkpoint46j_pre, checkpoint46b_pre, checkpoint48c_post, checkpoint46l_post, checkpoint51e_post, checkpoint51b_post, checkpoint51c_post, checkpoint47d_pre, checkpoint47, checkpoint48, checkpoint49, checkpoint47b_post, checkpoint48i_post, checkpoint46l_pre, checkpoint51f_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint46g_pre, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46m_post, checkpoint48a_post, checkpoint51h_pre, checkpoint46a_pre, checkpoint50g_post, checkpoint50b_pre, checkpoint51g_post, checkpoint46b_post, checkpoint51f_post, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, checkpoint50f_post, checkpoint50a_post, checkpoint46c_pre, checkpoint50f_pre, checkpoint51d_post, checkpoint48c_pre, checkpoint50h_post, checkpoint51a_post, checkpoint46h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint48g_post, checkpoint51i_pre
Branch point for: branch-genmake2, branch-exfmods-curt
Changes since 1.8: +3 -1 lines
do not include "TR1.h" when ALLOW_PASSIVE_TRACER is undefined;
 ==> reduce size of executable by 3 3D arrays.

1 C $Header: /u/gcmpack/MITgcm/model/src/calc_gtr1.F,v 1.8 2002/06/20 23:45:30 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CALC_GTR1
8 C !INTERFACE:
9 SUBROUTINE CALC_GTR1(
10 I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
11 I xA,yA,uTrans,vTrans,rTrans,maskUp,
12 I KappaRT,
13 U fVerT,
14 I myTime,myIter,myThid )
15 C !DESCRIPTION: \bv
16 C *==========================================================*
17 C | SUBROUTINE CALC_GTR1
18 C | o Calculate the passive tracer tendency terms.
19 C *==========================================================*
20
21 C !USES:
22 IMPLICIT NONE
23 C == GLobal variables ==
24 #include "SIZE.h"
25 #include "DYNVARS.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "GAD.h"
29 #ifdef ALLOW_PASSIVE_TRACER
30 #include "TR1.h"
31 #endif
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C == Routine arguments ==
35 C fVerT :: Flux of temperature (T) in the vertical
36 C direction at the upper(U) and lower(D) faces of a cell.
37 C maskUp :: Land mask used to denote base of the domain.
38 C xA :: Tracer cell face area normal to X
39 C yA :: Tracer cell face area normal to X
40 C uTrans :: Zonal volume transport through cell face
41 C vTrans :: Meridional volume transport through cell face
42 C rTrans :: Vertical volume transport through cell face
43 C bi, bj, iMin, iMax, jMin, jMax :: Range of points for which calculation
44 C results will be set.
45 C myThid - Instance number for this innvocation of CALC_GT
46 _RL fVerT (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
47 _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
48 _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49 _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50 _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
51 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RL KappaRT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
54 INTEGER k,kUp,kDown,kM1
55 INTEGER bi,bj,iMin,iMax,jMin,jMax
56 _RL myTime
57 INTEGER myIter
58 INTEGER myThid
59
60 CEOP
61
62 #ifdef ALLOW_PASSIVE_TRACER
63 C === Local variables ===
64 LOGICAL calcAdvection
65
66 #ifdef ALLOW_AUTODIFF_TAMC
67 C-- only the kUp part of fverT is set in this subroutine
68 C-- the kDown is still required
69 fVerT(1,1,kDown) = fVerT(1,1,kDown)
70 #endif
71
72 calcAdvection = .NOT.tr1_MultiDimAdvec
73 CALL GAD_CALC_RHS(
74 I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
75 I xA,yA,uTrans,vTrans,rTrans,maskUp,
76 I diffKhT, diffK4T, KappaRT, tr1,
77 I GAD_TR1, tracerAdvScheme, calcAdvection,
78 U fVerT, gTr1,
79 I myThid )
80
81 #ifdef INCLUDE_TR_FORCING_CODE
82 C-- External forcing term(s) inside Adams-Bashforth:
83 IF ( forcing_In_AB )
84 & CALL EXTERNAL_FORCING_TR(
85 I iMin,iMax,jMin,jMax,bi,bj,k,
86 I myTime,myThid)
87 #endif /* INCLUDE_TR_FORCING_CODE */
88
89 IF ( tr1_AdamsBashforth ) THEN
90 CALL ADAMS_BASHFORTH2(
91 I bi, bj, K,
92 U gTr1, gTr1nm1,
93 I myIter, myThid )
94 ENDIF
95
96 #ifdef INCLUDE_TR_FORCING_CODE
97 C-- External forcing term(s) outside Adams-Bashforth:
98 IF ( .NOT.forcing_In_AB )
99 & CALL EXTERNAL_FORCING_TR(
100 I iMin,iMax,jMin,jMax,bi,bj,k,
101 I myTime,myThid)
102 #endif /* INCLUDE_TR_FORCING_CODE */
103
104 #ifdef NONLIN_FRSURF
105 IF (nonlinFreeSurf.GT.0) THEN
106 CALL FREESURF_RESCALE_G(
107 I bi, bj, K,
108 U gTr1,
109 I myThid )
110 IF ( tr1_AdamsBashforth )
111 & CALL FREESURF_RESCALE_G(
112 I bi, bj, K,
113 U gTr1nm1,
114 I myThid )
115 ENDIF
116 #endif /* NONLIN_FRSURF */
117
118 #endif /* ALLOW_PASSIVE_TRACER */
119
120 RETURN
121 END

  ViewVC Help
Powered by ViewVC 1.1.22