/[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.30 - (hide annotations) (download)
Tue Mar 6 16:45:20 2012 UTC (12 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63k, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.29: +6 -5 lines
add SEAICE_SIZE.h anywhere SEAICE.h is included

1 jmc 1.30 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_ocean_stress.F,v 1.29 2010/11/24 15:51:05 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 jmc 1.30 C *==========================================================*
10 mlosch 1.1 C | SUBROUTINE SEAICE_OCEAN_STRESS |
11     C | o Calculate ocean surface stresses |
12     C | - C-grid version |
13 jmc 1.30 C *==========================================================*
14     C *==========================================================*
15 mlosch 1.1 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 jmc 1.30 #include "SEAICE_SIZE.h"
25     #include "SEAICE_PARAMS.h"
26 mlosch 1.1 #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 jmc 1.19 #ifdef SEAICE_CGRID
38 mlosch 1.1 C === Local variables ===
39     C i,j,bi,bj - Loop counters
40 mlosch 1.26 C kSrf - vertical index of surface layer
41 mlosch 1.1 INTEGER i, j, bi, bj
42 mlosch 1.26 INTEGER kSrf
43 jmc 1.27 _RL COSWAT
44     _RS SINWAT
45 mlosch 1.24 _RL fuIceLoc, fvIceLoc
46 mlosch 1.4 _RL areaW, areaS
47 mlosch 1.1
48 mlosch 1.26 C surrface level
49     kSrf = 1
50     C introduce turning angle (default is zero)
51 mlosch 1.1 SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad)
52     COSWAT=COS(SEAICE_waterTurnAngle*deg2rad)
53    
54 mlosch 1.5 IF ( useHB87StressCoupling ) THEN
55     C
56 jmc 1.19 C use an intergral over ice and ocean surface layer to define
57 mlosch 1.5 C surface stresses on ocean following Hibler and Bryan (1987, JPO)
58 jmc 1.19 C
59 mlosch 1.5 DO bj=myByLo(myThid),myByHi(myThid)
60     DO bi=myBxLo(myThid),myBxHi(myThid)
61 mlosch 1.24 DO J=1,sNy
62     DO I=1,sNx
63 jmc 1.19 C average wind stress over ice and ocean and apply averaged wind
64 mlosch 1.14 C stress and internal ice stresses to surface layer of ocean
65 mlosch 1.25 areaW = 0.5 * (AREA(I,J,bi,bj) + AREA(I-1,J,bi,bj))
66 mlosch 1.24 & * 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 mlosch 1.28 ENDDO
71     ENDDO
72 mlosch 1.29 C This loop separation makes the adjoint code vectorize
73 mlosch 1.28 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 mlosch 1.24 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 mlosch 1.14 ENDDO
81 mlosch 1.24 ENDDO
82 mlosch 1.5 ENDDO
83     ENDDO
84 jmc 1.17
85 mlosch 1.5 ELSE
86 jmc 1.17 C else: useHB87StressCoupling=F
87 mlosch 1.5
88 jmc 1.19 C-- Compute ice-affected wind stress (interpolate to U/V-points)
89     C by averaging wind stress and ice-ocean stress according to
90 mlosch 1.5 C ice cover
91 mlosch 1.1 DO bj=myByLo(myThid),myByHi(myThid)
92     DO bi=myBxLo(myThid),myBxHi(myThid)
93     DO j=1,sNy
94     DO i=1,sNx
95 mlosch 1.18 fuIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I-1,J,bi,bj) )*
96 jmc 1.19 & COSWAT *
97 mlosch 1.26 & ( uIce(I,J,bi,bj)-uVel(I,J,kSrf,bi,bj) )
98 jmc 1.19 & - SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 *
99 mlosch 1.6 & ( DWATN(I ,J,bi,bj) *
100 mlosch 1.26 & 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 mlosch 1.6 & + DWATN(I-1,J,bi,bj) *
103 mlosch 1.26 & 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 mlosch 1.1 & )
106 mlosch 1.18 fvIceLoc=HALF*( DWATN(I,J,bi,bj)+DWATN(I,J-1,bi,bj) )*
107 mlosch 1.6 & COSWAT *
108 mlosch 1.26 & ( vIce(I,J,bi,bj)-vVel(I,J,kSrf,bi,bj) )
109 mlosch 1.6 & + SIGN(SINWAT, _fCori(I,J,bi,bj)) * 0.5 _d 0 *
110     & ( DWATN(I,J ,bi,bj) *
111 mlosch 1.26 & 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 mlosch 1.6 & + DWATN(I,J-1,bi,bj) *
114 mlosch 1.26 & 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 mlosch 1.1 & )
117 mlosch 1.25 areaW = 0.5 _d 0 * (AREA(I,J,bi,bj) + AREA(I-1,J,bi,bj))
118 mlosch 1.9 & * SEAICEstressFactor
119 mlosch 1.25 areaS = 0.5 _d 0 * (AREA(I,J,bi,bj) + AREA(I,J-1,bi,bj))
120 mlosch 1.9 & * SEAICEstressFactor
121 mlosch 1.11 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 mlosch 1.1 ENDDO
124     ENDDO
125     ENDDO
126     ENDDO
127 mlosch 1.5 ENDIF
128 mlosch 1.1 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
129 mlosch 1.3
130 jmc 1.17 #endif /* SEAICE_CGRID */
131 mlosch 1.1
132     RETURN
133     END

  ViewVC Help
Powered by ViewVC 1.1.22