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

Annotation of /MITgcm/model/src/calc_gt.F

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


Revision 1.36 - (hide annotations) (download)
Wed Sep 26 18:09:14 2001 UTC (22 years, 9 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, release1_p13_pre, checkpoint43a-release1mods, checkpoint44g_post, 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, release1-branch_tutorials, chkpt44a_post, checkpoint44h_pre, 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, checkpoint45b_post, release1-branch-end, release1_final_v1, release1_p12_pre, checkpoint44f_post, checkpoint44b_post, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, checkpoint45, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_coupled, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear
Changes since 1.35: +46 -40 lines
Bringing comments up to data and formatting for document extraction.

1 cnh 1.36 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_gt.F,v 1.35 2001/09/19 02:43:27 adcroft Exp $
2 adcroft 1.35 C $Name: $
3 cnh 1.1
4 cnh 1.19 #include "CPP_OPTIONS.h"
5 cnh 1.1
6 cnh 1.36 CBOP
7     C !ROUTINE: CALC_GT
8     C !INTERFACE:
9 cnh 1.1 SUBROUTINE CALC_GT(
10     I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
11 adcroft 1.32 I xA,yA,uTrans,vTrans,rTrans,maskUp,
12 adcroft 1.25 I KappaRT,
13 adcroft 1.28 U fVerT,
14 adcroft 1.35 I myTime,myIter,myThid )
15 cnh 1.36 C !DESCRIPTION: \bv
16     C *==========================================================*
17     C | SUBROUTINE CALC_GT
18     C | o Calculate the temperature tendency terms.
19     C *==========================================================*
20     C | A procedure called EXTERNAL_FORCING_T is called from
21     C | here. These procedures can be used to add per problem
22     C | heat flux source terms.
23     C | Note: Although it is slightly counter-intuitive the
24     C | EXTERNAL_FORCING routine is not the place to put
25     C | file I/O. Instead files that are required to
26     C | calculate the external source terms are generally
27     C | read during the model main loop. This makes the
28     C | logisitics of multi-processing simpler and also
29     C | makes the adjoint generation simpler. It also
30     C | allows for I/O to overlap computation where that
31     C | is supported by hardware.
32     C | Aside from the problem specific term the code here
33     C | forms the tendency terms due to advection and mixing
34     C | The baseline implementation here uses a centered
35     C | difference form for the advection term and a tensorial
36     C | divergence of a flux form for the diffusive term. The
37     C | diffusive term is formulated so that isopycnal mixing and
38     C | GM-style subgrid-scale terms can be incorporated b simply
39     C | setting the diffusion tensor terms appropriately.
40     C *==========================================================*
41     C \ev
42    
43     C !USES:
44 cnh 1.1 IMPLICIT NONE
45     C == GLobal variables ==
46     #include "SIZE.h"
47     #include "DYNVARS.h"
48     #include "EEPARAMS.h"
49     #include "PARAMS.h"
50 adcroft 1.34 #include "GAD.h"
51 cnh 1.1
52 cnh 1.36 C !INPUT/OUTPUT PARAMETERS:
53 cnh 1.1 C == Routine arguments ==
54 cnh 1.36 C fVerT :: Flux of temperature (T) in the vertical
55     C direction at the upper(U) and lower(D) faces of a cell.
56     C maskUp :: Land mask used to denote base of the domain.
57     C xA :: Tracer cell face area normal to X
58     C yA :: Tracer cell face area normal to X
59     C uTrans :: Zonal volume transport through cell face
60     C vTrans :: Meridional volume transport through cell face
61     C rTrans :: Vertical volume transport through cell face
62     C bi, bj, iMin, iMax, jMin, jMax :: Range of points for which calculation
63     C results will be set.
64     C myThid :: Instance number for this innvocation of CALC_GT
65 cnh 1.1 _RL fVerT (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
66     _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
67     _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
68     _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
69     _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
70 cnh 1.14 _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
71 cnh 1.1 _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
72 cnh 1.16 _RL KappaRT(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
73 adcroft 1.3 INTEGER k,kUp,kDown,kM1
74 cnh 1.1 INTEGER bi,bj,iMin,iMax,jMin,jMax
75 adcroft 1.35 _RL myTime
76     INTEGER myIter
77 cnh 1.1 INTEGER myThid
78 cnh 1.36 CEOP
79 heimbach 1.24
80     #ifdef ALLOW_AUTODIFF_TAMC
81     C-- only the kUp part of fverT is set in this subroutine
82     C-- the kDown is still required
83     fVerT(1,1,kDown) = fVerT(1,1,kDown)
84 adcroft 1.20 #endif
85 cnh 1.1
86 adcroft 1.34 CALL GAD_CALC_RHS(
87     I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
88     I xA,yA,uTrans,vTrans,rTrans,maskUp,
89     I diffKhT, diffK4T, KappaRT, theta,
90     I GAD_TEMPERATURE, tempAdvScheme,
91     U fVerT, gT,
92     I myThid )
93 cnh 1.1
94 cnh 1.19 #ifdef INCLUDE_T_FORCING_CODE
95 cnh 1.1 C-- External thermal forcing term(s)
96 cnh 1.19 CALL EXTERNAL_FORCING_T(
97     I iMin,iMax,jMin,jMax,bi,bj,k,
98 adcroft 1.35 I myTime,myThid)
99 cnh 1.19 #endif /* INCLUDE_T_FORCING_CODE */
100 adcroft 1.35
101     IF ( tempAdvScheme.EQ.ENUM_CENTERED_2ND
102     & .OR.tempAdvScheme.EQ.ENUM_UPWIND_3RD
103     & .OR.tempAdvScheme.EQ.ENUM_CENTERED_4TH ) THEN
104     CALL ADAMS_BASHFORTH2(
105     I bi, bj, K,
106     U gT, gTnm1,
107     I myIter, myThid )
108     ENDIF
109    
110     #ifdef NONLIN_FRSURF
111     IF (nonlinFreeSurf.GT.0) THEN
112     CALL FREESURF_RESCALE_G(
113     I bi, bj, K,
114     U gT,
115     I myThid )
116     ENDIF
117     #endif /* NONLIN_FRSURF */
118 cnh 1.1
119     RETURN
120     END

  ViewVC Help
Powered by ViewVC 1.1.22