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

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

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


Revision 1.3 - (show annotations) (download)
Mon Mar 6 20:53:25 2006 UTC (18 years, 3 months ago) by mlosch
Branch: MAIN
Changes since 1.2: +7 -54 lines
o fix ice-ocean stresses

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ocean_stress.F,v 1.2 2006/03/06 13:27:40 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
43 c introduce turning angle (default is zero)
44 SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad)
45 COSWAT=COS(SEAICE_waterTurnAngle*deg2rad)
46
47 C-- Update overlap regions
48 CALL EXCH_UV_XY_RL(WINDX, WINDY, .TRUE., myThid)
49
50 #ifndef SEAICE_EXTERNAL_FLUXES
51 C-- Interpolate wind stress (N/m^2) from C-points of C-grid
52 C to U and V points of C-grid for forcing the ocean model.
53 DO bj=myByLo(myThid),myByHi(myThid)
54 DO bi=myBxLo(myThid),myBxHi(myThid)
55 DO j=1,sNy
56 DO i=1,sNx
57 fu(I,J,bi,bj)=0.5*(WINDX(I,J,bi,bj) + WINDX(I-1,J,bi,bj))
58 fv(I,J,bi,bj)=0.5*(WINDY(I,J,bi,bj) + WINDY(I,J-1,bi,bj))
59 ENDDO
60 ENDDO
61 ENDDO
62 ENDDO
63 #endif /* ifndef SEAICE_EXTERNAL_FLUXES */
64
65 C-- Compute ice-affected wind stress (interpolate to U/V-points)
66 DO bj=myByLo(myThid),myByHi(myThid)
67 DO bi=myBxLo(myThid),myBxHi(myThid)
68 DO j=1,sNy
69 DO i=1,sNx
70 fuIce=HALF*( DWATN(I,J,bi,bj)+DWATN(I,J+1,bi,bj) )*(
71 & COSWAT *
72 & ( UICE(I,J,1,bi,bj)-GWATX(I,J,bi,bj) )
73 & - SINWAT* 0.5 _d 0 * (
74 & 0.5 _d 0*(vIce(I ,J ,1,bi,bj)-GWATY(I ,J ,bi,bj)
75 & +vIce(I-1,J ,1,bi,bj)-GWATY(I-1,J ,bi,bj))
76 & +0.5 _d 0*(vIce(I ,J+1,1,bi,bj)-GWATY(I ,J+1,bi,bj)
77 & +vIce(I-1,J+1,1,bi,bj)-GWATY(I-1,J+1,bi,bj)) )
78 & )
79 fvIce=HALF*( DWATN(I,J,bi,bj)+DWATN(I+1,J,bi,bj) )*(
80 & SINWAT *
81 & ( UICE(I,J,1,bi,bj)-GWATX(I,J,bi,bj) )
82 & + COSWAT * 0.5 _d 0 * (
83 & 0.5 _d 0*(uIce(I ,J ,1,bi,bj)-GWATX(I ,J ,bi,bj)
84 & +uIce(I+1,J ,1,bi,bj)-GWATX(I+1,J ,bi,bj))
85 & +0.5 _d 0*(uIce(I ,J-1,1,bi,bj)-GWATX(I ,J-1,bi,bj)
86 & +uIce(I+1,J-1,1,bi,bj)-GWATX(I+1,J-1,bi,bj)) )
87 & )
88 fu(I,J,bi,bj)=(ONE-AREA(I,J,1,bi,bj))*fu(I,J,bi,bj)+
89 & AREA(I,J,1,bi,bj)*fuIce
90 fv(I,J,bi,bj)=(ONE-AREA(I,J,1,bi,bj))*fv(I,J,bi,bj)+
91 & AREA(I,J,1,bi,bj)*fvIce
92 ENDDO
93 ENDDO
94 ENDDO
95 ENDDO
96 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
97
98 #endif /* not SEAICE_CGRID */
99
100 RETURN
101 END

  ViewVC Help
Powered by ViewVC 1.1.22