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

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

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


Revision 1.25 - (show annotations) (download)
Tue Mar 6 16:45:20 2012 UTC (12 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63k, checkpoint65o, 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, HEAD
Changes since 1.24: +3 -3 lines
add SEAICE_SIZE.h anywhere SEAICE.h is included

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/ostres.F,v 1.24 2011/12/21 12:55:28 mlosch Exp $
2 C $Name: $
3
4 #include "SEAICE_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE ostres( COR_ICE, myThid )
8 C *==========================================================*
9 C | SUBROUTINE ostres |
10 C | o Calculate ocean surface stress |
11 C *==========================================================*
12 IMPLICIT NONE
13
14 C === Global variables ===
15 #include "SIZE.h"
16 #include "EEPARAMS.h"
17 #include "PARAMS.h"
18 #include "FFIELDS.h"
19 #include "SEAICE_SIZE.h"
20 #include "SEAICE_PARAMS.h"
21 #include "SEAICE.h"
22
23 C === Routine arguments ===
24 C myThid - Thread no. that called this routine.
25 _RL COR_ICE (1-OLx:sNx+OLx,1-OLy:sNy+OLy, nSx,nSy)
26 INTEGER myThid
27 CEndOfInterface
28
29 #ifndef SEAICE_CGRID
30 C === Local variables ===
31 C i,j,bi,bj - Loop counters
32
33 INTEGER i, j, bi, bj
34 _RL SINWIN, COSWIN, SINWAT, COSWAT
35 #ifdef SEAICE_BICE_STRESS
36 _RL fuIce, fvIce
37 #endif
38
39 c introduce turning angle (default is zero)
40 SINWIN=SIN(SEAICE_airTurnAngle*deg2rad)
41 COSWIN=COS(SEAICE_airTurnAngle*deg2rad)
42 SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad)
43 COSWAT=COS(SEAICE_waterTurnAngle*deg2rad)
44
45 C-- Update overlap regions
46 CALL EXCH_UV_XY_RL(WINDX, WINDY, .TRUE., myThid)
47
48 #ifndef SEAICE_EXTERNAL_FLUXES
49 C-- Interpolate wind stress (N/m^2) from South-West B-grid
50 C to South-West C-grid for forcing ocean model.
51 DO bj=myByLo(myThid),myByHi(myThid)
52 DO bi=myBxLo(myThid),myBxHi(myThid)
53 DO j=1,sNy
54 DO i=1,sNx
55 fu(I,J,bi,bj)=HALF
56 & *(WINDX(I,J+1,bi,bj)+WINDX(I,J,bi,bj))
57 fv(I,J,bi,bj)=HALF
58 & *(WINDY(I+1,J,bi,bj)+WINDY(I,J,bi,bj))
59 ENDDO
60 ENDDO
61 ENDDO
62 ENDDO
63 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
64 #endif /* ifndef SEAICE_EXTERNAL_FLUXES */
65
66 #ifdef SEAICE_BICE_STRESS
67 C-- Compute ice-affected wind stress
68 DO bj=myByLo(myThid),myByHi(myThid)
69 DO bi=myBxLo(myThid),myBxHi(myThid)
70 DO j=1,sNy
71 DO i=1,sNx
72 fuIce=QUART*( DWATN(I,J,bi,bj)+DWATN(I,J+1,bi,bj) )*(
73 & COSWAT *
74 & ( UICE(I,J, bi,bj)-GWATX(I,J, bi,bj)
75 & + UICE(I,J+1,bi,bj)-GWATX(I,J+1,bi,bj) )
76 & -SIGN(SINWAT,COR_ICE(I,J,bi,bj)) *
77 & ( VICE(I,J, bi,bj)-GWATY(I,J, bi,bj)
78 & + VICE(I,J+1,bi,bj)-GWATY(I,J+1,bi,bj) )
79 & )
80 fvIce=QUART*( DWATN(I,J,bi,bj)+DWATN(I+1,J,bi,bj) )*(
81 & SIGN(SINWAT,COR_ICE(I,J,bi,bj)) *
82 & ( UICE(I, J,bi,bj)-GWATX(I, J,bi,bj)
83 & + UICE(I+1,J,bi,bj)-GWATX(I+1,J,bi,bj) )
84 & + COSWAT *
85 & ( VICE(I, J,bi,bj)-GWATY(I, J,bi,bj)
86 & + VICE(I+1,J,bi,bj)-GWATY(I+1,J,bi,bj) )
87 & )
88 fu(I,J,bi,bj)=(ONE-AREA(I,J,bi,bj))*fu(I,J,bi,bj)+
89 & AREA(I,J,bi,bj)*fuIce
90 fv(I,J,bi,bj)=(ONE-AREA(I,J,bi,bj))*fv(I,J,bi,bj)+
91 & AREA(I,J,bi,bj)*fvIce
92 ENDDO
93 ENDDO
94 ENDDO
95 ENDDO
96 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
97 #endif /* SEAICE_BICE_STRESS */
98 #endif /* not SEAICE_CGRID */
99
100 RETURN
101 END

  ViewVC Help
Powered by ViewVC 1.1.22