7 |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
I bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown, |
8 |
I xA,yA,uTrans,vTrans,rTrans,maskup,maskC, |
I xA,yA,uTrans,vTrans,rTrans,maskup,maskC, |
9 |
I KappaRS, |
I KappaRS, |
10 |
U af,df,fZon,fMer,fVerS, |
U fVerS, |
11 |
I myCurrentTime, myThid ) |
I myCurrentTime, myThid ) |
12 |
C /==========================================================\ |
C /==========================================================\ |
13 |
C | SUBROUTINE CALC_GS | |
C | SUBROUTINE CALC_GS | |
45 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
46 |
|
|
47 |
C == Routine arguments == |
C == Routine arguments == |
|
C fZon - Work array for flux of temperature in the east-west |
|
|
C direction at the west face of a cell. |
|
|
C fMer - Work array for flux of temperature in the north-south |
|
|
C direction at the south face of a cell. |
|
48 |
C fVerS - Flux of salt (S) in the vertical |
C fVerS - Flux of salt (S) in the vertical |
49 |
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. |
50 |
C maskUp - Land mask used to denote base of the domain. |
C maskUp - Land mask used to denote base of the domain. |
54 |
C uTrans - Zonal volume transport through cell face |
C uTrans - Zonal volume transport through cell face |
55 |
C vTrans - Meridional volume transport through cell face |
C vTrans - Meridional volume transport through cell face |
56 |
C rTrans - Vertical volume transport through cell face |
C rTrans - Vertical volume transport through cell face |
|
C af - Advective flux component work array |
|
|
C df - Diffusive flux component work array |
|
57 |
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 |
58 |
C results will be set. |
C results will be set. |
59 |
C myThid - Instance number for this innvocation of CALC_GT |
C myThid - Instance number for this innvocation of CALC_GT |
|
_RL fZon (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL fMer (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
60 |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
_RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2) |
61 |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS xA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
62 |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS yA (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
66 |
_RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
67 |
_RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
68 |
_RL KappaRS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
_RL KappaRS(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr) |
|
_RL af (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
|
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
69 |
INTEGER k,kUp,kDown,kM1 |
INTEGER k,kUp,kDown,kM1 |
70 |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
INTEGER bi,bj,iMin,iMax,jMin,jMax |
71 |
_RL myCurrentTime |
_RL myCurrentTime |
80 |
_RL dSdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL dSdx(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
81 |
_RL dSdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL dSdy(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
82 |
_RL df4 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
_RL df4 (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
83 |
|
_RL fZon (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
84 |
|
_RL fMer (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
85 |
|
_RL af (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
86 |
|
_RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
87 |
|
|
88 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF_TAMC |
89 |
C-- only the kUp part of fverS is set in this subroutine |
C-- only the kUp part of fverS is set in this subroutine |
299 |
I maskC, |
I maskC, |
300 |
I myCurrentTime,myThid) |
I myCurrentTime,myThid) |
301 |
|
|
|
#ifdef INCLUDE_LAT_CIRC_FFT_FILTER_CODE |
|
|
C-- |
|
|
CALL FILTER_LATCIRCS_FFT_APPLY( gS, 1, sNy, k, k, bi, bj, 1, myThid) |
|
|
#endif |
|
|
|
|
302 |
RETURN |
RETURN |
303 |
END |
END |