3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
5 |
|
|
6 |
|
CBOP |
7 |
|
C !ROUTINE: CALC_GS |
8 |
|
C !INTERFACE: |
9 |
SUBROUTINE CALC_GS( |
SUBROUTINE CALC_GS( |
10 |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
11 |
I xA,yA,uTrans,vTrans,rTrans,maskUp, |
I xA,yA,uTrans,vTrans,rTrans,maskUp, |
12 |
I KappaRS, |
I KappaRS, |
13 |
U fVerS, |
U fVerS, |
14 |
I myTime,myIter,myThid ) |
I myTime,myIter,myThid ) |
15 |
C /==========================================================\ |
C !DESCRIPTION: \bv |
16 |
C | SUBROUTINE CALC_GS | |
C *==========================================================* |
17 |
C | o Calculate the salt tendency terms. | |
C | SUBROUTINE CALC_GS |
18 |
C |==========================================================| |
C | o Calculate the salt tendency terms. |
19 |
C | A procedure called EXTERNAL_FORCING_S is called from | |
C *==========================================================* |
20 |
C | here. These procedures can be used to add per problem | |
C | A procedure called EXTERNAL_FORCING_S is called from |
21 |
C | E-P flux source terms. | |
C | here. These procedures can be used to add per problem |
22 |
C | Note: Although it is slightly counter-intuitive the | |
C | E-P flux source terms. |
23 |
C | EXTERNAL_FORCING routine is not the place to put | |
C | Note: Although it is slightly counter-intuitive the |
24 |
C | file I/O. Instead files that are required to | |
C | EXTERNAL_FORCING routine is not the place to put |
25 |
C | calculate the external source terms are generally | |
C | file I/O. Instead files that are required to |
26 |
C | read during the model main loop. This makes the | |
C | calculate the external source terms are generally |
27 |
C | logisitics of multi-processing simpler and also | |
C | read during the model main loop. This makes the |
28 |
C | makes the adjoint generation simpler. It also | |
C | logisitics of multi-processing simpler and also |
29 |
C | allows for I/O to overlap computation where that | |
C | makes the adjoint generation simpler. It also |
30 |
C | is supported by hardware. | |
C | allows for I/O to overlap computation where that |
31 |
C | Aside from the problem specific term the code here | |
C | is supported by hardware. |
32 |
C | forms the tendency terms due to advection and mixing | |
C | Aside from the problem specific term the code here |
33 |
C | The baseline implementation here uses a centered | |
C | forms the tendency terms due to advection and mixing |
34 |
C | difference form for the advection term and a tensorial | |
C | The baseline implementation here uses a centered |
35 |
C | divergence of a flux form for the diffusive term. The | |
C | difference form for the advection term and a tensorial |
36 |
C | diffusive term is formulated so that isopycnal mixing and| |
C | divergence of a flux form for the diffusive term. The |
37 |
C | GM-style subgrid-scale terms can be incorporated b simply| |
C | diffusive term is formulated so that isopycnal mixing and |
38 |
C | setting the diffusion tensor terms appropriately. | |
C | GM-style subgrid-scale terms can be incorporated b simply |
39 |
C \==========================================================/ |
C | setting the diffusion tensor terms appropriately. |
40 |
IMPLICIT NONE |
C *==========================================================* |
41 |
|
C \ev |
42 |
|
|
43 |
|
C !USES: |
44 |
|
IMPLICIT NONE |
45 |
C == GLobal variables == |
C == GLobal variables == |
46 |
#include "SIZE.h" |
#include "SIZE.h" |
47 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
49 |
#include "PARAMS.h" |
#include "PARAMS.h" |
50 |
#include "GAD.h" |
#include "GAD.h" |
51 |
|
|
52 |
|
C !INPUT/OUTPUT PARAMETERS: |
53 |
C == Routine arguments == |
C == Routine arguments == |
54 |
C fVerS - Flux of salt (S) in the vertical |
C fVerS :: Flux of salt (S) in the vertical |
55 |
C direction at the upper(U) and lower(D) faces of a cell. |
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. |
C maskUp :: Land mask used to denote base of the domain. |
57 |
C xA - Tracer cell face area normal to X |
C xA :: Tracer cell face area normal to X |
58 |
C yA - Tracer cell face area normal to X |
C yA :: Tracer cell face area normal to X |
59 |
C uTrans - Zonal volume transport through cell face |
C uTrans :: Zonal volume transport through cell face |
60 |
C vTrans - Meridional volume transport through cell face |
C vTrans :: Meridional volume transport through cell face |
61 |
C rTrans - Vertical volume transport through cell face |
C rTrans :: Vertical volume transport through cell face |
62 |
C bi, bj, iMin, iMax, jMin, jMax - Range of points for which calculation |
C bi, bj, iMin, iMax, jMin, jMax :: Range of points for which calculation |
63 |
C results will be set. |
C results will be set. |
64 |
C myThid - Instance number for this innvocation of CALC_GT |
C myThid :: Instance number for this innvocation of CALC_GT |
65 |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
66 |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
67 |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
76 |
INTEGER myIter |
INTEGER myIter |
77 |
INTEGER myThid |
INTEGER myThid |
78 |
|
|
79 |
C == Local variables == |
CEOP |
80 |
|
|
81 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
82 |
C-- only the kUp part of fverS is set in this subroutine |
C-- only the kUp part of fverS is set in this subroutine |