/[MITgcm]/MITgcm/pkg/mom_fluxform/mom_calc_rtrans.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_fluxform/mom_calc_rtrans.F

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


Revision 1.2 - (show annotations) (download)
Thu Oct 9 04:19:20 2003 UTC (20 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint54f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint55c_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint54a_post, checkpoint51r_post, checkpoint51i_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint55a_post, checkpoint51o_post, checkpoint53b_post, checkpoint52a_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.1: +2 -2 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 C $Header: /u/u3/gcmpack/MITgcm/pkg/mom_fluxform/mom_calc_rtrans.F,v 1.1.4.1 2003/10/02 18:30:08 adcroft Exp $
2 C $Name: $
3
4 #include "MOM_FLUXFORM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: MOM_CALC_RTRANS
8 C !INTERFACE:
9 SUBROUTINE MOM_CALC_RTRANS(
10 I k, bi, bj,
11 O rTransU, rTransV,
12 I myTime, myIter, myThid)
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE MOM_CALC_RTRANS
16 C | o Calculate vertical transports at interface k
17 C | above U & V points (West & South face)
18 C *==========================================================*
19 C | r coordinate (z or p):
20 C | is simply half of the 2 vert. Transp at Center location
21 C | r* coordinate: less simple since
22 C | d.eta/dt / H has to be evaluated locally at U & V points
23 C *==========================================================*
24 C \ev
25
26 C !USES:
27 IMPLICIT NONE
28 C == GLobal variables ==
29 #include "SIZE.h"
30 #include "DYNVARS.h"
31 #include "EEPARAMS.h"
32 #include "PARAMS.h"
33 #include "GRID.h"
34 #include "SURFACE.h"
35
36 C !INPUT/OUTPUT PARAMETERS:
37 C == Routine arguments ==
38 C k :: vertical level
39 C bi,bj :: tile indices
40 C rTransU :: vertical transport (above U point)
41 C rTransV :: vertical transport (above V point)
42 C myTime :: current time
43 C myIter :: current iteration number
44 C myThid :: thread number
45 C
46 INTEGER k, bi, bj, myIter, myThid
47 _RL myTime
48 _RL rTransU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49 _RL rTransV(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50
51 C !LOCAL VARIABLES:
52 #ifdef NONLIN_FRSURF
53 C == Local variables in common block ==
54 C dWtransC :: vertical transp. difference between r & r* coordinates
55 C dWtransU :: same but above u.point location (West face)
56 C dWtransV :: same but above v.point location (South face)
57 COMMON /LOCAL_MOM_CALC_RTRANS/
58 & dWtransC, dWtransU, dWtransV
59 _RL dWtransC(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
60 _RL dWtransU(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
61 _RL dWtransV(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
62 #endif /* NONLIN_FRSURF */
63 C == Local variables ==
64 C I, J :: Loop counters
65 INTEGER i,j
66 CEOP
67
68 #ifdef NONLIN_FRSURF
69 IF ( k.EQ.Nr+1 .AND.
70 & useRealFreshWaterFlux .AND.
71 & buoyancyRelation .EQ. 'OCEANICP' ) THEN
72 DO j=1-OLy+1,sNy+OLy
73 DO i=1-OLx+1,sNx+OLx
74 rTransU(i,j) = convertEmP2rUnit*
75 & 0.5 _d 0*( PmEpR( i ,j,bi,bj)*rA( i ,j,bi,bj)
76 & +PmEpR(i-1,j,bi,bj)*rA(i-1,j,bi,bj) )
77 rTransV(i,j) = convertEmP2rUnit*
78 & 0.5 _d 0*( PmEpR(i, j ,bi,bj)*rA(i, j ,bi,bj)
79 & +PmEpR(i,j-1,bi,bj)*rA(i,j-1,bi,bj) )
80 ENDDO
81 ENDDO
82 ELSEIF ( k.GT.Nr ) THEN
83 #else /* NONLIN_FRSURF */
84 IF ( k.GT.Nr ) THEN
85 #endif /* NONLIN_FRSURF */
86 DO j=1-OLy+1,sNy+OLy
87 DO i=1-OLx+1,sNx+OLx
88 rTransU(i,j) = 0.
89 rTransV(i,j) = 0.
90 ENDDO
91 ENDDO
92 ELSE
93 C- Calculate vertical transports above U & V points (West & South face):
94 DO j=1-OLy+1,sNy+OLy
95 DO i=1-OLx+1,sNx+OLx
96 rTransU(i,j) =
97 & 0.5 _d 0*( wVel(i-1,j,k,bi,bj)*rA(i-1,j,bi,bj)
98 & +wVel( i ,j,k,bi,bj)*rA( i ,j,bi,bj) )
99 rTransV(i,j) =
100 & 0.5 _d 0*( wVel(i,j-1,k,bi,bj)*rA(i,j-1,bi,bj)
101 & +wVel(i, j ,k,bi,bj)*rA(i, j ,bi,bj) )
102 ENDDO
103 ENDDO
104 ENDIF
105
106 #ifdef NONLIN_FRSURF
107 C--- Modify rTransU & rTransV when using r* coordinate:
108 IF ( select_rStar.NE.0 ) THEN
109
110 IF ( k.EQ.1) THEN
111 C- Initialise dWtrans :
112 DO j=1-OLy,sNy+OLy
113 DO i=1-OLx,sNx+OLx
114 dWtransC(i,j,bi,bj) = rStarDhCDt(i,j,bi,bj)
115 & *(Ro_surf(i,j,bi,bj)-R_low(i,j,bi,bj))
116 & *rA(i,j,bi,bj)
117 ENDDO
118 ENDDO
119 DO j=1-OLy+1,sNy+OLy
120 DO i=1-OLx+1,sNx+OLx
121 dWtransU(i,j,bi,bj) =
122 & 0.5 _d 0*(dWtransC(i-1,j,bi,bj)+dWtransC(i,j,bi,bj))
123 dWtransV(i,j,bi,bj) =
124 & 0.5 _d 0*(dWtransC(i,j-1,bi,bj)+dWtransC(i,j,bi,bj))
125 ENDDO
126 ENDDO
127
128 ELSEIF (k.LE.Nr) THEN
129 C- Update dWtrans from previous value (interface k-1):
130 DO j=1-OLy,sNy+OLy
131 DO i=1-OLx,sNx+OLx
132 dWtransC(i,j,bi,bj) = dWtransC(i,j,bi,bj)
133 & - rStarDhCDt(i,j,bi,bj)*drF(k-1)*h0FacC(i,j,k-1,bi,bj)
134 & *rA(i,j,bi,bj)
135 ENDDO
136 ENDDO
137 DO j=1-OLy+1,sNy+OLy
138 DO i=1-OLx+1,sNx+OLx
139 dWtransU(i,j,bi,bj) = dWtransU(i,j,bi,bj)
140 & - rStarDhWDt(i,j,bi,bj)*drF(k-1)*h0FacW(i,j,k-1,bi,bj)
141 & *rAw(i,j,bi,bj)
142 dWtransV(i,j,bi,bj) = dWtransV(i,j,bi,bj)
143 & - rStarDhSDt(i,j,bi,bj)*drF(k-1)*h0FacS(i,j,k-1,bi,bj)
144 & *rAs(i,j,bi,bj)
145 ENDDO
146 ENDDO
147 C- Modify rTransU & rTransV :
148 DO j=1-OLy+1,sNy+OLy
149 DO i=1-OLx+1,sNx+OLx
150 rTransU(i,j) = rTransU(i,j)-dWtransU(i,j,bi,bj)
151 & + (dWtransC(i-1,j,bi,bj)+dWtransC(i,j,bi,bj))*0.5 _d 0
152 rTransV(i,j) = rTransV(i,j)-dWtransV(i,j,bi,bj)
153 & + (dWtransC(i,j-1,bi,bj)+dWtransC(i,j,bi,bj))*0.5 _d 0
154 ENDDO
155 ENDDO
156
157 ENDIF
158
159 ENDIF
160 #endif /* NONLIN_FRSURF */
161
162 RETURN
163 END

  ViewVC Help
Powered by ViewVC 1.1.22