1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ocean_stress.F,v 1.3 2006/03/06 20:53:25 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 "FFIELDS.h" |
22 |
#include "SEAICE.h" |
23 |
#include "SEAICE_PARAMS.h" |
24 |
|
25 |
C === Routine arguments === |
26 |
C myTime - Simulation time |
27 |
C myIter - Simulation timestep number |
28 |
C myThid - Thread no. that called this routine. |
29 |
_RL myTime |
30 |
INTEGER myIter |
31 |
INTEGER myThid |
32 |
CML _RL COR_ICE (1-OLx:sNx+OLx,1-OLy:sNy+OLy, nSx,nSy) |
33 |
CEndOfInterface |
34 |
|
35 |
#ifdef SEAICE_CGRID |
36 |
C === Local variables === |
37 |
C i,j,bi,bj - Loop counters |
38 |
|
39 |
INTEGER i, j, bi, bj |
40 |
_RL SINWAT, COSWAT |
41 |
_RL fuIce, fvIce |
42 |
_RL areaW, areaS |
43 |
|
44 |
c introduce turning angle (default is zero) |
45 |
SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad) |
46 |
COSWAT=COS(SEAICE_waterTurnAngle*deg2rad) |
47 |
|
48 |
C-- Update overlap regions |
49 |
CALL EXCH_UV_XY_RL(WINDX, WINDY, .TRUE., myThid) |
50 |
|
51 |
#ifndef SEAICE_EXTERNAL_FLUXES |
52 |
C-- Interpolate wind stress (N/m^2) from C-points of C-grid |
53 |
C to U and V points of C-grid for forcing the ocean model. |
54 |
DO bj=myByLo(myThid),myByHi(myThid) |
55 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
56 |
DO j=1,sNy |
57 |
DO i=1,sNx |
58 |
fu(I,J,bi,bj)=0.5*(WINDX(I,J,bi,bj) + WINDX(I-1,J,bi,bj)) |
59 |
fv(I,J,bi,bj)=0.5*(WINDY(I,J,bi,bj) + WINDY(I,J-1,bi,bj)) |
60 |
ENDDO |
61 |
ENDDO |
62 |
ENDDO |
63 |
ENDDO |
64 |
#endif /* ifndef SEAICE_EXTERNAL_FLUXES */ |
65 |
|
66 |
C-- Compute ice-affected wind stress (interpolate to U/V-points) |
67 |
DO bj=myByLo(myThid),myByHi(myThid) |
68 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
69 |
DO j=1,sNy |
70 |
DO i=1,sNx |
71 |
fuIce=HALF*( DWATN(I,J,bi,bj)+DWATN(I,J+1,bi,bj) )*( |
72 |
& COSWAT * |
73 |
& ( UICE(I,J,1,bi,bj)-GWATX(I,J,bi,bj) ) |
74 |
& - SINWAT* 0.5 _d 0 * ( |
75 |
& 0.5 _d 0*(vIce(I ,J ,1,bi,bj)-GWATY(I ,J ,bi,bj) |
76 |
& +vIce(I-1,J ,1,bi,bj)-GWATY(I-1,J ,bi,bj)) |
77 |
& +0.5 _d 0*(vIce(I ,J+1,1,bi,bj)-GWATY(I ,J+1,bi,bj) |
78 |
& +vIce(I-1,J+1,1,bi,bj)-GWATY(I-1,J+1,bi,bj)) ) |
79 |
& ) |
80 |
fvIce=HALF*( DWATN(I,J,bi,bj)+DWATN(I+1,J,bi,bj) )*( |
81 |
& SINWAT * |
82 |
& ( UICE(I,J,1,bi,bj)-GWATX(I,J,bi,bj) ) |
83 |
& + COSWAT * 0.5 _d 0 * ( |
84 |
& 0.5 _d 0*(uIce(I ,J ,1,bi,bj)-GWATX(I ,J ,bi,bj) |
85 |
& +uIce(I+1,J ,1,bi,bj)-GWATX(I+1,J ,bi,bj)) |
86 |
& +0.5 _d 0*(uIce(I ,J-1,1,bi,bj)-GWATX(I ,J-1,bi,bj) |
87 |
& +uIce(I+1,J-1,1,bi,bj)-GWATX(I+1,J-1,bi,bj)) ) |
88 |
& ) |
89 |
areaW = 0.5 _d 0 * (AREA(I,J,1,bi,bj) + AREA(I-1,J,1,bi,bj)) |
90 |
areaS = 0.5 _d 0 * (AREA(I,J,1,bi,bj) + AREA(I,J-1,1,bi,bj)) |
91 |
fu(I,J,bi,bj)=(ONE-areaW)*fu(I,J,bi,bj)+areaW*fuIce |
92 |
fv(I,J,bi,bj)=(ONE-areaS)*fv(I,J,bi,bj)+areaS*fvIce |
93 |
ENDDO |
94 |
ENDDO |
95 |
ENDDO |
96 |
ENDDO |
97 |
CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid) |
98 |
|
99 |
#endif /* not SEAICE_CGRID */ |
100 |
|
101 |
RETURN |
102 |
END |