1 | MODULE icedyn |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE icedyn *** |
---|
4 | !! Sea-Ice dynamics : master routine for sea ice dynamics |
---|
5 | !!====================================================================== |
---|
6 | !! history : 4.0 ! 2017-09 (C. Rousset) original code |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | #if defined key_lim3 |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! 'key_lim3' ESIM 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_dynRHGADV1 = 2 ! no ridging/rafting (rheology + advection + correction) |
---|
41 | INTEGER, PARAMETER :: np_dynRHGADV2 = 3 ! pure dynamics (rheology + advection) |
---|
42 | INTEGER, PARAMETER :: np_dynADV = 4 ! only advection w prescribed vel.(rn_uvice + advection) |
---|
43 | ! |
---|
44 | ! ** namelist (namdyn) ** |
---|
45 | LOGICAL :: ln_dynFULL ! full ice dynamics (rheology + advection + ridging/rafting + correction) |
---|
46 | LOGICAL :: ln_dynRHGADV ! no ridge/raft & no corrections (rheology + advection) |
---|
47 | LOGICAL :: ln_dynADV ! only advection w prescribed vel.(rn_uvice + advection) |
---|
48 | REAL(wp) :: rn_uice ! prescribed u-vel (case np_dynADV) |
---|
49 | REAL(wp) :: rn_vice ! prescribed v-vel (case np_dynADV) |
---|
50 | |
---|
51 | !! * Substitutions |
---|
52 | # include "vectopt_loop_substitute.h90" |
---|
53 | !!---------------------------------------------------------------------- |
---|
54 | !! NEMO/ICE 4.0 , NEMO Consortium (2017) |
---|
55 | !! $Id: icedyn.F90 8378 2017-07-26 13:55:59Z clem $ |
---|
56 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
57 | !!---------------------------------------------------------------------- |
---|
58 | CONTAINS |
---|
59 | |
---|
60 | SUBROUTINE ice_dyn( kt ) |
---|
61 | !!------------------------------------------------------------------- |
---|
62 | !! *** ROUTINE ice_dyn *** |
---|
63 | !! |
---|
64 | !! ** Purpose : this routine manages sea ice dynamics |
---|
65 | !! |
---|
66 | !! ** Action : - Initialisation of some variables |
---|
67 | !! - call ice_rhg |
---|
68 | !!-------------------------------------------------------------------- |
---|
69 | INTEGER, INTENT(in) :: kt ! ice time step |
---|
70 | !! |
---|
71 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
72 | REAL(wp), DIMENSION(jpi,jpj,jpl) :: zhmax |
---|
73 | !!-------------------------------------------------------------------- |
---|
74 | ! |
---|
75 | IF( nn_timing == 1 ) CALL timing_start('icedyn') |
---|
76 | ! |
---|
77 | IF( kt == nit000 .AND. lwp ) THEN |
---|
78 | WRITE(numout,*) |
---|
79 | WRITE(numout,*)'ice_dyn: sea-ice dynamics' |
---|
80 | WRITE(numout,*)'~~~~~~~' |
---|
81 | ENDIF |
---|
82 | |
---|
83 | ! |
---|
84 | IF( ln_landfast ) THEN !-- Landfast ice parameterization: define max bottom friction |
---|
85 | tau_icebfr(:,:) = 0._wp |
---|
86 | DO jl = 1, jpl |
---|
87 | WHERE( h_i(:,:,jl) > ht_n(:,:) * rn_gamma ) tau_icebfr(:,:) = tau_icebfr(:,:) + a_i(:,:,jl) * rn_icebfr |
---|
88 | END DO |
---|
89 | IF( iom_use('tau_icebfr') ) CALL iom_put( 'tau_icebfr', tau_icebfr ) |
---|
90 | ENDIF |
---|
91 | |
---|
92 | zhmax(:,:,:) = h_i_b(:,:,:) !-- Record max of the surrounding 9-pts ice thick. (for CALL Hbig) |
---|
93 | DO jl = 1, jpl |
---|
94 | DO jj = 2, jpjm1 |
---|
95 | DO ji = 2, jpim1 |
---|
96 | !!gm use of MAXVAL here is very probably less efficient than expending the 9 values |
---|
97 | zhmax(ji,jj,jl) = MAX( epsi20, MAXVAL( h_i_b(ji-1:ji+1,jj-1:jj+1,jl) ) ) |
---|
98 | END DO |
---|
99 | END DO |
---|
100 | END DO |
---|
101 | CALL lbc_lnk( zhmax(:,:,:), 'T', 1. ) |
---|
102 | ! |
---|
103 | ! |
---|
104 | SELECT CASE( nice_dyn ) !-- Set which dynamics is running |
---|
105 | |
---|
106 | CASE ( np_dynFULL ) !== all dynamical processes ==! |
---|
107 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
108 | CALL ice_dyn_adv ( kt ) ; CALL Hbig( zhmax ) ! -- advection of ice + correction on ice thickness |
---|
109 | CALL ice_dyn_rdgrft( kt ) ! -- ridging/rafting |
---|
110 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
111 | |
---|
112 | CASE ( np_dynRHGADV1 ) !== no ridge/raft ==! (mono cat. case 2) |
---|
113 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
114 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
115 | CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) |
---|
116 | CALL ice_cor ( kt , 1 ) ! -- Corrections |
---|
117 | |
---|
118 | CASE ( np_dynRHGADV2 ) !== no ridge/raft & no corrections ==! |
---|
119 | CALL ice_dyn_rhg ( kt ) ! -- rheology |
---|
120 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
121 | CALL Hpiling ! -- simple pile-up (replaces ridging/rafting) |
---|
122 | |
---|
123 | CASE ( np_dynADV ) !== pure advection ==! (prescribed velocities) |
---|
124 | u_ice(:,:) = rn_uice * umask(:,:,1) |
---|
125 | v_ice(:,:) = rn_vice * vmask(:,:,1) |
---|
126 | !!CALL RANDOM_NUMBER(u_ice(:,:)) |
---|
127 | !!CALL RANDOM_NUMBER(v_ice(:,:)) |
---|
128 | CALL ice_dyn_adv ( kt ) ! -- advection of ice |
---|
129 | |
---|
130 | END SELECT |
---|
131 | ! |
---|
132 | IF( nn_timing == 1 ) CALL timing_stop('icedyn') |
---|
133 | ! |
---|
134 | END SUBROUTINE ice_dyn |
---|
135 | |
---|
136 | SUBROUTINE Hbig( phmax ) |
---|
137 | !!------------------------------------------------------------------- |
---|
138 | !! *** ROUTINE Hbig *** |
---|
139 | !! |
---|
140 | !! ** Purpose : Thickness correction in case advection scheme creates |
---|
141 | !! abnormally tick ice |
---|
142 | !! |
---|
143 | !! ** Method : 1- check whether ice thickness resulting from advection is |
---|
144 | !! larger than the surrounding 9-points before advection |
---|
145 | !! and reduce it if a) divergence or b) convergence & at_i>0.8 |
---|
146 | !! 2- bound ice thickness with hi_max (99m) |
---|
147 | !! |
---|
148 | !! ** input : Max thickness of the surrounding 9-points |
---|
149 | !!------------------------------------------------------------------- |
---|
150 | REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phmax ! max ice thick from surrounding 9-pts |
---|
151 | ! |
---|
152 | INTEGER :: ji, jj, jl ! dummy loop indices |
---|
153 | REAL(wp) :: zh, zdv |
---|
154 | !!------------------------------------------------------------------- |
---|
155 | ! |
---|
156 | CALL ice_var_zapsmall !-- zap small areas |
---|
157 | ! |
---|
158 | DO jl = 1, jpl |
---|
159 | DO jj = 1, jpj |
---|
160 | DO ji = 1, jpi |
---|
161 | IF ( v_i(ji,jj,jl) > 0._wp ) THEN !-- bound to hmax |
---|
162 | ! |
---|
163 | zh = v_i (ji,jj,jl) / a_i(ji,jj,jl) |
---|
164 | zdv = v_i(ji,jj,jl) - v_i_b(ji,jj,jl) |
---|
165 | ! |
---|
166 | IF ( ( zdv > 0.0 .AND. zh > phmax(ji,jj,jl) .AND. at_i_b(ji,jj) < 0.80 ) .OR. & |
---|
167 | & ( zdv <= 0.0 .AND. zh > phmax(ji,jj,jl) ) ) THEN |
---|
168 | 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) |
---|
169 | ENDIF |
---|
170 | ! |
---|
171 | ENDIF |
---|
172 | END DO |
---|
173 | END DO |
---|
174 | END DO |
---|
175 | ! !-- correct pond fraction to avoid a_ip > a_i |
---|
176 | WHERE( a_ip(:,:,:) > a_i(:,:,:) ) a_ip(:,:,:) = a_i(:,:,:) |
---|
177 | ! |
---|
178 | END SUBROUTINE Hbig |
---|
179 | |
---|
180 | SUBROUTINE Hpiling |
---|
181 | !!------------------------------------------------------------------- |
---|
182 | !! *** ROUTINE Hpiling *** |
---|
183 | !! |
---|
184 | !! ** Purpose : Simple conservative piling comparable with 1-cat models |
---|
185 | !! |
---|
186 | !! ** Method : pile-up ice when no ridging/rafting |
---|
187 | !! |
---|
188 | !! ** input : a_i |
---|
189 | !!------------------------------------------------------------------- |
---|
190 | INTEGER :: jl ! dummy loop indices |
---|
191 | !!------------------------------------------------------------------- |
---|
192 | ! |
---|
193 | CALL ice_var_zapsmall !-- zap small areas |
---|
194 | ! |
---|
195 | at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) |
---|
196 | DO jl = 1, jpl |
---|
197 | WHERE( at_i(:,:) > epsi20 ) |
---|
198 | a_i(:,:,jl) = a_i(:,:,jl) * ( 1._wp + MIN( rn_amax_2d(:,:) - at_i(:,:) , 0._wp ) / at_i(:,:) ) |
---|
199 | END WHERE |
---|
200 | END DO |
---|
201 | ! |
---|
202 | END SUBROUTINE Hpiling |
---|
203 | |
---|
204 | |
---|
205 | SUBROUTINE ice_dyn_init |
---|
206 | !!------------------------------------------------------------------- |
---|
207 | !! *** ROUTINE ice_dyn_init *** |
---|
208 | !! |
---|
209 | !! ** Purpose : Physical constants and parameters linked to the ice |
---|
210 | !! dynamics |
---|
211 | !! |
---|
212 | !! ** Method : Read the namdyn namelist and check the ice-dynamic |
---|
213 | !! parameter values called at the first timestep (nit000) |
---|
214 | !! |
---|
215 | !! ** input : Namelist namdyn |
---|
216 | !!------------------------------------------------------------------- |
---|
217 | INTEGER :: ios, ioptio ! Local integer output status for namelist read |
---|
218 | !! |
---|
219 | NAMELIST/namdyn/ ln_dynFULL, ln_dynRHGADV, ln_dynADV, rn_uice, rn_vice, & |
---|
220 | & rn_ishlat , & |
---|
221 | & ln_landfast, rn_gamma , rn_icebfr, rn_lfrelax |
---|
222 | !!------------------------------------------------------------------- |
---|
223 | ! |
---|
224 | REWIND( numnam_ice_ref ) ! Namelist namdyn in reference namelist : Ice dynamics |
---|
225 | READ ( numnam_ice_ref, namdyn, IOSTAT = ios, ERR = 901) |
---|
226 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn in reference namelist', lwp ) |
---|
227 | ! |
---|
228 | REWIND( numnam_ice_cfg ) ! Namelist namdyn in configuration namelist : Ice dynamics |
---|
229 | READ ( numnam_ice_cfg, namdyn, IOSTAT = ios, ERR = 902 ) |
---|
230 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn in configuration namelist', lwp ) |
---|
231 | IF(lwm) WRITE ( numoni, namdyn ) |
---|
232 | ! |
---|
233 | IF(lwp) THEN ! control print |
---|
234 | WRITE(numout,*) |
---|
235 | WRITE(numout,*) 'ice_dyn_init: ice parameters for ice dynamics ' |
---|
236 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
237 | WRITE(numout,*) ' Namelist namdyn:' |
---|
238 | WRITE(numout,*) ' Full ice dynamics (rhg + adv + ridge/raft + corr) ln_dynFULL = ', ln_dynFULL |
---|
239 | WRITE(numout,*) ' No ridge/raft & No cor (rhg + adv) ln_dynRHGADV = ', ln_dynRHGADV |
---|
240 | WRITE(numout,*) ' Advection only (rn_uvice + adv) ln_dynADV = ', ln_dynADV |
---|
241 | WRITE(numout,*) ' with prescribed velocity given by ' |
---|
242 | WRITE(numout,*) ' a uniform field (u,v)_ice = (rn_uice,rn_vice) = (', rn_uice,',', rn_vice,')' |
---|
243 | WRITE(numout,*) ' lateral boundary condition for sea ice dynamics rn_ishlat = ', rn_ishlat |
---|
244 | WRITE(numout,*) ' Landfast: param (T or F) ln_landfast = ', ln_landfast |
---|
245 | WRITE(numout,*) ' fraction of ocean depth that ice must reach rn_gamma = ', rn_gamma |
---|
246 | WRITE(numout,*) ' maximum bottom stress per unit area of contact rn_icebfr = ', rn_icebfr |
---|
247 | WRITE(numout,*) ' relax time scale (s-1) to reach static friction rn_lfrelax = ', rn_lfrelax |
---|
248 | ENDIF |
---|
249 | ! !== set the choice of ice dynamics ==! |
---|
250 | ioptio = 0 |
---|
251 | ! !--- full dynamics (rheology + advection + ridging/rafting + correction) |
---|
252 | IF( ln_dynFULL .AND. nn_monocat /= 2 ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynFULL ; ENDIF |
---|
253 | ! !--- dynamics without ridging/rafting (rheology + advection + correction) |
---|
254 | IF( ln_dynFULL .AND. nn_monocat == 2 ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynRHGADV1 ; ENDIF |
---|
255 | ! !--- dynamics without ridging/rafting and corr (rheology + advection) |
---|
256 | IF( ln_dynRHGADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynRHGADV2 ; ENDIF |
---|
257 | ! !--- advection only with prescribed ice velocities (from namelist) |
---|
258 | IF( ln_dynADV ) THEN ; ioptio = ioptio + 1 ; nice_dyn = np_dynADV ; ENDIF |
---|
259 | ! |
---|
260 | IF( ioptio /= 1 ) CALL ctl_stop( 'ice_dyn_init: one and only one ice dynamics option has to be defined ' ) |
---|
261 | ! |
---|
262 | ! !--- Lateral boundary conditions |
---|
263 | IF ( rn_ishlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral free-slip' |
---|
264 | ELSEIF ( rn_ishlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral no-slip' |
---|
265 | ELSEIF ( 0. < rn_ishlat .AND. rn_ishlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral partial-slip' |
---|
266 | ELSEIF ( 2. < rn_ishlat ) THEN ; IF(lwp) WRITE(numout,*) ' ===>>> ice lateral strong-slip' |
---|
267 | ENDIF |
---|
268 | ! !--- NO Landfast ice : set to zero once for all |
---|
269 | IF( .NOT. ln_landfast ) tau_icebfr(:,:) = 0._wp |
---|
270 | ! |
---|
271 | CALL ice_dyn_rdgrft_init ! set ice ridging/rafting parameters |
---|
272 | CALL ice_dyn_rhg_init ! set ice rheology parameters |
---|
273 | CALL ice_dyn_adv_init ! set ice advection parameters |
---|
274 | ! |
---|
275 | END SUBROUTINE ice_dyn_init |
---|
276 | |
---|
277 | #else |
---|
278 | !!---------------------------------------------------------------------- |
---|
279 | !! Default option Empty module NO ESIM sea-ice model |
---|
280 | !!---------------------------------------------------------------------- |
---|
281 | #endif |
---|
282 | |
---|
283 | !!====================================================================== |
---|
284 | END MODULE icedyn |
---|