ROMS
Loading...
Searching...
No Matches
ice_evp_sig.F
Go to the documentation of this file.
1#include "cppdefs.h"
3
4#if defined ICE_MOMENTUM && defined ICE_EVP
5!
6!git $Id$
7!=======================================================================
8! Copyright (c) 2002-2025 The ROMS Group !
9! Licensed under a MIT/X style license W. Paul Budgell !
10! See License_ROMS.md Katherine Hedstrom !
11!================================================== Hernan G. Arango ===
12! !
13! This routine timesteps the EVP stresses term. !
14! !
15!=======================================================================
16!
17 USE mod_param
18 USE mod_boundary
19 USE mod_grid
20 USE mod_ice
21 USE mod_scalars
22!
24 USE ice_bc2d_mod, ONLY : ice_bc2d_tile
25# ifdef DISTRIBUTE
27# endif
28!
29 implicit none
30!
31 PRIVATE
32 PUBLIC :: ice_evp_sig
33!
34 CONTAINS
35!
36!***********************************************************************
37 SUBROUTINE ice_evp_sig (ng, tile, model)
38!***********************************************************************
39!
40 USE mod_stepping
41!
42! Imported variable declarations.
43!
44 integer, intent(in) :: ng, tile, model
45!
46! Local variable declarations.
47!
48 character (len=*), parameter :: MyFile = &
49 & __FILE__
50!
51# include "tile.h"
52!
53# ifdef PROFILE
54 CALL wclock_on (ng, model, 42, __line__, myfile)
55# endif
56 CALL ice_evp_sig_tile (ng, tile, model, &
57 & lbi, ubi, lbj, ubj, &
58 & imins, imaxs, jmins, jmaxs, &
59 & liold(ng), lieol(ng), lienw(ng), &
60 & grid(ng) % pm, &
61 & grid(ng) % pn, &
62 & ice(ng) % Fi, &
63 & ice(ng) % Si)
64# ifdef PROFILE
65 CALL wclock_off (ng, model, 42, __line__, myfile)
66# endif
67!
68 RETURN
69 END SUBROUTINE ice_evp_sig
70!
71!***********************************************************************
72 SUBROUTINE ice_evp_sig_tile (ng, tile, model, &
73 & LBi, UBi, LBj, UBj, &
74 & IminS, ImaxS, JminS, JmaxS, &
75 & liold, lieol, lienw, &
76 & pm, pn, &
77 & Fi, Si)
78!***********************************************************************
79!
80! Imported variable declarations.
81!
82 integer, intent(in) :: ng, tile, model
83 integer, intent(in) :: LBi, UBi, LBj, UBj
84 integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
85 integer, intent(in) :: liold, lieol, lienw
86!
87# ifdef ASSUMED_SHAPE
88 real(r8), intent(in) :: pm(LBi:,LBj:)
89 real(r8), intent(in) :: pn(LBi:,LBj:)
90 real(r8), intent(in) :: Fi(LBi:,LBj:,:)
91 real(r8), intent(inout) :: Si(LBi:,LBj:,:,:)
92# else
93 real(r8), intent(in) :: pm(LBi:UBi,LBj:UBj)
94 real(r8), intent(in) :: pn(LBi:UBi,LBj:UBj)
95 real(r8), intent(in) :: Fi(LBi:UBi,LBj:UBj,nIceF)
96 real(r8), intent(inout) :: Si(LBi:UBi,LBj:UBj,2,nIceS)
97# endif
98!
99! Local variable definitions.
100!
101 integer :: i, j
102!
103 real(r8) :: alfa, beta, cff, f1, f2, f3, f4, gamma
104 real(r8) :: E, E0, ee, ees, ep, epx, epy
105!
106 real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: eps_xx
107 real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: eps_xy
108 real(r8), dimension(IminS:ImaxS,JminS:JmaxS) :: eps_yy
109
110# include "set_bounds.h"
111!
112!-----------------------------------------------------------------------
113! Timestep internal ice stress tensor term.
114!-----------------------------------------------------------------------
115!
116! Initial value for Young modulus, E. It has values between 0 and 1,
117! and makes the elastic term small compared to other terms.
118!
119 e0=0.25_r8
120!
121! Comput stress tensor.
122!
123 DO j=jstr,jend
124 DO i=istr,iend
125 eps_xx(i,j)=(si(i+1,j,lieol,isuevp)- &
126 & si(i ,j,lieol,isuevp))*pm(i,j)
127 eps_yy(i,j)=(si(i,j+1,lieol,isvevp)- &
128 & si(i,j ,lieol,isvevp))*pn(i,j)
129 epx=0.25_r8*(si(i+1,j+1,lieol,isvevp)+ &
130 & si(i+1,j ,lieol,isvevp)- &
131 & si(i-1,j+1,lieol,isvevp)- &
132 & si(i-1,j ,lieol,isvevp))*pm(i,j)
133 epy=0.25_r8*(si(i+1,j+1,lieol,isuevp)+ &
134 & si(i ,j+1,lieol,isuevp)- &
135 & si(i+1,j-1,lieol,isuevp)- &
136 & si(i ,j-1,lieol,isuevp))*pn(i,j)
137 eps_xy(i,j)=0.5_r8*(epx+epy)
138 END DO
139 END DO
140!
141! Timestep internal ice stress tensor term. A split explicit scheme is
142! used with shorter steps (dts) to resolve the elastic wave velocity.
143!
144 DO j=jstr,jend
145 DO i=istr,iend
146 IF (si(i,j,liold,ishice).gt.0.01_r8) THEN
147 e =2.0_r8*e0*icerho(ng)*si(i,j,liold,ishice)/ &
148 & (pm(i,j)*dtevp(ng))**2
149 ep =e*fi(i,j,icpice)/(4.0_r8*fi(i,j,icbvis)+1.0e-8_r8)
150 ee =e/(2.0_r8*fi(i,j,icsvis)+1.0e-8_r8)
151 ees=e*(fi(i,j,icsvis)-fi(i,j,icbvis))/ &
152 & (4.0_r8*fi(i,j,icsvis)*fi(i,j,icbvis)+1.0e-8_r8)
153!
154 cff =1.0_r8/dtevp(ng)
155 alfa =cff+ee+ees
156 beta =ees
157 gamma=1.0_r8/dtevp(ng)+ee
158 f1=e*eps_xx(i,j)+cff*si(i,j,lieol,isisxx)-ep
159 f2=e*eps_yy(i,j)+cff*si(i,j,lieol,isisyy)-ep
160 f3=e*eps_xy(i,j)+cff*si(i,j,lieol,isisxy)
161 f4=1.0_r8/(alfa**2-beta**2)
162 si(i,j,lienw,isisxx)=f4*(alfa*f1-beta*f2)
163 si(i,j,lienw,isisxy)=f3/gamma
164 si(i,j,lienw,isisyy)=f4*(alfa*f2-beta*f1)
165 ELSE
166 si(i,j,lienw,isisxx)=2.0_r8*fi(i,j,icsvis)*eps_xx(i,j)+ &
167 & (fi(i,j,icbvis)-fi(i,j,icsvis))* &
168 & (eps_xx(i,j)+eps_yy(i,j))- &
169 & 0.5_r8*fi(i,j,icpice)
170 si(i,j,lienw,isisyy)=2.0_r8*fi(i,j,icsvis)*eps_yy(i,j)+ &
171 & (fi(i,j,icbvis)-fi(i,j,icsvis))* &
172 & (eps_xx(i,j)+eps_yy(i,j))- &
173 & 0.5_r8*fi(i,j,icpice)
174 si(i,j,lienw,isisxy)=2.0_r8*fi(i,j,icsvis)*eps_xy(i,j)
175 END IF
176 END DO
177 END DO
178!
179! Apply lateral boundary conditions.
180!
181 CALL ice_bc2d_tile (ng, tile, model, isisxx, &
182 & lbi, ubi, lbj, ubj, &
183 & imins, imaxs, jmins, jmaxs, &
184 & lieol, lienw, &
185 & si(:,:,:,isuevp), &
186 & si(:,:,:,isvevp), &
187 & si(:,:,:,isisxx), &
188 & lbc(:,ibice(isisxx),ng))
189
190 CALL ice_bc2d_tile (ng, tile, model, isisxy, &
191 & lbi, ubi, lbj, ubj, &
192 & imins, imaxs, jmins, jmaxs, &
193 & lieol, lienw, &
194 & si(:,:,:,isuevp), &
195 & si(:,:,:,isvevp), &
196 & si(:,:,:,isisxy), &
197 & lbc(:,ibice(isisxy),ng))
198
199 CALL ice_bc2d_tile (ng, tile, model, isisyy, &
200 & lbi, ubi, lbj, ubj, &
201 & imins, imaxs, jmins, jmaxs, &
202 & lieol, lienw, &
203 & si(:,:,:,isuevp), &
204 & si(:,:,:,isvevp), &
205 & si(:,:,:,isisyy), &
206 & lbc(:,ibice(isisyy),ng))
207!
208 IF (ewperiodic(ng).or.nsperiodic(ng)) THEN
209 CALL exchange_r2d_tile (ng, tile, &
210 & lbi, ubi, lbj, ubj, &
211 & si(:,:,lienw,isisxx))
212
213 CALL exchange_r2d_tile (ng, tile, &
214 & lbi, ubi, lbj, ubj, &
215 & si(:,:,lienw,isisxy))
216
217 CALL exchange_r2d_tile (ng, tile, &
218 & lbi, ubi, lbj, ubj, &
219 & si(:,:,lienw,isisyy))
220 END IF
221
222# ifdef DISTRIBUTE
223!
224 CALL mp_exchange2d (ng, tile, model, 3, &
225 & lbi, ubi, lbj, ubj, &
226 & nghostpoints, ewperiodic(ng), nsperiodic(ng), &
227 & si(:,:,lienw,isisxx), &
228 & si(:,:,lienw,isisxy), &
229 & si(:,:,lienw,isisyy))
230# endif
231!
232 RETURN
233 END SUBROUTINE ice_evp_sig_tile
234#endif
235 END MODULE ice_evp_sig_mod
subroutine exchange_r2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
type(t_grid), dimension(:), allocatable grid
Definition mod_grid.F:365
integer, parameter icpice
Definition ice_mod.h:181
integer, dimension(:), allocatable dtevp
Definition ice_mod.h:218
integer, parameter icsvis
Definition ice_mod.h:184
integer, parameter icbvis
Definition ice_mod.h:173
integer, parameter isisxx
Definition ice_mod.h:142
real(r8), dimension(:), allocatable icerho
Definition ice_mod.h:223
type(t_ice), dimension(:), allocatable ice
Definition ice_mod.h:283
integer, dimension(nices) ibice
Definition ice_mod.h:162
integer, parameter isisxy
Definition ice_mod.h:143
integer, parameter isuevp
Definition ice_mod.h:150
integer, parameter isvevp
Definition ice_mod.h:151
integer, parameter ishice
Definition ice_mod.h:138
integer, parameter isisyy
Definition ice_mod.h:144
integer nghostpoints
Definition mod_param.F:710
type(t_lbc), dimension(:,:,:), allocatable lbc
Definition mod_param.F:375
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
subroutine mp_exchange2d(ng, tile, model, nvar, lbi, ubi, lbj, ubj, nghost, ew_periodic, ns_periodic, a, b, c, d)
recursive subroutine wclock_off(ng, model, region, line, routine)
Definition timers.F:148
recursive subroutine wclock_on(ng, model, region, line, routine)
Definition timers.F:3