1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ocean_stress.F,v 1.29 2010/11/24 15:51:05 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE SEAICE_OCEAN_STRESS( |
8 |
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 |
#include "DYNVARS.h" |
22 |
#include "GRID.h" |
23 |
#include "FFIELDS.h" |
24 |
#include "SEAICE_SIZE.h" |
25 |
#include "SEAICE_PARAMS.h" |
26 |
#include "SEAICE.h" |
27 |
|
28 |
C === Routine arguments === |
29 |
C myTime - Simulation time |
30 |
C myIter - Simulation timestep number |
31 |
C myThid - Thread no. that called this routine. |
32 |
_RL myTime |
33 |
INTEGER myIter |
34 |
INTEGER myThid |
35 |
CEndOfInterface |
36 |
|
37 |
#ifdef SEAICE_CGRID |
38 |
C === Local variables === |
39 |
C i,j,bi,bj - Loop counters |
40 |
C kSrf - vertical index of surface layer |
41 |
INTEGER i, j, bi, bj |
42 |
INTEGER kSrf |
43 |
_RL COSWAT |
44 |
_RS SINWAT |
45 |
_RL fuIceLoc, fvIceLoc |
46 |
_RL areaW, areaS |
47 |
|
48 |
C surrface level |
49 |
kSrf = 1 |
50 |
C introduce turning angle (default is zero) |
51 |
SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad) |
52 |
COSWAT=COS(SEAICE_waterTurnAngle*deg2rad) |
53 |
|
54 |
IF ( useHB87StressCoupling ) THEN |
55 |
C |
56 |
C use an intergral over ice and ocean surface layer to define |
57 |
C surface stresses on ocean following Hibler and Bryan (1987, JPO) |
58 |
C |
59 |
DO bj=myByLo(myThid),myByHi(myThid) |
60 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
61 |
DO J=1,sNy |
62 |
DO I=1,sNx |
63 |
C average wind stress over ice and ocean and apply averaged wind |
64 |
C stress and internal ice stresses to surface layer of ocean |
65 |
areaW = 0.5 * (AREA(I,J,bi,bj) + AREA(I-1,J,bi,bj)) |
66 |
& * SEAICEstressFactor |
67 |
fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj) |
68 |
& + areaW*taux(I,J,bi,bj) |
69 |
& + stressDivergenceX(I,J,bi,bj) * SEAICEstressFactor |
70 |
ENDDO |
71 |
ENDDO |
72 |
C This loop separation makes the adjoint code vectorize |
73 |
DO J=1,sNy |
74 |
DO I=1,sNx |
75 |
areaS = 0.5 * (AREA(I,J,bi,bj) + AREA(I,J-1,bi,bj)) |
76 |
& * SEAICEstressFactor |
77 |
fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj) |
78 |
& + areaS*tauy(I,J,bi,bj) |
79 |
& + stressDivergenceY(I,J,bi,bj) * SEAICEstressFactor |
80 |
ENDDO |
81 |
ENDDO |
82 |
ENDDO |
83 |
ENDDO |
84 |
|
85 |
ELSE |
86 |
C else: useHB87StressCoupling=F |
87 |
|
88 |
C-- Compute ice-affected wind stress (interpolate to U/V-points) |
89 |
C by averaging wind stress and ice-ocean stress according to |
90 |
C ice cover |
91 |
DO bj=myByLo(myThid),myByHi(myThid) |
92 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
93 |
DO j=1,sNy |
94 |
DO i=1,sNx |
95 |
fuIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I-1,J,bi,bj) )* |
96 |
& COSWAT * |
97 |
& ( uIce(I,J,bi,bj)-uVel(I,J,kSrf,bi,bj) ) |
98 |
& - SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 * |
99 |
& ( DWATN(I ,J,bi,bj) * |
100 |
& 0.5 _d 0*(vIce(I ,J ,bi,bj)-vVel(I ,J ,kSrf,bi,bj) |
101 |
& +vIce(I ,J+1,bi,bj)-vVel(I ,J+1,kSrf,bi,bj)) |
102 |
& + DWATN(I-1,J,bi,bj) * |
103 |
& 0.5 _d 0*(vIce(I-1,J ,bi,bj)-vVel(I-1,J ,kSrf,bi,bj) |
104 |
& +vIce(I-1,J+1,bi,bj)-vVel(I-1,J+1,kSrf,bi,bj)) |
105 |
& ) |
106 |
fvIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I,J-1,bi,bj) )* |
107 |
& COSWAT * |
108 |
& ( vIce(I,J,bi,bj)-vVel(I,J,kSrf,bi,bj) ) |
109 |
& + SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 * |
110 |
& ( DWATN(I,J ,bi,bj) * |
111 |
& 0.5 _d 0*(uIce(I ,J ,bi,bj)-uVel(I ,J ,kSrf,bi,bj) |
112 |
& +uIce(I+1,J ,bi,bj)-uVel(I+1,J ,kSrf,bi,bj)) |
113 |
& + DWATN(I,J-1,bi,bj) * |
114 |
& 0.5 _d 0*(uIce(I ,J-1,bi,bj)-uVel(I ,J-1,kSrf,bi,bj) |
115 |
& +uIce(I+1,J-1,bi,bj)-uVel(I+1,J-1,kSrf,bi,bj)) |
116 |
& ) |
117 |
areaW = 0.5 _d 0 * (AREA(I,J,bi,bj) + AREA(I-1,J,bi,bj)) |
118 |
& * SEAICEstressFactor |
119 |
areaS = 0.5 _d 0 * (AREA(I,J,bi,bj) + AREA(I,J-1,bi,bj)) |
120 |
& * SEAICEstressFactor |
121 |
fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj)+areaW*fuIceLoc |
122 |
fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj)+areaS*fvIceLoc |
123 |
ENDDO |
124 |
ENDDO |
125 |
ENDDO |
126 |
ENDDO |
127 |
ENDIF |
128 |
CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid) |
129 |
|
130 |
#endif /* SEAICE_CGRID */ |
131 |
|
132 |
RETURN |
133 |
END |