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