[825] | 1 | MODULE limdyn |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limdyn *** |
---|
| 4 | !! Sea-Ice dynamics : |
---|
| 5 | !!====================================================================== |
---|
[2612] | 6 | !! history : 1.0 ! 2002-08 (C. Ethe, G. Madec) original VP code |
---|
| 7 | !! 3.0 ! 2007-03 (MA Morales Maqueda, S. Bouillon, M. Vancoppenolle) LIM3: EVP-Cgrid |
---|
| 8 | !! 4.0 ! 2011-02 (G. Madec) dynamical allocation |
---|
[2528] | 9 | !!---------------------------------------------------------------------- |
---|
[825] | 10 | #if defined key_lim3 |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[834] | 12 | !! 'key_lim3' : LIM3 sea-ice model |
---|
[825] | 13 | !!---------------------------------------------------------------------- |
---|
| 14 | !! lim_dyn : computes ice velocities |
---|
| 15 | !! lim_dyn_init : initialization and namelist read |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
[2612] | 17 | USE phycst ! physical constants |
---|
| 18 | USE dom_oce ! ocean space and time domain |
---|
| 19 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 20 | USE sbc_ice ! Surface boundary condition: ice fields |
---|
| 21 | USE ice ! LIM-3 variables |
---|
| 22 | USE par_ice ! LIM-3 parameters |
---|
| 23 | USE dom_ice ! LIM-3 domain |
---|
| 24 | USE limrhg ! LIM-3 rheology |
---|
| 25 | USE lbclnk ! lateral boundary conditions - MPP exchanges |
---|
| 26 | USE lib_mpp ! MPP library |
---|
| 27 | USE in_out_manager ! I/O manager |
---|
| 28 | USE prtctl ! Print control |
---|
[825] | 29 | |
---|
| 30 | IMPLICIT NONE |
---|
| 31 | PRIVATE |
---|
| 32 | |
---|
[2528] | 33 | PUBLIC lim_dyn ! routine called by ice_step |
---|
[825] | 34 | |
---|
[868] | 35 | !! * Substitutions |
---|
| 36 | # include "vectopt_loop_substitute.h90" |
---|
[825] | 37 | !!---------------------------------------------------------------------- |
---|
[2612] | 38 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[1156] | 39 | !! $Id$ |
---|
[2528] | 40 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[825] | 41 | !!---------------------------------------------------------------------- |
---|
| 42 | CONTAINS |
---|
| 43 | |
---|
[921] | 44 | SUBROUTINE lim_dyn( kt ) |
---|
[825] | 45 | !!------------------------------------------------------------------- |
---|
| 46 | !! *** ROUTINE lim_dyn *** |
---|
| 47 | !! |
---|
| 48 | !! ** Purpose : compute ice velocity and ocean-ice stress |
---|
| 49 | !! |
---|
| 50 | !! ** Method : |
---|
| 51 | !! |
---|
| 52 | !! ** Action : - Initialisation |
---|
| 53 | !! - Call of the dynamic routine for each hemisphere |
---|
| 54 | !! - computation of the stress at the ocean surface |
---|
| 55 | !! - treatment of the case if no ice dynamic |
---|
| 56 | !!------------------------------------------------------------------------------------ |
---|
[2633] | 57 | USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released |
---|
[2612] | 58 | USE wrk_nemo, ONLY: wrk_1d_1, wrk_1d_2 |
---|
| 59 | USE wrk_nemo, ONLY: zu_io => wrk_2d_1, zv_io => wrk_2d_2 ! ice-ocean velocity |
---|
| 60 | ! |
---|
[921] | 61 | INTEGER, INTENT(in) :: kt ! number of iteration |
---|
[2528] | 62 | !! |
---|
[913] | 63 | INTEGER :: ji, jj, jl, ja ! dummy loop indices |
---|
| 64 | INTEGER :: i_j1, i_jpj ! Starting/ending j-indices for rheology |
---|
[2528] | 65 | REAL(wp) :: zcoef ! local scalar |
---|
[2612] | 66 | REAL(wp), POINTER, DIMENSION(:) :: zind ! i-averaged indicator of sea-ice |
---|
| 67 | REAL(wp), POINTER, DIMENSION(:) :: zmsk ! i-averaged of tmask |
---|
[825] | 68 | !!--------------------------------------------------------------------- |
---|
| 69 | |
---|
[2633] | 70 | IF( wrk_in_use(1, 1,2) .OR. wrk_in_use(2, 1,2) ) THEN |
---|
[2636] | 71 | CALL ctl_stop('lim_dyn : requested workspace arrays unavailable') ; RETURN |
---|
| 72 | ENDIF |
---|
[2612] | 73 | zind => wrk_1d_1(1:jpj) ! Set-up pointers to sub-arrays of workspaces |
---|
| 74 | zmsk => wrk_1d_2(1:jpj) |
---|
[825] | 75 | |
---|
[2612] | 76 | IF( kt == nit000 ) CALL lim_dyn_init ! Initialization (first time-step only) |
---|
[921] | 77 | |
---|
[2612] | 78 | IF( ln_limdyn ) THEN |
---|
| 79 | ! |
---|
[825] | 80 | old_u_ice(:,:) = u_ice(:,:) * tmu(:,:) |
---|
| 81 | old_v_ice(:,:) = v_ice(:,:) * tmv(:,:) |
---|
| 82 | |
---|
[834] | 83 | ! Rheology (ice dynamics) |
---|
| 84 | ! ======== |
---|
[825] | 85 | |
---|
| 86 | ! Define the j-limits where ice rheology is computed |
---|
| 87 | ! --------------------------------------------------- |
---|
| 88 | |
---|
[2528] | 89 | IF( lk_mpp .OR. lk_mpp_rep ) THEN ! mpp: compute over the whole domain |
---|
[825] | 90 | i_j1 = 1 |
---|
| 91 | i_jpj = jpj |
---|
| 92 | IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn : i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj ) |
---|
| 93 | CALL lim_rhg( i_j1, i_jpj ) |
---|
| 94 | ELSE ! optimization of the computational area |
---|
[2612] | 95 | ! |
---|
[825] | 96 | DO jj = 1, jpj |
---|
[2612] | 97 | zind(jj) = SUM( 1.0 - at_i(:,jj) ) ! = REAL(jpj) if ocean everywhere on a j-line |
---|
| 98 | zmsk(jj) = SUM( tmask(:,jj,1) ) ! = 0 if land everywhere on a j-line |
---|
[825] | 99 | END DO |
---|
| 100 | |
---|
| 101 | IF( l_jeq ) THEN ! local domain include both hemisphere |
---|
| 102 | ! ! Rheology is computed in each hemisphere |
---|
| 103 | ! ! only over the ice cover latitude strip |
---|
| 104 | ! Northern hemisphere |
---|
| 105 | i_j1 = njeq |
---|
| 106 | i_jpj = jpj |
---|
| 107 | DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 ) |
---|
| 108 | i_j1 = i_j1 + 1 |
---|
| 109 | END DO |
---|
[1103] | 110 | i_j1 = MAX( 1, i_j1-2 ) |
---|
[825] | 111 | IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn : NH i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj ) |
---|
| 112 | CALL lim_rhg( i_j1, i_jpj ) |
---|
[2612] | 113 | ! |
---|
[825] | 114 | ! Southern hemisphere |
---|
| 115 | i_j1 = 1 |
---|
| 116 | i_jpj = njeq |
---|
| 117 | DO WHILE ( i_jpj >= 1 .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 ) |
---|
| 118 | i_jpj = i_jpj - 1 |
---|
| 119 | END DO |
---|
[1103] | 120 | i_jpj = MIN( jpj, i_jpj+1 ) |
---|
[825] | 121 | IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn : SH i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj ) |
---|
[2612] | 122 | ! |
---|
| 123 | CALL lim_rhg( i_j1, i_jpj ) |
---|
| 124 | ! |
---|
| 125 | ELSE ! local domain extends over one hemisphere only |
---|
| 126 | ! ! Rheology is computed only over the ice cover |
---|
| 127 | ! ! latitude strip |
---|
| 128 | i_j1 = 1 |
---|
[825] | 129 | DO WHILE ( i_j1 <= jpj .AND. zind(i_j1) == FLOAT(jpi) .AND. zmsk(i_j1) /=0 ) |
---|
| 130 | i_j1 = i_j1 + 1 |
---|
| 131 | END DO |
---|
[1103] | 132 | i_j1 = MAX( 1, i_j1-2 ) |
---|
[825] | 133 | |
---|
| 134 | i_jpj = jpj |
---|
| 135 | DO WHILE ( i_jpj >= 1 .AND. zind(i_jpj) == FLOAT(jpi) .AND. zmsk(i_jpj) /=0 ) |
---|
| 136 | i_jpj = i_jpj - 1 |
---|
| 137 | END DO |
---|
[1103] | 138 | i_jpj = MIN( jpj, i_jpj+1) |
---|
[2612] | 139 | ! |
---|
[825] | 140 | IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn : one hemisphere: i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj ) |
---|
[2612] | 141 | ! |
---|
[825] | 142 | CALL lim_rhg( i_j1, i_jpj ) |
---|
[2612] | 143 | ! |
---|
[825] | 144 | ENDIF |
---|
[2612] | 145 | ! |
---|
[825] | 146 | ENDIF |
---|
| 147 | |
---|
[888] | 148 | ! computation of friction velocity |
---|
[913] | 149 | ! -------------------------------- |
---|
[1470] | 150 | ! ice-ocean velocity at U & V-points (u_ice v_ice at U- & V-points ; ssu_m, ssv_m at U- & V-points) |
---|
[913] | 151 | zu_io(:,:) = u_ice(:,:) - ssu_m(:,:) |
---|
| 152 | zv_io(:,:) = v_ice(:,:) - ssv_m(:,:) |
---|
| 153 | ! frictional velocity at T-point |
---|
[2612] | 154 | zcoef = 0.5_wp * cw |
---|
[913] | 155 | DO jj = 2, jpjm1 |
---|
| 156 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
[2528] | 157 | ust2s(ji,jj) = zcoef * ( zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj) & |
---|
| 158 | & + zv_io(ji,jj) * zv_io(ji,jj) + zv_io(ji,jj-1) * zv_io(ji,jj-1) ) * tms(ji,jj) |
---|
[825] | 159 | END DO |
---|
| 160 | END DO |
---|
[913] | 161 | ! |
---|
| 162 | ELSE ! no ice dynamics : transmit directly the atmospheric stress to the ocean |
---|
| 163 | ! |
---|
[2612] | 164 | zcoef = SQRT( 0.5_wp ) / rau0 |
---|
[913] | 165 | DO jj = 2, jpjm1 |
---|
| 166 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
[2528] | 167 | ust2s(ji,jj) = zcoef * SQRT( utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj) & |
---|
| 168 | & + vtau(ji,jj) * vtau(ji,jj) + vtau(ji,jj-1) * vtau(ji,jj-1) ) * tms(ji,jj) |
---|
[825] | 169 | END DO |
---|
| 170 | END DO |
---|
[913] | 171 | ! |
---|
[825] | 172 | ENDIF |
---|
| 173 | CALL lbc_lnk( ust2s, 'T', 1. ) ! T-point |
---|
| 174 | |
---|
[863] | 175 | IF(ln_ctl) THEN ! Control print |
---|
[867] | 176 | CALL prt_ctl_info(' ') |
---|
| 177 | CALL prt_ctl_info(' - Cell values : ') |
---|
| 178 | CALL prt_ctl_info(' ~~~~~~~~~~~~~ ') |
---|
[863] | 179 | CALL prt_ctl(tab2d_1=ust2s , clinfo1=' lim_dyn : ust2s :') |
---|
| 180 | CALL prt_ctl(tab2d_1=divu_i , clinfo1=' lim_dyn : divu_i :') |
---|
| 181 | CALL prt_ctl(tab2d_1=delta_i , clinfo1=' lim_dyn : delta_i :') |
---|
| 182 | CALL prt_ctl(tab2d_1=strength , clinfo1=' lim_dyn : strength :') |
---|
| 183 | CALL prt_ctl(tab2d_1=area , clinfo1=' lim_dyn : cell area :') |
---|
| 184 | CALL prt_ctl(tab2d_1=at_i , clinfo1=' lim_dyn : at_i :') |
---|
| 185 | CALL prt_ctl(tab2d_1=vt_i , clinfo1=' lim_dyn : vt_i :') |
---|
| 186 | CALL prt_ctl(tab2d_1=vt_s , clinfo1=' lim_dyn : vt_s :') |
---|
| 187 | CALL prt_ctl(tab2d_1=stress1_i , clinfo1=' lim_dyn : stress1_i :') |
---|
| 188 | CALL prt_ctl(tab2d_1=stress2_i , clinfo1=' lim_dyn : stress2_i :') |
---|
| 189 | CALL prt_ctl(tab2d_1=stress12_i, clinfo1=' lim_dyn : stress12_i:') |
---|
| 190 | DO jl = 1, jpl |
---|
[867] | 191 | CALL prt_ctl_info(' ') |
---|
[863] | 192 | CALL prt_ctl_info(' - Category : ', ivar1=jl) |
---|
| 193 | CALL prt_ctl_info(' ~~~~~~~~~~') |
---|
| 194 | CALL prt_ctl(tab2d_1=a_i (:,:,jl) , clinfo1= ' lim_dyn : a_i : ') |
---|
| 195 | CALL prt_ctl(tab2d_1=ht_i (:,:,jl) , clinfo1= ' lim_dyn : ht_i : ') |
---|
| 196 | CALL prt_ctl(tab2d_1=ht_s (:,:,jl) , clinfo1= ' lim_dyn : ht_s : ') |
---|
| 197 | CALL prt_ctl(tab2d_1=v_i (:,:,jl) , clinfo1= ' lim_dyn : v_i : ') |
---|
| 198 | CALL prt_ctl(tab2d_1=v_s (:,:,jl) , clinfo1= ' lim_dyn : v_s : ') |
---|
| 199 | CALL prt_ctl(tab2d_1=e_s (:,:,1,jl) , clinfo1= ' lim_dyn : e_s : ') |
---|
| 200 | CALL prt_ctl(tab2d_1=t_su (:,:,jl) , clinfo1= ' lim_dyn : t_su : ') |
---|
| 201 | CALL prt_ctl(tab2d_1=t_s (:,:,1,jl) , clinfo1= ' lim_dyn : t_snow : ') |
---|
| 202 | CALL prt_ctl(tab2d_1=sm_i (:,:,jl) , clinfo1= ' lim_dyn : sm_i : ') |
---|
| 203 | CALL prt_ctl(tab2d_1=smv_i (:,:,jl) , clinfo1= ' lim_dyn : smv_i : ') |
---|
| 204 | DO ja = 1, nlay_i |
---|
[867] | 205 | CALL prt_ctl_info(' ') |
---|
[863] | 206 | CALL prt_ctl_info(' - Layer : ', ivar1=ja) |
---|
| 207 | CALL prt_ctl_info(' ~~~~~~~') |
---|
| 208 | CALL prt_ctl(tab2d_1=t_i(:,:,ja,jl) , clinfo1= ' lim_dyn : t_i : ') |
---|
| 209 | CALL prt_ctl(tab2d_1=e_i(:,:,ja,jl) , clinfo1= ' lim_dyn : e_i : ') |
---|
| 210 | END DO |
---|
| 211 | END DO |
---|
[825] | 212 | ENDIF |
---|
[2528] | 213 | ! |
---|
[2636] | 214 | IF( wrk_not_released(1, 1,2) .OR. & |
---|
| 215 | wrk_not_released(2, 1,2) ) CALL ctl_stop('lim_dyn : failed to release workspace arrays' ) |
---|
[2612] | 216 | ! |
---|
[825] | 217 | END SUBROUTINE lim_dyn |
---|
| 218 | |
---|
[2528] | 219 | |
---|
[921] | 220 | SUBROUTINE lim_dyn_init |
---|
[825] | 221 | !!------------------------------------------------------------------- |
---|
| 222 | !! *** ROUTINE lim_dyn_init *** |
---|
| 223 | !! |
---|
| 224 | !! ** Purpose : Physical constants and parameters linked to the ice |
---|
| 225 | !! dynamics |
---|
| 226 | !! |
---|
| 227 | !! ** Method : Read the namicedyn namelist and check the ice-dynamic |
---|
| 228 | !! parameter values called at the first timestep (nit000) |
---|
| 229 | !! |
---|
| 230 | !! ** input : Namelist namicedyn |
---|
| 231 | !!------------------------------------------------------------------- |
---|
| 232 | NAMELIST/namicedyn/ epsd, alpha, & |
---|
| 233 | & dm, nbiter, nbitdr, om, resl, cw, angvg, pstar, & |
---|
| 234 | & c_rhg, etamn, creepl, ecc, ahi0, & |
---|
| 235 | & nevp, telast, alphaevp |
---|
| 236 | !!------------------------------------------------------------------- |
---|
| 237 | |
---|
[2528] | 238 | REWIND( numnam_ice ) ! Read Namelist namicedyn |
---|
| 239 | READ ( numnam_ice , namicedyn ) |
---|
| 240 | |
---|
| 241 | IF(lwp) THEN ! control print |
---|
[825] | 242 | WRITE(numout,*) |
---|
| 243 | WRITE(numout,*) 'lim_dyn_init : ice parameters for ice dynamics ' |
---|
| 244 | WRITE(numout,*) '~~~~~~~~~~~~' |
---|
| 245 | WRITE(numout,*) ' tolerance parameter epsd = ', epsd |
---|
| 246 | WRITE(numout,*) ' coefficient for semi-implicit coriolis alpha = ', alpha |
---|
| 247 | WRITE(numout,*) ' diffusion constant for dynamics dm = ', dm |
---|
| 248 | WRITE(numout,*) ' number of sub-time steps for relaxation nbiter = ', nbiter |
---|
| 249 | WRITE(numout,*) ' maximum number of iterations for relaxation nbitdr = ', nbitdr |
---|
| 250 | WRITE(numout,*) ' relaxation constant om = ', om |
---|
| 251 | WRITE(numout,*) ' maximum value for the residual of relaxation resl = ', resl |
---|
| 252 | WRITE(numout,*) ' drag coefficient for oceanic stress cw = ', cw |
---|
| 253 | WRITE(numout,*) ' turning angle for oceanic stress angvg = ', angvg |
---|
| 254 | WRITE(numout,*) ' first bulk-rheology parameter pstar = ', pstar |
---|
| 255 | WRITE(numout,*) ' second bulk-rhelogy parameter c_rhg = ', c_rhg |
---|
| 256 | WRITE(numout,*) ' minimun value for viscosity etamn = ', etamn |
---|
| 257 | WRITE(numout,*) ' creep limit creepl = ', creepl |
---|
| 258 | WRITE(numout,*) ' eccentricity of the elliptical yield curve ecc = ', ecc |
---|
| 259 | WRITE(numout,*) ' horizontal diffusivity coeff. for sea-ice ahi0 = ', ahi0 |
---|
| 260 | WRITE(numout,*) ' number of iterations for subcycling nevp = ', nevp |
---|
| 261 | WRITE(numout,*) ' timescale for elastic waves telast = ', telast |
---|
| 262 | WRITE(numout,*) ' coefficient for the solution of int. stresses alphaevp = ', alphaevp |
---|
| 263 | ENDIF |
---|
[2528] | 264 | ! |
---|
| 265 | IF( angvg /= 0._wp ) THEN |
---|
| 266 | CALL ctl_warn( 'lim_dyn_init: turning angle for oceanic stress not properly coded for EVP ', & |
---|
| 267 | & '(see limsbc module). We force angvg = 0._wp' ) |
---|
| 268 | angvg = 0._wp |
---|
| 269 | ENDIF |
---|
| 270 | |
---|
| 271 | usecc2 = 1._wp / ( ecc * ecc ) |
---|
| 272 | rhoco = rau0 * cw |
---|
[825] | 273 | angvg = angvg * rad |
---|
| 274 | sangvg = SIN( angvg ) |
---|
| 275 | cangvg = COS( angvg ) |
---|
[2528] | 276 | pstarh = pstar * 0.5_wp |
---|
[825] | 277 | |
---|
| 278 | ! Diffusion coefficients. |
---|
| 279 | ahiu(:,:) = ahi0 * umask(:,:,1) |
---|
| 280 | ahiv(:,:) = ahi0 * vmask(:,:,1) |
---|
[2612] | 281 | ! |
---|
[825] | 282 | END SUBROUTINE lim_dyn_init |
---|
| 283 | |
---|
| 284 | #else |
---|
| 285 | !!---------------------------------------------------------------------- |
---|
| 286 | !! Default option Empty module NO LIM sea-ice model |
---|
| 287 | !!---------------------------------------------------------------------- |
---|
| 288 | CONTAINS |
---|
| 289 | SUBROUTINE lim_dyn ! Empty routine |
---|
| 290 | END SUBROUTINE lim_dyn |
---|
| 291 | #endif |
---|
| 292 | |
---|
| 293 | !!====================================================================== |
---|
| 294 | END MODULE limdyn |
---|