/[MITgcm]/MITgcm/pkg/seaice/seaice_ocean_stress.F
ViewVC logotype

Annotation of /MITgcm/pkg/seaice/seaice_ocean_stress.F

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


Revision 1.21 - (hide annotations) (download)
Thu Jan 17 23:18:39 2008 UTC (16 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59o, checkpoint59n, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61j, checkpoint61h, checkpoint61i
Changes since 1.20: +12 -11 lines
removed uneeded arrays KGEO, GWATX, and GWATY from SEAICE_CGRID code

1 dimitri 1.21 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ocean_stress.F,v 1.20 2007/11/14 15:55:48 mlosch Exp $
2 mlosch 1.1 C $Name: $
3    
4     #include "SEAICE_OPTIONS.h"
5    
6     CStartOfInterface
7 jmc 1.19 SUBROUTINE SEAICE_OCEAN_STRESS(
8 mlosch 1.1 I myTime, myIter, myThid )
9     C /==========================================================\
10     C | SUBROUTINE SEAICE_OCEAN_STRESS |
11     C | o Calculate ocean surface stresses |
12     C | - C-grid version |
13     C |==========================================================|
14     C \==========================================================/
15     IMPLICIT NONE
16    
17     C === Global variables ===
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PARAMS.h"
21 dimitri 1.21 #include "DYNVARS.h"
22 mlosch 1.5 #include "GRID.h"
23 mlosch 1.1 #include "FFIELDS.h"
24     #include "SEAICE.h"
25     #include "SEAICE_PARAMS.h"
26    
27     C === Routine arguments ===
28     C myTime - Simulation time
29     C myIter - Simulation timestep number
30     C myThid - Thread no. that called this routine.
31     _RL myTime
32     INTEGER myIter
33     INTEGER myThid
34     CEndOfInterface
35    
36 jmc 1.19 #ifdef SEAICE_CGRID
37 mlosch 1.1 C === Local variables ===
38     C i,j,bi,bj - Loop counters
39    
40     INTEGER i, j, bi, bj
41 mlosch 1.5 _RL SINWAT, COSWAT, SINWIN, COSWIN
42 mlosch 1.11 _RL fuIceLoc, fvIceLoc, FX, FY
43 mlosch 1.4 _RL areaW, areaS
44 mlosch 1.1
45 mlosch 1.13 _RL e11 (1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
46     _RL e22 (1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
47     _RL e12 (1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
48 mlosch 1.5 _RL press (1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
49 mlosch 1.14 _RL sig11 (1-Olx:sNx+Olx,1-Oly:sNy+Oly)
50     _RL sig22 (1-Olx:sNx+Olx,1-Oly:sNy+Oly)
51     _RL sig12 (1-Olx:sNx+Olx,1-Oly:sNy+Oly)
52     _RL eplus, eminus
53 mlosch 1.5
54 mlosch 1.1 c introduce turning angle (default is zero)
55     SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad)
56     COSWAT=COS(SEAICE_waterTurnAngle*deg2rad)
57 mlosch 1.5 SINWIN=SIN(SEAICE_airTurnAngle*deg2rad)
58     COSWIN=COS(SEAICE_airTurnAngle*deg2rad)
59 mlosch 1.1
60 mlosch 1.5 IF ( useHB87StressCoupling ) THEN
61     C
62 jmc 1.19 C use an intergral over ice and ocean surface layer to define
63 mlosch 1.5 C surface stresses on ocean following Hibler and Bryan (1987, JPO)
64 jmc 1.19 C
65 mlosch 1.14 C recompute strain rates, viscosities, etc. from updated ice velocities
66     IF ( .NOT. SEAICEuseEVP ) THEN
67 jmc 1.19 C only for EVP we already have the stress components otherwise we need
68 mlosch 1.16 C to recompute them here
69 jmc 1.19 CALL SEAICE_CALC_STRAINRATES(
70 mlosch 1.20 I uIce, vIce,
71 mlosch 1.14 O e11, e22, e12,
72 mlosch 1.20 I 3, 3, myTime, myIter, myThid )
73 mlosch 1.14
74 jmc 1.19 CALL SEAICE_CALC_VISCOSITIES(
75 mlosch 1.14 I e11, e22, e12, zMin, zMax, hEffM, press0,
76 jmc 1.19 O eta, zeta, press,
77     I 3, myTime, myIter, myThid )
78 mlosch 1.14 ENDIF
79 mlosch 1.5 C re-compute internal stresses with updated ice velocities
80     DO bj=myByLo(myThid),myByHi(myThid)
81     DO bi=myBxLo(myThid),myBxHi(myThid)
82 mlosch 1.14 IF ( .NOT. SEAICEuseEVP ) THEN
83 jmc 1.19 C only for EVP we already have computed the stress divergences, for
84 mlosch 1.14 C anything else we have to do it here
85     DO j=1-Oly,sNy+Oly
86     DO i=1-Olx,sNx+Olx
87     sig11(I,J) = 0. _d 0
88     sig22(I,J) = 0. _d 0
89     sig12(I,J) = 0. _d 0
90     ENDDO
91 mlosch 1.5 ENDDO
92 mlosch 1.14
93 mlosch 1.18 DO j=0,sNy
94     DO i=0,sNx
95 mlosch 1.14 eplus = e11(I,J,bi,bj) + e22(I,J,bi,bj)
96     eminus= e11(I,J,bi,bj) - e22(I,J,bi,bj)
97     sig11(I,J) = zeta(I,J,bi,bj)*eplus + eta(I,J,bi,bj)*eminus
98     & - 0.5 _d 0 * PRESS(I,J,bi,bj)
99     sig22(I,J) = zeta(I,J,bi,bj)*eplus - eta(I,J,bi,bj)*eminus
100     & - 0.5 _d 0 * PRESS(I,J,bi,bj)
101 mlosch 1.18 ENDDO
102     ENDDO
103    
104     DO j=1,sNy+1
105     DO i=1,sNx+1
106 mlosch 1.14 sig12(I,J) = 2. _d 0 * e12(I,J,bi,bj) *
107     & ( eta(I,J ,bi,bj) + eta(I-1,J ,bi,bj)
108     & + eta(I,J-1,bi,bj) + eta(I-1,J-1,bi,bj) )
109 jmc 1.19 & /MAX(1. _d 0,
110 mlosch 1.14 & hEffM(I,J ,bi,bj) + hEffM(I-1,J ,bi,bj)
111     & + hEffM(I,J-1,bi,bj) + hEffM(I-1,J-1,bi,bj))
112     ENDDO
113     ENDDO
114     C evaluate divergence of stress and apply to forcing
115     DO J=1,sNy
116     DO I=1,sNx
117     FX = ( sig11(I ,J ) * _dyF(I ,J ,bi,bj)
118     & - sig11(I-1,J ) * _dyF(I-1,J ,bi,bj)
119 jmc 1.19 & + sig12(I ,J+1) * _dxV(I ,J+1,bi,bj)
120 mlosch 1.14 & - sig12(I ,J ) * _dxV(I ,J ,bi,bj)
121     & ) * recip_rAw(I,J,bi,bj)
122 jmc 1.19 & -
123 mlosch 1.14 & ( sig12(I,J) + sig12(I,J+1) )
124     & * _tanPhiAtU(I,J,bi,bj) * recip_rSphere
125 jmc 1.19 & +
126 mlosch 1.14 & ( sig22(I,J) + sig22(I-1,J) ) * 0.5 _d 0
127     & * _tanPhiAtU(I,J,bi,bj) * recip_rSphere
128     C one metric term missing for general curvilinear coordinates
129     FY = ( sig22(I ,J ) * _dxF(I ,J ,bi,bj)
130 jmc 1.19 & - sig22(I ,J-1) * _dxF(I ,J-1,bi,bj)
131 mlosch 1.14 & + sig12(I+1,J ) * _dyU(I+1,J ,bi,bj)
132 jmc 1.19 & - sig12(I ,J ) * _dyU(I ,J ,bi,bj)
133 mlosch 1.14 & ) * recip_rAs(I,J,bi,bj)
134 jmc 1.19 & -
135 mlosch 1.14 & ( sig22(I,J) + sig22(I,J-1) ) * 0.5 _d 0
136     & * _tanPhiAtV(I,J,bi,bj) * recip_rSphere
137     C two metric terms missing for general curvilinear coordinates
138 jmc 1.19 C average wind stress over ice and ocean and apply averaged wind
139 mlosch 1.14 C stress and internal ice stresses to surface layer of ocean
140     areaW = 0.5 * (AREA(I,J,1,bi,bj) + AREA(I-1,J,1,bi,bj))
141     & * SEAICEstressFactor
142     areaS = 0.5 * (AREA(I,J,1,bi,bj) + AREA(I,J-1,1,bi,bj))
143     & * SEAICEstressFactor
144     fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj)
145 jmc 1.19 & + areaW*taux(I,J,bi,bj)
146 mlosch 1.14 & + FX * SEAICEstressFactor
147     fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj)
148     & + areaS*tauy(I,J,bi,bj)
149     & + FY * SEAICEstressFactor
150     C save stress divergence for later
151 mlosch 1.16 #ifdef SEAICE_ALLOW_EVP
152 mlosch 1.14 stressDivergenceX(I,J,bi,bj) = FX
153     stressDivergenceY(I,J,bi,bj) = FY
154 mlosch 1.16 #endif /* SEAICE_ALLOW_EVP */
155 mlosch 1.14 ENDDO
156     ENDDO
157     ELSE
158 mlosch 1.16 #ifdef SEAICE_ALLOW_EVP
159 mlosch 1.14 DO J=1,sNy
160     DO I=1,sNx
161 jmc 1.19 C average wind stress over ice and ocean and apply averaged wind
162 mlosch 1.5 C stress and internal ice stresses to surface layer of ocean
163 mlosch 1.14 areaW = 0.5 * (AREA(I,J,1,bi,bj) + AREA(I-1,J,1,bi,bj))
164     & * SEAICEstressFactor
165     areaS = 0.5 * (AREA(I,J,1,bi,bj) + AREA(I,J-1,1,bi,bj))
166     & * SEAICEstressFactor
167     fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj)
168 jmc 1.19 & + areaW*taux(I,J,bi,bj)
169 mlosch 1.14 & + stressDivergenceX(I,J,bi,bj) * SEAICEstressFactor
170     fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj)
171     & + areaS*tauy(I,J,bi,bj)
172     & + stressDivergenceY(I,J,bi,bj) * SEAICEstressFactor
173     ENDDO
174     ENDDO
175 mlosch 1.16 #endif /* SEAICE_ALLOW_EVP */
176 mlosch 1.14 ENDIF
177 mlosch 1.5 ENDDO
178     ENDDO
179 jmc 1.17
180 mlosch 1.5 ELSE
181 jmc 1.17 C else: useHB87StressCoupling=F
182 mlosch 1.5
183 jmc 1.19 C-- Compute ice-affected wind stress (interpolate to U/V-points)
184     C by averaging wind stress and ice-ocean stress according to
185 mlosch 1.5 C ice cover
186 mlosch 1.1 DO bj=myByLo(myThid),myByHi(myThid)
187     DO bi=myBxLo(myThid),myBxHi(myThid)
188     DO j=1,sNy
189     DO i=1,sNx
190 mlosch 1.18 fuIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I-1,J,bi,bj) )*
191 jmc 1.19 & COSWAT *
192 dimitri 1.21 & ( UICE(I,J,1,bi,bj)-uVel(I,J,1,bi,bj) )
193 jmc 1.19 & - SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 *
194 mlosch 1.6 & ( DWATN(I ,J,bi,bj) *
195 dimitri 1.21 & 0.5 _d 0*(vIce(I ,J ,1,bi,bj)-vVel(I ,J ,1,bi,bj)
196     & +vIce(I ,J+1,1,bi,bj)-vVel(I ,J+1,1,bi,bj))
197 mlosch 1.6 & + DWATN(I-1,J,bi,bj) *
198 dimitri 1.21 & 0.5 _d 0*(vIce(I-1,J ,1,bi,bj)-vVel(I-1,J ,1,bi,bj)
199     & +vIce(I-1,J+1,1,bi,bj)-vVel(I-1,J+1,1,bi,bj))
200 mlosch 1.1 & )
201 mlosch 1.18 fvIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I,J-1,bi,bj) )*
202 mlosch 1.6 & COSWAT *
203 dimitri 1.21 & ( VICE(I,J,1,bi,bj)-vVel(I,J,1,bi,bj) )
204 mlosch 1.6 & + SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 *
205     & ( DWATN(I,J ,bi,bj) *
206 dimitri 1.21 & 0.5 _d 0*(uIce(I ,J ,1,bi,bj)-uVel(I ,J ,1,bi,bj)
207     & +uIce(I+1,J ,1,bi,bj)-uVel(I+1,J ,1,bi,bj))
208 mlosch 1.6 & + DWATN(I,J-1,bi,bj) *
209 dimitri 1.21 & 0.5 _d 0*(uIce(I ,J-1,1,bi,bj)-uVel(I ,J-1,1,bi,bj)
210     & +uIce(I+1,J-1,1,bi,bj)-uVel(I+1,J-1,1,bi,bj))
211 mlosch 1.1 & )
212 mlosch 1.4 areaW = 0.5 _d 0 * (AREA(I,J,1,bi,bj) + AREA(I-1,J,1,bi,bj))
213 mlosch 1.9 & * SEAICEstressFactor
214 mlosch 1.4 areaS = 0.5 _d 0 * (AREA(I,J,1,bi,bj) + AREA(I,J-1,1,bi,bj))
215 mlosch 1.9 & * SEAICEstressFactor
216 mlosch 1.11 fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj)+areaW*fuIceLoc
217     fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj)+areaS*fvIceLoc
218 mlosch 1.1 ENDDO
219     ENDDO
220     ENDDO
221     ENDDO
222 mlosch 1.5 ENDIF
223 mlosch 1.1 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
224 mlosch 1.3
225 jmc 1.17 #endif /* SEAICE_CGRID */
226 mlosch 1.1
227     RETURN
228     END

  ViewVC Help
Powered by ViewVC 1.1.22