/[MITgcm]/MITgcm/pkg/generic_advdiff/calc_gs.F
ViewVC logotype

Annotation of /MITgcm/pkg/generic_advdiff/calc_gs.F

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


Revision 1.3 - (hide annotations) (download)
Tue Sep 18 19:07:36 2001 UTC (22 years, 7 months ago) by adcroft
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Moved calc_gt.F, calc_gs.F and calc_gtr1.F to model/src from pkg/generic_advdiff

1 adcroft 1.3 C $Header: /u/gcmpack/models/MITgcmUV/pkg/generic_advdiff/calc_gs.F,v 1.2 2001/08/30 00:40:37 adcroft Exp $
2 adcroft 1.2 C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6     SUBROUTINE CALC_GS(
7     I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
8     I xA,yA,uTrans,vTrans,rTrans,maskUp,
9     I KappaRS,
10     U fVerS,
11     I myCurrentTime, myThid )
12     C /==========================================================\
13     C | SUBROUTINE CALC_GS |
14     C | o Calculate the salt tendency terms. |
15     C |==========================================================|
16     C | A procedure called EXTERNAL_FORCING_S is called from |
17     C | here. These procedures can be used to add per problem |
18     C | E-P flux source terms. |
19     C | Note: Although it is slightly counter-intuitive the |
20     C | EXTERNAL_FORCING routine is not the place to put |
21     C | file I/O. Instead files that are required to |
22     C | calculate the external source terms are generally |
23     C | read during the model main loop. This makes the |
24     C | logisitics of multi-processing simpler and also |
25     C | makes the adjoint generation simpler. It also |
26     C | allows for I/O to overlap computation where that |
27     C | is supported by hardware. |
28     C | Aside from the problem specific term the code here |
29     C | forms the tendency terms due to advection and mixing |
30     C | The baseline implementation here uses a centered |
31     C | difference form for the advection term and a tensorial |
32     C | divergence of a flux form for the diffusive term. The |
33     C | diffusive term is formulated so that isopycnal mixing and|
34     C | GM-style subgrid-scale terms can be incorporated b simply|
35     C | setting the diffusion tensor terms appropriately. |
36     C \==========================================================/
37     IMPLICIT NONE
38    
39     C == GLobal variables ==
40     #include "SIZE.h"
41     #include "DYNVARS.h"
42     #include "EEPARAMS.h"
43     #include "PARAMS.h"
44     #include "GAD.h"
45    
46     C == Routine arguments ==
47     C fVerS - Flux of salt (S) in the vertical
48     C direction at the upper(U) and lower(D) faces of a cell.
49     C maskUp - Land mask used to denote base of the domain.
50     C xA - Tracer cell face area normal to X
51     C yA - Tracer cell face area normal to X
52     C uTrans - Zonal volume transport through cell face
53     C vTrans - Meridional volume transport through cell face
54     C rTrans - Vertical volume transport through cell face
55     C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation
56     C results will be set.
57     C myThid - Instance number for this innvocation of CALC_GT
58     _RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
59     _RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
60     _RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
61     _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
62     _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
63     _RL rTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
64     _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
65     _RL KappaRS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
66     INTEGER k,kUp,kDown,kM1
67     INTEGER bi,bj,iMin,iMax,jMin,jMax
68     _RL myCurrentTime
69     INTEGER myThid
70    
71     C == Local variables ==
72    
73     #ifdef ALLOW_AUTODIFF_TAMC
74     C-- only the kUp part of fverS is set in this subroutine
75     C-- the kDown is still required
76     fVerS(1,1,kDown) = fVerS(1,1,kDown)
77     #endif
78    
79     CALL GAD_CALC_RHS(
80     I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,
81     I xA,yA,uTrans,vTrans,rTrans,maskUp,
82     I diffKhS, diffK4S, KappaRS, Salt,
83 adcroft 1.2 I GAD_SALINITY, saltAdvScheme,
84 adcroft 1.1 U fVerS, gS,
85     I myThid )
86    
87     C-- External forcing term(s)
88     CALL EXTERNAL_FORCING_S(
89     I iMin,iMax,jMin,jMax,bi,bj,k,
90     I myCurrentTime,myThid)
91    
92     RETURN
93     END

  ViewVC Help
Powered by ViewVC 1.1.22