1 | MODULE icedyn |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE icedyn *** |
---|
4 | !! Sea-Ice dynamics : master routine for sea ice dynamics |
---|
5 | !!====================================================================== |
---|
6 | !! history : 4.0 ! 2018 (C. Rousset) original code SI3 [aka Sea Ice cube] |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | #if defined key_si3 |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! 'key_si3' SI3 sea-ice model |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! ice_dyn : dynamics of sea ice |
---|
13 | !! ice_dyn_init : initialization and namelist read |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE phycst ! physical constants |
---|
16 | USE dom_oce ! ocean space and time domain |
---|
17 | USE ice ! sea-ice: variables |
---|
18 | USE icedyn_rhg ! sea-ice: rheology |
---|
19 | USE icedyn_adv ! sea-ice: advection |
---|
20 | USE icedyn_rdgrft ! sea-ice: ridging/rafting |
---|
21 | USE icecor ! sea-ice: corrections |
---|
22 | USE icevar ! sea-ice: operations |
---|
23 | ! |
---|
24 | USE in_out_manager ! I/O manager |
---|
25 | USE iom ! I/O manager library |
---|
26 | USE lib_mpp ! MPP library |
---|
27 | USE lib_fortran ! fortran utilities (glob_sum + no signed zero) |
---|
28 | USE lbclnk ! lateral boundary conditions (or mpp links) |
---|
29 | USE timing ! Timing |
---|
30 | |
---|
31 | IMPLICIT NONE |
---|
32 | PRIVATE |
---|
33 | |
---|
34 | PUBLIC ice_dyn ! called by icestp.F90 |
---|
35 | PUBLIC ice_dyn_init ! called by icestp.F90 |
---|
36 | |
---|
37 | INTEGER :: nice_dyn ! choice of the type of dynamics |
---|
38 | ! ! associated indices: |
---|
39 | INTEGER, PARAMETER :: np_dynFULL = 1 ! full ice dynamics (rheology + advection + ridging/rafting + correction) |
---|
40 | INTEGER, PARAMETER :: np_dynRHGADV = 2 ! pure dynamics (rheology + advection) |
---|
41 | INTEGER, PARAMETER :: np_dynADV = 3 ! only advection w prescribed vel.(rn_uvice + advection) |
---|
42 | ! |
---|
43 | ! ** namelist (namdyn) ** |
---|
44 | LOGICAL :: ln_dynFULL ! full ice dynamics (rheology + advection + ridging/rafting + correction) |
---|
45 | LOGICAL :: ln_dynRHGADV ! no ridge/raft & no corrections (rheology + advection) |
---|
46 | LOGICAL :: ln_dynADV ! only advection w prescribed vel.(rn_uvice + advection) |
---|
47 | REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV) |
---|
48 | REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV) |
---|
49 | |
---|
50 | !! * Substitutions |
---|
51 | # include "vectopt_loop_substitute.h90" |
---|
52 | !!---------------------------------------------------------------------- |
---|
53 | !! NEMO/ICE 4.0 , NEMO Consortium (2018) |
---|
54 | !! $Id: icedyn.F90 8378 2017-07-26 13:55:59Z clem $ |
---|
55 | !! Software governed by the CeCILL licence (./LICENSE) |
---|
56 | !!---------------------------------------------------------------------- |
---|
57 | CONTAINS |
---|
58 | |
---|
59 | SUBROUTINE ice_dyn( kt ) |
---|
60 | !!------------------------------------------------------------------- |
---|
61 | !! *** ROUTINE ice_dyn *** |
---|
62 | !! |
---|
63 | !! ** Purpose : this routine manages sea ice dynamics |
---|
64 | !! |
---|
65 | !! ** Action : - calculation of friction in case of landfast ice |
---|
66 | !! - call ice_dyn_rhg = rheology |
---|
67 | !! - call ice_dyn_adv = advection |
---|
68 | !! - call ice_dyn_rdgrft = ridging/rafting |
---|
69 | !! - call ice_cor = corrections if fields are out of bounds |
---|
70 | !!-------------------------------------------------------------------- |
---|
71 | INTEGER, INTENT(in) :: kt ! ice time step |
---|
72 | !! |
---|
73 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
74 | REAL(wp) :: zcoefu, zcoefv |
---|
75 | REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhmax |
---|
76 | REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zdivu_i |
---|
77 | !!-------------------------------------------------------------------- |
---|
78 | ! |
---|
79 | IF( ln_timing ) CALL timing_start('icedyn') |
---|
80 | ! |
---|
81 | IF( kt == nit000 .AND. lwp ) THEN |
---|
82 | WRITE(numout,*) |
---|
83 | WRITE(numout,*)'ice_dyn: sea-ice dynamics' |
---|
84 | WRITE(numout,*)'~~~~~~~' |
---|
85 | ENDIF |
---|
86 | |
---|
87 | ! |
---|
88 | IF( ln_landfast ) THEN !-- Landfast ice parameterization: define max bottom friction |
---|
89 | tau_icebfr(:,:) = 0._wp |
---|
90 | DO jl = 1, jpl |
---|
91 | WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr |
---|
92 | END DO |
---|
93 | IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr ) |
---|
94 | ENDIF |
---|
95 | |
---|
96 | zhmax(:,:,:) = h_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) |
---|
97 | DO jl = 1, jpl |
---|
98 | DO jj = 2, jpjm1 |
---|
99 | DO ji = 2, jpim1 |
---|
100 | !!gm use of MAXVAL here is very probably less efficient than expending the 9 values |
---|
101 | zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) ) |
---|
102 | END DO |
---|
103 | END DO |
---|
104 | END DO |
---|
105 | CALL lbc_lnk( zhmax(:,:,:), 'T', 1. ) |
---|
106 | ! |
---|
107 | ! |
---|
108 | SELECT CASE( nice_dyn ) !-- Set which dynamics is running |
---|
109 | |
---|
110 | CASE ( np_dynFULL ) !== all dynamical processes ==! |
---|
111 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
112 | CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness |
---|
113 | CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting |
---|
114 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
115 | |
---|
116 | CASE ( np_dynRHGADV ) !== no ridge/raft & no corrections ==! |
---|
117 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
118 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
119 | CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) |
---|
120 | |
---|
121 | CASE ( np_dynADV ) !== pure advection ==! (prescribed velocities) |
---|
122 | ALLOCATE( zdivu_i(jpi,jpj) ) |
---|
123 | |
---|
124 | u_ice(:,:) = rn_uice * umask(:,:,1) |
---|
125 | v_ice(:,:) = rn_vice * vmask(:,:,1) |
---|
126 | !CALL RANDOM_NUMBER(u_ice(:,:)) ; u_ice(:,:) = u_ice(:,:) * 0.1 + rn_uice * 0.9 * umask(:,:,1) |
---|
127 | !CALL RANDOM_NUMBER(v_ice(:,:)) ; v_ice(:,:) = v_ice(:,:) * 0.1 + rn_vice * 0.9 * vmask(:,:,1) |
---|
128 | ! --- monotonicity test from Lipscomb et al 2004 --- ! |
---|
129 | ! CFL = 0.5 at a distance from the bound of 1/6 of the basin length |
---|
130 | ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s |
---|
131 | !DO jj = 1, jpj |
---|
132 | ! DO ji = 1, jpi |
---|
133 | ! zcoefu = ( REAL(jpiglo+1)*0.5 - REAL(ji+nimpp-1) ) / ( REAL(jpiglo+1)*0.5 - 1. ) |
---|
134 | ! zcoefv = ( REAL(jpjglo+1)*0.5 - REAL(jj+njmpp-1) ) / ( REAL(jpjglo+1)*0.5 - 1. ) |
---|
135 | ! u_ice(ji,jj) = rn_uice * 1.5 * SIGN( 1., zcoefu ) * ABS( zcoefu ) * umask(ji,jj,1) |
---|
136 | ! v_ice(ji,jj) = rn_vice * 1.5 * SIGN( 1., zcoefv ) * ABS( zcoefv ) * vmask(ji,jj,1) |
---|
137 | ! END DO |
---|
138 | !END DO |
---|
139 | ! --- |
---|
140 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
141 | |
---|
142 | ! diagnostics: divergence at T points |
---|
143 | DO jj = 2, jpjm1 |
---|
144 | DO ji = 2, jpim1 |
---|
145 | zdivu_i(ji,jj) = ( e2u(ji,jj) * u_ice(ji,jj) - e2u(ji-1,jj) * u_ice(ji-1,jj) & |
---|
146 | & + e1v(ji,jj) * v_ice(ji,jj) - e1v(ji,jj-1) * v_ice(ji,jj-1) ) * r1_e1e2t(ji,jj) |
---|
147 | END DO |
---|
148 | END DO |
---|
149 | CALL lbc_lnk( zdivu_i, 'T', 1. ) |
---|
150 | IF( iom_use('icediv') ) CALL iom_put( "icediv" , zdivu_i(:,:) ) |
---|
151 | |
---|
152 | DEALLOCATE( zdivu_i ) |
---|
153 | |
---|
154 | END SELECT |
---|
155 | ! |
---|
156 | IF( ln_timing ) CALL timing_stop('icedyn') |
---|
157 | ! |
---|
158 | END SUBROUTINE ice_dyn |
---|
159 | |
---|
160 | |
---|
161 | SUBROUTINE Hbig( phmax ) |
---|
162 | !!------------------------------------------------------------------- |
---|
163 | !! *** ROUTINE Hbig *** |
---|
164 | !! |
---|
165 | !! ** Purpose : Thickness correction in case advection scheme creates |
---|
166 | !! abnormally tick ice |
---|
167 | !! |
---|
168 | !! ** Method : 1- check whether ice thickness resulting from advection is |
---|
169 | !! larger than the surrounding 9-points before advection |
---|
170 | !! and reduce it if a) divergence or b) convergence & at_i>0.8 |
---|
171 | !! 2- bound ice thickness with hi_max (99m) |
---|
172 | !! |
---|
173 | !! ** input : Max thickness of the surrounding 9-points |
---|
174 | !!------------------------------------------------------------------- |
---|
175 | REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phmax ! max ice thick from surrounding 9-pts |
---|
176 | ! |
---|
177 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
178 | REAL(wp) :: zh, zdv |
---|
179 | !!------------------------------------------------------------------- |
---|
180 | ! |
---|
181 | CALL ice_var_zapsmall !-- zap small areas |
---|
182 | ! |
---|
183 | DO jl = 1, jpl |
---|
184 | DO jj = 1, jpj |
---|
185 | DO ji = 1, jpi |
---|
186 | IF ( v_i(ji,jj,jl) > 0._wp ) THEN !-- bound to hmax |
---|
187 | ! |
---|
188 | zh = v_i (ji,jj,jl) / a_i(ji,jj,jl) |
---|
189 | zdv = v_i(ji,jj,jl) - v_i_b(ji,jj,jl) |
---|
190 | ! |
---|
191 | IF ( ( zdv > 0.0 .AND. zh > phmax(ji,jj,jl) .AND. at_i_b(ji,jj) < 0.80 ) .OR. & |
---|
192 | & ( zdv <= 0.0 .AND. zh > phmax(ji,jj,jl) ) ) THEN |
---|
193 | a_i (ji,jj,jl) = v_i(ji,jj,jl) / MIN( phmax(ji,jj,jl), hi_max(jpl) ) !-- bound h_i to hi_max (99 m) |
---|
194 | ENDIF |
---|
195 | ! |
---|
196 | ENDIF |
---|
197 | END DO |
---|
198 | END DO |
---|
199 | END DO |
---|
200 | ! !-- correct pond fraction to avoid a_ip > a_i |
---|
201 | WHERE( a_ip(:,:,:) > a_i(:,:,:) ) a_ip(:,:,:) = a_i(:,:,:) |
---|
202 | ! |
---|
203 | END SUBROUTINE Hbig |
---|
204 | |
---|
205 | |
---|
206 | SUBROUTINE Hpiling |
---|
207 | !!------------------------------------------------------------------- |
---|
208 | !! *** ROUTINE Hpiling *** |
---|
209 | !! |
---|
210 | !! ** Purpose : Simple conservative piling comparable with 1-cat models |
---|
211 | !! |
---|
212 | !! ** Method : pile-up ice when no ridging/rafting |
---|
213 | !! |
---|
214 | !! ** input : a_i |
---|
215 | !!------------------------------------------------------------------- |
---|
216 | INTEGER :: jl ! dummy loop indices |
---|
217 | !!------------------------------------------------------------------- |
---|
218 | ! |
---|
219 | CALL ice_var_zapsmall !-- zap small areas |
---|
220 | ! |
---|
221 | at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) |
---|
222 | DO jl = 1, jpl |
---|
223 | WHERE( at_i(:,:) > epsi20 ) |
---|
224 | a_i(:,:,jl) = a_i(:,:,jl) * ( 1._wp + MIN( rn_amax_2d(:,:) - at_i(:,:) , 0._wp ) / at_i(:,:) ) |
---|
225 | END WHERE |
---|
226 | END DO |
---|
227 | ! |
---|
228 | END SUBROUTINE Hpiling |
---|
229 | |
---|
230 | |
---|
231 | SUBROUTINE ice_dyn_init |
---|
232 | !!------------------------------------------------------------------- |
---|
233 | !! *** ROUTINE ice_dyn_init *** |
---|
234 | !! |
---|
235 | !! ** Purpose : Physical constants and parameters linked to the ice |
---|
236 | !! dynamics |
---|
237 | !! |
---|
238 | !! ** Method : Read the namdyn namelist and check the ice-dynamic |
---|
239 | !! parameter values called at the first timestep (nit000) |
---|
240 | !! |
---|
241 | !! ** input : Namelist namdyn |
---|
242 | !!------------------------------------------------------------------- |
---|
243 | INTEGER :: ios, ioptio ! Local integer output status for namelist read |
---|
244 | !! |
---|
245 | NAMELIST/namdyn/ ln_dynFULL, ln_dynRHGADV, ln_dynADV, rn_uice, rn_vice, & |
---|
246 | & rn_ishlat , & |
---|
247 | & ln_landfast, rn_gamma , rn_icebfr, rn_lfrelax |
---|
248 | !!------------------------------------------------------------------- |
---|
249 | ! |
---|
250 | REWIND( numnam_ice_ref ) ! Namelist namdyn in reference namelist : Ice dynamics |
---|
251 | READ ( numnam_ice_ref, namdyn, IOSTAT = ios, ERR = 901) |
---|
252 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn in reference namelist', lwp ) |
---|
253 | REWIND( numnam_ice_cfg ) ! Namelist namdyn in configuration namelist : Ice dynamics |
---|
254 | READ ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) |
---|
255 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn in configuration namelist', lwp ) |
---|
256 | IF(lwm) WRITE( numoni, namdyn ) |
---|
257 | ! |
---|
258 | IF(lwp) THEN ! control print |
---|
259 | WRITE(numout,*) |
---|
260 | WRITE(numout,*) 'ice_dyn_init: ice parameters for ice dynamics ' |
---|
261 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
262 | WRITE(numout,*) ' Namelist namdyn:' |
---|
263 | WRITE(numout,*) ' Full ice dynamics (rhg + adv + ridge/raft + corr) ln_dynFULL = ', ln_dynFULL |
---|
264 | WRITE(numout,*) ' No ridge/raft & No cor (rhg + adv) ln_dynRHGADV = ', ln_dynRHGADV |
---|
265 | WRITE(numout,*) ' Advection only (rn_uvice + adv) ln_dynADV = ', ln_dynADV |
---|
266 | WRITE(numout,*) ' with prescribed velocity given by (u,v)_ice = (rn_uice,rn_vice) = (', rn_uice,',', rn_vice,')' |
---|
267 | WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat |
---|
268 | WRITE(numout,*) ' Landfast: param (T or F) ln_landfast = ', ln_landfast |
---|
269 | WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_gamma = ', rn_gamma |
---|
270 | WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr |
---|
271 | WRITE(numout,*) ' relax time scale (s-1) to reach static friction rn_lfrelax = ', rn_lfrelax |
---|
272 | WRITE(numout,*) |
---|
273 | ENDIF |
---|
274 | ! !== set the choice of ice dynamics ==! |
---|
275 | ioptio = 0 |
---|
276 | ! !--- full dynamics (rheology + advection + ridging/rafting + correction) |
---|
277 | IF( ln_dynFULL ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynFULL ; ENDIF |
---|
278 | ! !--- dynamics without ridging/rafting and corr (rheology + advection) |
---|
279 | IF( ln_dynRHGADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynRHGADV ; ENDIF |
---|
280 | ! !--- advection only with prescribed ice velocities (from namelist) |
---|
281 | IF( ln_dynADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV ; ENDIF |
---|
282 | ! |
---|
283 | IF( ioptio /= 1 ) CALL ctl_stop( 'ice_dyn_init: one and only one ice dynamics option has to be defined ' ) |
---|
284 | ! |
---|
285 | ! !--- Lateral boundary conditions |
---|
286 | IF ( rn_ishlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral free-slip' |
---|
287 | ELSEIF ( rn_ishlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral no-slip' |
---|
288 | ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral partial-slip' |
---|
289 | ELSEIF ( 2. < rn_ishlat ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral strong-slip' |
---|
290 | ENDIF |
---|
291 | ! !--- NO Landfast ice : set to zero once for all |
---|
292 | IF( .NOT.ln_landfast ) tau_icebfr(:,:) = 0._wp |
---|
293 | ! |
---|
294 | CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters |
---|
295 | CALL ice_dyn_rhg_init ! set ice rheology parameters |
---|
296 | CALL ice_dyn_adv_init ! set ice advection parameters |
---|
297 | ! |
---|
298 | END SUBROUTINE ice_dyn_init |
---|
299 | |
---|
300 | #else |
---|
301 | !!---------------------------------------------------------------------- |
---|
302 | !! Default option Empty module NO SI3 sea-ice model |
---|
303 | !!---------------------------------------------------------------------- |
---|
304 | #endif |
---|
305 | |
---|
306 | !!====================================================================== |
---|
307 | END MODULE icedyn |
---|