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

Annotation of /MITgcm/pkg/seaice/seaice_calc_strainrates.F

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


Revision 1.9 - (hide annotations) (download)
Wed Nov 14 15:55:48 2007 UTC (17 years, 7 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59k, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61j, checkpoint61h, checkpoint61i
Changes since 1.8: +19 -17 lines
fix bug in seaice_ocean_stress (call of seaice_calc_strainrates),
requires change of parameter list of seaice_calc_strainrates

1 mlosch 1.9 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_calc_strainrates.F,v 1.8 2007/11/13 19:26:25 jmc Exp $
2 mlosch 1.1 C $Name: $
3    
4     #include "SEAICE_OPTIONS.h"
5    
6     CStartOfInterface
7 jmc 1.8 SUBROUTINE SEAICE_CALC_STRAINRATES(
8 mlosch 1.1 I uFld, vFld,
9     O e11, e22, e12,
10 mlosch 1.9 I kSize, iStep, myTime, myIter, myThid )
11 mlosch 1.1 C /==========================================================\
12     C | SUBROUTINE SEAICE_CALC_STRAINRATES |
13     C | o compute strain rates from ice velocities |
14     C |==========================================================|
15     C | written by Martin Losch, Apr 2007 |
16     C \==========================================================/
17     IMPLICIT NONE
18    
19     C === Global variables ===
20     #include "SIZE.h"
21     #include "EEPARAMS.h"
22     #include "PARAMS.h"
23     #include "GRID.h"
24     #include "SEAICE_PARAMS.h"
25    
26     #ifdef ALLOW_AUTODIFF_TAMC
27     # include "tamc.h"
28     #endif
29    
30     C === Routine arguments ===
31 jmc 1.8 C iStep :: Sub-time-step number
32     C myTime :: Simulation time
33     C myIter :: Simulation timestep number
34     C myThid :: My Thread Id. number
35 mlosch 1.9 C kSize :: length of 3rd dimension of velocity variables
36 jmc 1.8 INTEGER iStep
37     _RL myTime
38     INTEGER myIter
39 mlosch 1.1 INTEGER myThid
40 mlosch 1.9 INTEGER kSize
41 mlosch 1.1 C ice velocities
42 mlosch 1.9 _RL uFld(1-Olx:sNx+Olx,1-Oly:sNy+Oly,kSize,nSx,nSy)
43     _RL vFld(1-Olx:sNx+Olx,1-Oly:sNy+Oly,kSize,nSx,nSy)
44 mlosch 1.1 C strain rate tensor
45     _RL e11 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
46     _RL e22 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
47     _RL e12 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
48     CEndOfInterface
49    
50     #ifdef SEAICE_CGRID
51     #ifdef SEAICE_ALLOW_DYNAMICS
52     C === Local variables ===
53     C i,j,bi,bj - Loop counters
54     INTEGER i, j, bi, bj
55 mlosch 1.2 C hFacU, hFacV - determine the no-slip boundary condition
56     INTEGER k
57     _RS hFacU, hFacV
58    
59 mlosch 1.4 k = 1
60 mlosch 1.1 C
61     DO bj=myByLo(myThid),myByHi(myThid)
62     DO bi=myBxLo(myThid),myBxHi(myThid)
63 mlosch 1.5 DO j=1-Oly,sNy+Oly-1
64     DO i=1-Olx,sNx+Olx-1
65     C evaluate strain rates
66 mlosch 1.6 e11(I,J,bi,bj) = _recip_dxF(I,J,bi,bj) *
67 mlosch 1.9 & (uFld(I+1,J,1,bi,bj)-uFld(I,J,1,bi,bj))
68 mlosch 1.1 & -HALF*
69 mlosch 1.9 & (vFld(I,J,1,bi,bj)+vFld(I,J+1,1,bi,bj))
70 mlosch 1.1 & * _tanPhiAtU(I,J,bi,bj)*recip_rSphere
71 mlosch 1.6 e22(I,J,bi,bj) = _recip_dyF(I,J,bi,bj) *
72 mlosch 1.9 & (vFld(I,J+1,1,bi,bj)-vFld(I,J,1,bi,bj))
73 mlosch 1.1 C one metric term is missing
74 mlosch 1.5 ENDDO
75     ENDDO
76     DO j=1-Oly+1,sNy+Oly
77     DO i=1-Olx+1,sNx+Olx
78 mlosch 1.6 e12(I,J,bi,bj) = HALF*(
79 mlosch 1.9 & (uFld(I ,J ,1,bi,bj) * _dxC(I ,J ,bi,bj)
80     & -uFld(I ,J-1,1,bi,bj) * _dxC(I ,J-1,bi,bj)
81     & +vFld(I ,J ,1,bi,bj) * _dyC(I ,J ,bi,bj)
82     & -vFld(I-1,J ,1,bi,bj) * _dyC(I-1,J ,bi,bj))
83 mlosch 1.1 & * recip_rAz(I,J,bi,bj)
84     & +
85 mlosch 1.9 & 0.25 _d 0 * (uFld(I,J,1,bi,bj)+uFld(I ,J-1,1,bi,bj))
86 mlosch 1.1 & * ( _tanPhiAtU(I,J,bi,bj) + _tanPhiAtU(I,J-1,bi,bj) )
87     & *recip_rSphere
88     & )
89 mlosch 1.4 & *maskC(I ,J ,k,bi,bj)*maskC(I-1,J ,k,bi,bj)
90     & *maskC(I ,J-1,k,bi,bj)*maskC(I-1,J-1,k,bi,bj)
91 mlosch 1.1 C one metric term is missing
92     ENDDO
93     ENDDO
94 mlosch 1.2 IF ( SEAICE_no_slip ) THEN
95 mlosch 1.3 C no slip boundary conditions apply only to e12
96 mlosch 1.5 DO j=1-Oly+1,sNy+Oly
97     DO i=1-Olx+1,sNx+Olx
98 mlosch 1.2 hFacU = _maskW(i,j,k,bi,bj) - _maskW(i,j-1,k,bi,bj)
99     hFacV = _maskS(i,j,k,bi,bj) - _maskS(i-1,j,k,bi,bj)
100    
101 mlosch 1.6 e12(I,J,bi,bj) = e12(I,J,bi,bj)
102 jmc 1.8 & + recip_rAz(i,j,bi,bj) *
103 mlosch 1.9 & ( hFacU * ( _dxC(i,j-1,bi,bj)*uFld(i,j ,1,bi,bj)
104     & + _dxC(i,j, bi,bj)*uFld(i,j-1,1,bi,bj) )
105     & + hFacV * ( _dyC(i-1,j,bi,bj)*vFld(i ,j,1,bi,bj)
106     & + _dyC(i, j,bi,bj)*vFld(i-1,j,1,bi,bj) ) )
107 jmc 1.8 & - hFacU
108 mlosch 1.9 & * 0.25 _d 0 * (uFld(I,J,1,bi,bj)+uFld(I ,J-1,1,bi,bj))
109 mlosch 1.2 & * ( _tanPhiAtU(I,J,bi,bj) + _tanPhiAtU(I,J-1,bi,bj) )
110     & *recip_rSphere
111     C one metric term is missing
112     ENDDO
113     ENDDO
114    
115     ENDIF
116 mlosch 1.1 ENDDO
117     ENDDO
118     #endif /* SEAICE_ALLOW_DYNAMICS */
119     #endif /* SEAICE_CGRID */
120     RETURN
121     END

  ViewVC Help
Powered by ViewVC 1.1.22