limitd_me.F90 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. MODULE limitd_me
  2. !!======================================================================
  3. !! *** MODULE limitd_me ***
  4. !! LIM-3 : Mechanical impact on ice thickness distribution
  5. !!======================================================================
  6. !! History : LIM ! 2006-02 (M. Vancoppenolle) Original code
  7. !! 3.2 ! 2009-07 (M. Vancoppenolle, Y. Aksenov, G. Madec) bug correction in smsw & sfx_dyn
  8. !! 4.0 ! 2011-02 (G. Madec) dynamical allocation
  9. !!----------------------------------------------------------------------
  10. #if defined key_lim3
  11. !!----------------------------------------------------------------------
  12. !! 'key_lim3' LIM-3 sea-ice model
  13. !!----------------------------------------------------------------------
  14. USE par_oce ! ocean parameters
  15. USE dom_oce ! ocean domain
  16. USE phycst ! physical constants (ocean directory)
  17. USE sbc_oce ! surface boundary condition: ocean fields
  18. USE thd_ice ! LIM thermodynamics
  19. USE ice ! LIM variables
  20. USE dom_ice ! LIM domain
  21. USE limvar ! LIM
  22. USE lbclnk ! lateral boundary condition - MPP exchanges
  23. USE lib_mpp ! MPP library
  24. USE wrk_nemo ! work arrays
  25. USE prtctl ! Print control
  26. USE in_out_manager ! I/O manager
  27. USE iom ! I/O manager
  28. USE lib_fortran ! glob_sum
  29. USE limdiahsb
  30. USE timing ! Timing
  31. USE limcons ! conservation tests
  32. IMPLICIT NONE
  33. PRIVATE
  34. PUBLIC lim_itd_me ! called by ice_stp
  35. PUBLIC lim_itd_me_icestrength
  36. PUBLIC lim_itd_me_init
  37. PUBLIC lim_itd_me_alloc ! called by sbc_lim_init
  38. !-----------------------------------------------------------------------
  39. ! Variables shared among ridging subroutines
  40. !-----------------------------------------------------------------------
  41. REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: asum ! sum of total ice and open water area
  42. REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: aksum ! ratio of area removed to area ridged
  43. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: athorn ! participation function; fraction of ridging/closing associated w/ category n
  44. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: hrmin ! minimum ridge thickness
  45. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: hrmax ! maximum ridge thickness
  46. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: hraft ! thickness of rafted ice
  47. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: krdg ! thickness of ridging ice / mean ridge thickness
  48. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: aridge ! participating ice ridging
  49. REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: araft ! participating ice rafting
  50. REAL(wp), PARAMETER :: krdgmin = 1.1_wp ! min ridge thickness multiplier
  51. REAL(wp), PARAMETER :: kraft = 0.5_wp ! rafting multipliyer
  52. REAL(wp) :: Cp !
  53. !
  54. !
  55. !!----------------------------------------------------------------------
  56. !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010)
  57. !! $Id: limitd_me.F90 4990 2014-12-15 16:42:49Z timgraham $
  58. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  59. !!----------------------------------------------------------------------
  60. CONTAINS
  61. INTEGER FUNCTION lim_itd_me_alloc()
  62. !!---------------------------------------------------------------------!
  63. !! *** ROUTINE lim_itd_me_alloc ***
  64. !!---------------------------------------------------------------------!
  65. ALLOCATE( &
  66. !* Variables shared among ridging subroutines
  67. & asum (jpi,jpj) , athorn(jpi,jpj,0:jpl) , &
  68. & aksum(jpi,jpj) , &
  69. & hrmin(jpi,jpj,jpl) , hraft(jpi,jpj,jpl) , aridge(jpi,jpj,jpl) , &
  70. & hrmax(jpi,jpj,jpl) , krdg (jpi,jpj,jpl) , araft (jpi,jpj,jpl) , STAT=lim_itd_me_alloc )
  71. #if defined key_init_alloc_zero
  72. IF (lim_itd_me_alloc==0) THEN
  73. asum = 0
  74. athorn = 0
  75. aksum = 0
  76. hrmin = 0
  77. hraft = 0
  78. aridge = 0
  79. hrmax = 0
  80. krdg = 0
  81. araft = 0
  82. ENDIF
  83. #elif defined key_init_alloc_huge
  84. IF (lim_itd_me_alloc==0) THEN
  85. asum = HUGE(asum)
  86. athorn = HUGE(athorn)
  87. aksum = HUGE(aksum)
  88. hrmin = HUGE(hrmin)
  89. hraft = HUGE(hraft)
  90. aridge = HUGE(aridge)
  91. hrmax = HUGE(hrmax)
  92. krdg = HUGE(krdg)
  93. araft = HUGE(araft)
  94. ENDIF
  95. #endif
  96. !
  97. IF( lim_itd_me_alloc /= 0 ) CALL ctl_warn( 'lim_itd_me_alloc: failed to allocate arrays' )
  98. !
  99. END FUNCTION lim_itd_me_alloc
  100. SUBROUTINE lim_itd_me
  101. !!---------------------------------------------------------------------!
  102. !! *** ROUTINE lim_itd_me ***
  103. !!
  104. !! ** Purpose : computes the mechanical redistribution of ice thickness
  105. !!
  106. !! ** Method : Steps :
  107. !! 1) Thickness categories boundaries, ice / o.w. concentrations
  108. !! Ridge preparation
  109. !! 2) Dynamical inputs (closing rate, divu_adv, opning)
  110. !! 3) Ridging iteration
  111. !! 4) Ridging diagnostics
  112. !! 5) Heat, salt and freshwater fluxes
  113. !! 6) Compute increments of tate variables and come back to old values
  114. !!
  115. !! References : Flato, G. M., and W. D. Hibler III, 1995, JGR, 100, 18,611-18,626.
  116. !! Hibler, W. D. III, 1980, MWR, 108, 1943-1973, 1980.
  117. !! Rothrock, D. A., 1975: JGR, 80, 4514-4519.
  118. !! Thorndike et al., 1975, JGR, 80, 4501-4513.
  119. !! Bitz et al., JGR, 2001
  120. !! Amundrud and Melling, JGR 2005
  121. !! Babko et al., JGR 2002
  122. !!
  123. !! This routine is based on CICE code and authors William H. Lipscomb,
  124. !! and Elizabeth C. Hunke, LANL are gratefully acknowledged
  125. !!--------------------------------------------------------------------!
  126. INTEGER :: ji, jj, jk, jl ! dummy loop index
  127. INTEGER :: niter ! local integer
  128. INTEGER :: iterate_ridging ! if true, repeat the ridging
  129. REAL(wp) :: za, zfac ! local scalar
  130. CHARACTER (len = 15) :: fieldid
  131. REAL(wp), POINTER, DIMENSION(:,:) :: closing_net ! net rate at which area is removed (1/s)
  132. ! (ridging ice area - area of new ridges) / dt
  133. REAL(wp), POINTER, DIMENSION(:,:) :: divu_adv ! divu as implied by transport scheme (1/s)
  134. REAL(wp), POINTER, DIMENSION(:,:) :: opning ! rate of opening due to divergence/shear
  135. REAL(wp), POINTER, DIMENSION(:,:) :: closing_gross ! rate at which area removed, not counting area of new ridges
  136. !
  137. INTEGER, PARAMETER :: nitermax = 20
  138. !
  139. REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b
  140. !!-----------------------------------------------------------------------------
  141. IF( nn_timing == 1 ) CALL timing_start('limitd_me')
  142. CALL wrk_alloc( jpi,jpj, closing_net, divu_adv, opning, closing_gross )
  143. IF(ln_ctl) THEN
  144. CALL prt_ctl(tab2d_1=ato_i , clinfo1=' lim_itd_me: ato_i : ', tab2d_2=at_i , clinfo2=' at_i : ')
  145. CALL prt_ctl(tab2d_1=divu_i, clinfo1=' lim_itd_me: divu_i : ', tab2d_2=delta_i, clinfo2=' delta_i : ')
  146. ENDIF
  147. IF( ln_limdyn ) THEN ! Start ridging and rafting !
  148. ! conservation test
  149. IF( ln_limdiahsb ) CALL lim_cons_hsm(0, 'limitd_me', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b)
  150. !-----------------------------------------------------------------------------!
  151. ! 1) Thickness categories boundaries, ice / o.w. concentrations, init_ons
  152. !-----------------------------------------------------------------------------!
  153. Cp = 0.5 * grav * (rau0-rhoic) * rhoic * r1_rau0 ! proport const for PE
  154. !
  155. CALL lim_itd_me_ridgeprep ! prepare ridging
  156. !
  157. DO jj = 1, jpj ! Initialize arrays.
  158. DO ji = 1, jpi
  159. !-----------------------------------------------------------------------------!
  160. ! 2) Dynamical inputs (closing rate, divu_adv, opning)
  161. !-----------------------------------------------------------------------------!
  162. !
  163. ! 2.1 closing_net
  164. !-----------------
  165. ! Compute the net rate of closing due to convergence
  166. ! and shear, based on Flato and Hibler (1995).
  167. !
  168. ! The energy dissipation rate is equal to the net closing rate
  169. ! times the ice strength.
  170. !
  171. ! NOTE: The NET closing rate is equal to the rate that open water
  172. ! area is removed, plus the rate at which ice area is removed by
  173. ! ridging, minus the rate at which area is added in new ridges.
  174. ! The GROSS closing rate is equal to the first two terms (open
  175. ! water closing and thin ice ridging) without the third term
  176. ! (thick, newly ridged ice).
  177. closing_net(ji,jj) = rn_cs * 0.5 * ( delta_i(ji,jj) - ABS( divu_i(ji,jj) ) ) - MIN( divu_i(ji,jj), 0._wp )
  178. ! 2.2 divu_adv
  179. !--------------
  180. ! Compute divu_adv, the divergence rate given by the transport/
  181. ! advection scheme, which may not be equal to divu as computed
  182. ! from the velocity field.
  183. !
  184. ! If divu_adv < 0, make sure the closing rate is large enough
  185. ! to give asum = 1.0 after ridging.
  186. divu_adv(ji,jj) = ( 1._wp - asum(ji,jj) ) * r1_rdtice ! asum found in ridgeprep
  187. IF( divu_adv(ji,jj) < 0._wp ) closing_net(ji,jj) = MAX( closing_net(ji,jj), -divu_adv(ji,jj) )
  188. ! 2.3 opning
  189. !------------
  190. ! Compute the (non-negative) opening rate that will give asum = 1.0 after ridging.
  191. opning(ji,jj) = closing_net(ji,jj) + divu_adv(ji,jj)
  192. END DO
  193. END DO
  194. !-----------------------------------------------------------------------------!
  195. ! 3) Ridging iteration
  196. !-----------------------------------------------------------------------------!
  197. niter = 1 ! iteration counter
  198. iterate_ridging = 1
  199. DO WHILE ( iterate_ridging > 0 .AND. niter < nitermax )
  200. ! 3.2 closing_gross
  201. !-----------------------------------------------------------------------------!
  202. ! Based on the ITD of ridging and ridged ice, convert the net
  203. ! closing rate to a gross closing rate.
  204. ! NOTE: 0 < aksum <= 1
  205. closing_gross(:,:) = closing_net(:,:) / aksum(:,:)
  206. ! correction to closing rate and opening if closing rate is excessive
  207. !---------------------------------------------------------------------
  208. ! Reduce the closing rate if more than 100% of the open water
  209. ! would be removed. Reduce the opening rate proportionately.
  210. DO jj = 1, jpj
  211. DO ji = 1, jpi
  212. za = ( opning(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) ) * rdt_ice
  213. IF( za < 0._wp .AND. za > - ato_i(ji,jj) ) THEN ! would lead to negative ato_i
  214. zfac = - ato_i(ji,jj) / za
  215. opning(ji,jj) = athorn(ji,jj,0) * closing_gross(ji,jj) - ato_i(ji,jj) * r1_rdtice
  216. ELSEIF( za > 0._wp .AND. za > ( asum(ji,jj) - ato_i(ji,jj) ) ) THEN ! would lead to ato_i > asum
  217. zfac = ( asum(ji,jj) - ato_i(ji,jj) ) / za
  218. opning(ji,jj) = athorn(ji,jj,0) * closing_gross(ji,jj) + ( asum(ji,jj) - ato_i(ji,jj) ) * r1_rdtice
  219. ENDIF
  220. END DO
  221. END DO
  222. ! correction to closing rate / opening if excessive ice removal
  223. !---------------------------------------------------------------
  224. ! Reduce the closing rate if more than 100% of any ice category
  225. ! would be removed. Reduce the opening rate proportionately.
  226. DO jl = 1, jpl
  227. DO jj = 1, jpj
  228. DO ji = 1, jpi
  229. za = athorn(ji,jj,jl) * closing_gross(ji,jj) * rdt_ice
  230. IF( za > a_i(ji,jj,jl) ) THEN
  231. zfac = a_i(ji,jj,jl) / za
  232. closing_gross(ji,jj) = closing_gross(ji,jj) * zfac
  233. ENDIF
  234. END DO
  235. END DO
  236. END DO
  237. ! 3.3 Redistribute area, volume, and energy.
  238. !-----------------------------------------------------------------------------!
  239. CALL lim_itd_me_ridgeshift( opning, closing_gross )
  240. ! 3.4 Compute total area of ice plus open water after ridging.
  241. !-----------------------------------------------------------------------------!
  242. ! This is in general not equal to one because of divergence during transport
  243. asum(:,:) = ato_i(:,:) + SUM( a_i, dim=3 )
  244. ! 3.5 Do we keep on iterating ???
  245. !-----------------------------------------------------------------------------!
  246. ! Check whether asum = 1. If not (because the closing and opening
  247. ! rates were reduced above), ridge again with new rates.
  248. iterate_ridging = 0
  249. DO jj = 1, jpj
  250. DO ji = 1, jpi
  251. IF( ABS( asum(ji,jj) - 1._wp ) < epsi10 ) THEN
  252. closing_net(ji,jj) = 0._wp
  253. opning (ji,jj) = 0._wp
  254. ato_i (ji,jj) = MAX( 0._wp, 1._wp - SUM( a_i(ji,jj,:) ) )
  255. ELSE
  256. iterate_ridging = 1
  257. divu_adv (ji,jj) = ( 1._wp - asum(ji,jj) ) * r1_rdtice
  258. closing_net(ji,jj) = MAX( 0._wp, -divu_adv(ji,jj) )
  259. opning (ji,jj) = MAX( 0._wp, divu_adv(ji,jj) )
  260. ENDIF
  261. END DO
  262. END DO
  263. IF( lk_mpp ) CALL mpp_max( iterate_ridging )
  264. ! Repeat if necessary.
  265. ! NOTE: If strength smoothing is turned on, the ridging must be
  266. ! iterated globally because of the boundary update in the
  267. ! smoothing.
  268. niter = niter + 1
  269. IF( iterate_ridging == 1 ) THEN
  270. CALL lim_itd_me_ridgeprep
  271. IF( niter > nitermax ) THEN
  272. WRITE(numout,*) ' ALERTE : non-converging ridging scheme '
  273. WRITE(numout,*) ' niter, iterate_ridging ', niter, iterate_ridging
  274. ENDIF
  275. ENDIF
  276. END DO !! on the do while over iter
  277. CALL lim_var_agg( 1 )
  278. !-----------------------------------------------------------------------------!
  279. ! control prints
  280. !-----------------------------------------------------------------------------!
  281. IF(ln_ctl) THEN
  282. CALL lim_var_glo2eqv
  283. CALL prt_ctl_info(' ')
  284. CALL prt_ctl_info(' - Cell values : ')
  285. CALL prt_ctl_info(' ~~~~~~~~~~~~~ ')
  286. CALL prt_ctl(tab2d_1=e12t , clinfo1=' lim_itd_me : cell area :')
  287. CALL prt_ctl(tab2d_1=at_i , clinfo1=' lim_itd_me : at_i :')
  288. CALL prt_ctl(tab2d_1=vt_i , clinfo1=' lim_itd_me : vt_i :')
  289. CALL prt_ctl(tab2d_1=vt_s , clinfo1=' lim_itd_me : vt_s :')
  290. DO jl = 1, jpl
  291. CALL prt_ctl_info(' ')
  292. CALL prt_ctl_info(' - Category : ', ivar1=jl)
  293. CALL prt_ctl_info(' ~~~~~~~~~~')
  294. CALL prt_ctl(tab2d_1=a_i (:,:,jl) , clinfo1= ' lim_itd_me : a_i : ')
  295. CALL prt_ctl(tab2d_1=ht_i (:,:,jl) , clinfo1= ' lim_itd_me : ht_i : ')
  296. CALL prt_ctl(tab2d_1=ht_s (:,:,jl) , clinfo1= ' lim_itd_me : ht_s : ')
  297. CALL prt_ctl(tab2d_1=v_i (:,:,jl) , clinfo1= ' lim_itd_me : v_i : ')
  298. CALL prt_ctl(tab2d_1=v_s (:,:,jl) , clinfo1= ' lim_itd_me : v_s : ')
  299. CALL prt_ctl(tab2d_1=e_s (:,:,1,jl) , clinfo1= ' lim_itd_me : e_s : ')
  300. CALL prt_ctl(tab2d_1=t_su (:,:,jl) , clinfo1= ' lim_itd_me : t_su : ')
  301. CALL prt_ctl(tab2d_1=t_s (:,:,1,jl) , clinfo1= ' lim_itd_me : t_snow : ')
  302. CALL prt_ctl(tab2d_1=sm_i (:,:,jl) , clinfo1= ' lim_itd_me : sm_i : ')
  303. CALL prt_ctl(tab2d_1=smv_i (:,:,jl) , clinfo1= ' lim_itd_me : smv_i : ')
  304. DO jk = 1, nlay_i
  305. CALL prt_ctl_info(' ')
  306. CALL prt_ctl_info(' - Layer : ', ivar1=jk)
  307. CALL prt_ctl_info(' ~~~~~~~')
  308. CALL prt_ctl(tab2d_1=t_i(:,:,jk,jl) , clinfo1= ' lim_itd_me : t_i : ')
  309. CALL prt_ctl(tab2d_1=e_i(:,:,jk,jl) , clinfo1= ' lim_itd_me : e_i : ')
  310. END DO
  311. END DO
  312. ENDIF
  313. ! conservation test
  314. IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limitd_me', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b)
  315. ENDIF ! ln_limdyn=.true.
  316. !
  317. CALL wrk_dealloc( jpi, jpj, closing_net, divu_adv, opning, closing_gross )
  318. !
  319. IF( nn_timing == 1 ) CALL timing_stop('limitd_me')
  320. END SUBROUTINE lim_itd_me
  321. SUBROUTINE lim_itd_me_ridgeprep
  322. !!---------------------------------------------------------------------!
  323. !! *** ROUTINE lim_itd_me_ridgeprep ***
  324. !!
  325. !! ** Purpose : preparation for ridging and strength calculations
  326. !!
  327. !! ** Method : Compute the thickness distribution of the ice and open water
  328. !! participating in ridging and of the resulting ridges.
  329. !!---------------------------------------------------------------------!
  330. INTEGER :: ji,jj, jl ! dummy loop indices
  331. REAL(wp) :: Gstari, astari, hrmean, zdummy ! local scalar
  332. REAL(wp), POINTER, DIMENSION(:,:,:) :: Gsum ! Gsum(n) = sum of areas in categories 0 to n
  333. !------------------------------------------------------------------------------!
  334. CALL wrk_alloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 )
  335. Gstari = 1.0/rn_gstar
  336. astari = 1.0/rn_astar
  337. aksum(:,:) = 0.0
  338. athorn(:,:,:) = 0.0
  339. aridge(:,:,:) = 0.0
  340. araft (:,:,:) = 0.0
  341. ! Zero out categories with very small areas
  342. CALL lim_var_zapsmall
  343. ! Ice thickness needed for rafting
  344. DO jl = 1, jpl
  345. DO jj = 1, jpj
  346. DO ji = 1, jpi
  347. rswitch = MAX( 0._wp , SIGN( 1._wp, a_i(ji,jj,jl) - epsi20 ) )
  348. ht_i(ji,jj,jl) = v_i (ji,jj,jl) / MAX( a_i(ji,jj,jl) , epsi20 ) * rswitch
  349. END DO
  350. END DO
  351. END DO
  352. !------------------------------------------------------------------------------!
  353. ! 1) Participation function
  354. !------------------------------------------------------------------------------!
  355. ! Compute total area of ice plus open water.
  356. ! This is in general not equal to one because of divergence during transport
  357. asum(:,:) = ato_i(:,:) + SUM( a_i, dim=3 )
  358. ! Compute cumulative thickness distribution function
  359. ! Compute the cumulative thickness distribution function Gsum,
  360. ! where Gsum(n) is the fractional area in categories 0 to n.
  361. ! initial value (in h = 0) equals open water area
  362. Gsum(:,:,-1) = 0._wp
  363. Gsum(:,:,0 ) = ato_i(:,:)
  364. ! for each value of h, you have to add ice concentration then
  365. DO jl = 1, jpl
  366. Gsum(:,:,jl) = Gsum(:,:,jl-1) + a_i(:,:,jl)
  367. END DO
  368. ! Normalize the cumulative distribution to 1
  369. DO jl = 0, jpl
  370. Gsum(:,:,jl) = Gsum(:,:,jl) / asum(:,:)
  371. END DO
  372. ! 1.3 Compute participation function a(h) = b(h).g(h) (athorn)
  373. !--------------------------------------------------------------------------------------------------
  374. ! Compute the participation function athorn; this is analogous to
  375. ! a(h) = b(h)g(h) as defined in Thorndike et al. (1975).
  376. ! area lost from category n due to ridging/closing
  377. ! athorn(n) = total area lost due to ridging/closing
  378. ! assume b(h) = (2/Gstar) * (1 - G(h)/Gstar).
  379. !
  380. ! The expressions for athorn are found by integrating b(h)g(h) between
  381. ! the category boundaries.
  382. ! athorn is always >= 0 and SUM(athorn(0:jpl))=1
  383. !-----------------------------------------------------------------
  384. IF( nn_partfun == 0 ) THEN !--- Linear formulation (Thorndike et al., 1975)
  385. DO jl = 0, jpl
  386. DO jj = 1, jpj
  387. DO ji = 1, jpi
  388. IF ( Gsum(ji,jj,jl) < rn_gstar ) THEN
  389. athorn(ji,jj,jl) = Gstari * ( Gsum(ji,jj,jl) - Gsum(ji,jj,jl-1) ) * &
  390. & ( 2._wp - ( Gsum(ji,jj,jl-1) + Gsum(ji,jj,jl) ) * Gstari )
  391. ELSEIF( Gsum(ji,jj,jl-1) < rn_gstar ) THEN
  392. athorn(ji,jj,jl) = Gstari * ( rn_gstar - Gsum(ji,jj,jl-1) ) * &
  393. & ( 2._wp - ( Gsum(ji,jj,jl-1) + rn_gstar ) * Gstari )
  394. ELSE
  395. athorn(ji,jj,jl) = 0._wp
  396. ENDIF
  397. END DO
  398. END DO
  399. END DO
  400. ELSE !--- Exponential, more stable formulation (Lipscomb et al, 2007)
  401. !
  402. zdummy = 1._wp / ( 1._wp - EXP(-astari) ) ! precompute exponential terms using Gsum as a work array
  403. DO jl = -1, jpl
  404. Gsum(:,:,jl) = EXP( -Gsum(:,:,jl) * astari ) * zdummy
  405. END DO
  406. DO jl = 0, jpl
  407. athorn(:,:,jl) = Gsum(:,:,jl-1) - Gsum(:,:,jl)
  408. END DO
  409. !
  410. ENDIF
  411. IF( ln_rafting ) THEN ! Ridging and rafting ice participation functions
  412. !
  413. DO jl = 1, jpl
  414. DO jj = 1, jpj
  415. DO ji = 1, jpi
  416. zdummy = TANH ( rn_craft * ( ht_i(ji,jj,jl) - rn_hraft ) )
  417. aridge(ji,jj,jl) = ( 1._wp + zdummy ) * 0.5_wp * athorn(ji,jj,jl)
  418. araft (ji,jj,jl) = ( 1._wp - zdummy ) * 0.5_wp * athorn(ji,jj,jl)
  419. END DO
  420. END DO
  421. END DO
  422. ELSE
  423. !
  424. DO jl = 1, jpl
  425. aridge(:,:,jl) = athorn(:,:,jl)
  426. END DO
  427. !
  428. ENDIF
  429. !-----------------------------------------------------------------
  430. ! 2) Transfer function
  431. !-----------------------------------------------------------------
  432. ! Compute max and min ridged ice thickness for each ridging category.
  433. ! Assume ridged ice is uniformly distributed between hrmin and hrmax.
  434. !
  435. ! This parameterization is a modified version of Hibler (1980).
  436. ! The mean ridging thickness, hrmean, is proportional to hi^(0.5)
  437. ! and for very thick ridging ice must be >= krdgmin*hi
  438. !
  439. ! The minimum ridging thickness, hrmin, is equal to 2*hi
  440. ! (i.e., rafting) and for very thick ridging ice is
  441. ! constrained by hrmin <= (hrmean + hi)/2.
  442. !
  443. ! The maximum ridging thickness, hrmax, is determined by
  444. ! hrmean and hrmin.
  445. !
  446. ! These modifications have the effect of reducing the ice strength
  447. ! (relative to the Hibler formulation) when very thick ice is
  448. ! ridging.
  449. !
  450. ! aksum = net area removed/ total area removed
  451. ! where total area removed = area of ice that ridges
  452. ! net area removed = total area removed - area of new ridges
  453. !-----------------------------------------------------------------
  454. aksum(:,:) = athorn(:,:,0)
  455. ! Transfer function
  456. DO jl = 1, jpl !all categories have a specific transfer function
  457. DO jj = 1, jpj
  458. DO ji = 1, jpi
  459. IF( athorn(ji,jj,jl) > 0._wp ) THEN
  460. hrmean = MAX( SQRT( rn_hstar * ht_i(ji,jj,jl) ), ht_i(ji,jj,jl) * krdgmin )
  461. hrmin(ji,jj,jl) = MIN( 2._wp * ht_i(ji,jj,jl), 0.5_wp * ( hrmean + ht_i(ji,jj,jl) ) )
  462. hrmax(ji,jj,jl) = 2._wp * hrmean - hrmin(ji,jj,jl)
  463. hraft(ji,jj,jl) = ht_i(ji,jj,jl) / kraft
  464. krdg(ji,jj,jl) = ht_i(ji,jj,jl) / MAX( hrmean, epsi20 )
  465. ! Normalization factor : aksum, ensures mass conservation
  466. aksum(ji,jj) = aksum(ji,jj) + aridge(ji,jj,jl) * ( 1._wp - krdg(ji,jj,jl) ) &
  467. & + araft (ji,jj,jl) * ( 1._wp - kraft )
  468. ELSE
  469. hrmin(ji,jj,jl) = 0._wp
  470. hrmax(ji,jj,jl) = 0._wp
  471. hraft(ji,jj,jl) = 0._wp
  472. krdg (ji,jj,jl) = 1._wp
  473. ENDIF
  474. END DO
  475. END DO
  476. END DO
  477. !
  478. CALL wrk_dealloc( jpi,jpj,jpl+2, Gsum, kkstart = -1 )
  479. !
  480. END SUBROUTINE lim_itd_me_ridgeprep
  481. SUBROUTINE lim_itd_me_ridgeshift( opning, closing_gross )
  482. !!----------------------------------------------------------------------
  483. !! *** ROUTINE lim_itd_me_icestrength ***
  484. !!
  485. !! ** Purpose : shift ridging ice among thickness categories of ice thickness
  486. !!
  487. !! ** Method : Remove area, volume, and energy from each ridging category
  488. !! and add to thicker ice categories.
  489. !!----------------------------------------------------------------------
  490. REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: opning ! rate of opening due to divergence/shear
  491. REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: closing_gross ! rate at which area removed, excluding area of new ridges
  492. !
  493. CHARACTER (len=80) :: fieldid ! field identifier
  494. !
  495. INTEGER :: ji, jj, jl, jl1, jl2, jk ! dummy loop indices
  496. INTEGER :: ij ! horizontal index, combines i and j loops
  497. INTEGER :: icells ! number of cells with a_i > puny
  498. REAL(wp) :: hL, hR, farea ! left and right limits of integration
  499. INTEGER , POINTER, DIMENSION(:) :: indxi, indxj ! compressed indices
  500. REAL(wp), POINTER, DIMENSION(:) :: zswitch, fvol ! new ridge volume going to n2
  501. REAL(wp), POINTER, DIMENSION(:) :: afrac ! fraction of category area ridged
  502. REAL(wp), POINTER, DIMENSION(:) :: ardg1 , ardg2 ! area of ice ridged & new ridges
  503. REAL(wp), POINTER, DIMENSION(:) :: vsrdg , esrdg ! snow volume & energy of ridging ice
  504. REAL(wp), POINTER, DIMENSION(:) :: dhr , dhr2 ! hrmax - hrmin & hrmax^2 - hrmin^2
  505. REAL(wp), POINTER, DIMENSION(:) :: vrdg1 ! volume of ice ridged
  506. REAL(wp), POINTER, DIMENSION(:) :: vrdg2 ! volume of new ridges
  507. REAL(wp), POINTER, DIMENSION(:) :: vsw ! volume of seawater trapped into ridges
  508. REAL(wp), POINTER, DIMENSION(:) :: srdg1 ! sal*volume of ice ridged
  509. REAL(wp), POINTER, DIMENSION(:) :: srdg2 ! sal*volume of new ridges
  510. REAL(wp), POINTER, DIMENSION(:) :: smsw ! sal*volume of water trapped into ridges
  511. REAL(wp), POINTER, DIMENSION(:) :: oirdg1, oirdg2 ! ice age of ice ridged
  512. REAL(wp), POINTER, DIMENSION(:) :: afrft ! fraction of category area rafted
  513. REAL(wp), POINTER, DIMENSION(:) :: arft1 , arft2 ! area of ice rafted and new rafted zone
  514. REAL(wp), POINTER, DIMENSION(:) :: virft , vsrft ! ice & snow volume of rafting ice
  515. REAL(wp), POINTER, DIMENSION(:) :: esrft , smrft ! snow energy & salinity of rafting ice
  516. REAL(wp), POINTER, DIMENSION(:) :: oirft1, oirft2 ! ice age of ice rafted
  517. REAL(wp), POINTER, DIMENSION(:,:) :: eirft ! ice energy of rafting ice
  518. REAL(wp), POINTER, DIMENSION(:,:) :: erdg1 ! enth*volume of ice ridged
  519. REAL(wp), POINTER, DIMENSION(:,:) :: erdg2 ! enth*volume of new ridges
  520. REAL(wp), POINTER, DIMENSION(:,:) :: ersw ! enth of water trapped into ridges
  521. !!----------------------------------------------------------------------
  522. CALL wrk_alloc( jpij, indxi, indxj )
  523. CALL wrk_alloc( jpij, zswitch, fvol )
  524. CALL wrk_alloc( jpij, afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
  525. CALL wrk_alloc( jpij, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 )
  526. CALL wrk_alloc( jpij, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
  527. CALL wrk_alloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
  528. !-------------------------------------------------------------------------------
  529. ! 1) Compute change in open water area due to closing and opening.
  530. !-------------------------------------------------------------------------------
  531. DO jj = 1, jpj
  532. DO ji = 1, jpi
  533. ato_i(ji,jj) = MAX( 0._wp, ato_i(ji,jj) + &
  534. & ( opning(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) ) * rdt_ice )
  535. END DO
  536. END DO
  537. !-----------------------------------------------------------------
  538. ! 3) Pump everything from ice which is being ridged / rafted
  539. !-----------------------------------------------------------------
  540. ! Compute the area, volume, and energy of ice ridging in each
  541. ! category, along with the area of the resulting ridge.
  542. DO jl1 = 1, jpl !jl1 describes the ridging category
  543. !------------------------------------------------
  544. ! 3.1) Identify grid cells with nonzero ridging
  545. !------------------------------------------------
  546. icells = 0
  547. DO jj = 1, jpj
  548. DO ji = 1, jpi
  549. IF( athorn(ji,jj,jl1) > 0._wp .AND. closing_gross(ji,jj) > 0._wp ) THEN
  550. icells = icells + 1
  551. indxi(icells) = ji
  552. indxj(icells) = jj
  553. ENDIF
  554. END DO
  555. END DO
  556. DO ij = 1, icells
  557. ji = indxi(ij) ; jj = indxj(ij)
  558. !--------------------------------------------------------------------
  559. ! 3.2) Compute area of ridging ice (ardg1) and of new ridge (ardg2)
  560. !--------------------------------------------------------------------
  561. ardg1(ij) = aridge(ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice
  562. arft1(ij) = araft (ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice
  563. !---------------------------------------------------------------
  564. ! 3.3) Compute ridging /rafting fractions, make sure afrac <=1
  565. !---------------------------------------------------------------
  566. afrac(ij) = ardg1(ij) / a_i(ji,jj,jl1) !ridging
  567. afrft(ij) = arft1(ij) / a_i(ji,jj,jl1) !rafting
  568. ardg2(ij) = ardg1(ij) * krdg(ji,jj,jl1)
  569. arft2(ij) = arft1(ij) * kraft
  570. !--------------------------------------------------------------------------
  571. ! 3.4) Subtract area, volume, and energy from ridging
  572. ! / rafting category n1.
  573. !--------------------------------------------------------------------------
  574. vrdg1(ij) = v_i(ji,jj,jl1) * afrac(ij)
  575. vrdg2(ij) = vrdg1(ij) * ( 1. + rn_por_rdg )
  576. vsw (ij) = vrdg1(ij) * rn_por_rdg
  577. vsrdg (ij) = v_s (ji,jj, jl1) * afrac(ij)
  578. esrdg (ij) = e_s (ji,jj,1,jl1) * afrac(ij)
  579. srdg1 (ij) = smv_i(ji,jj, jl1) * afrac(ij)
  580. oirdg1(ij) = oa_i (ji,jj, jl1) * afrac(ij)
  581. oirdg2(ij) = oa_i (ji,jj, jl1) * afrac(ij) * krdg(ji,jj,jl1)
  582. ! rafting volumes, heat contents ...
  583. virft (ij) = v_i (ji,jj, jl1) * afrft(ij)
  584. vsrft (ij) = v_s (ji,jj, jl1) * afrft(ij)
  585. esrft (ij) = e_s (ji,jj,1,jl1) * afrft(ij)
  586. smrft (ij) = smv_i(ji,jj, jl1) * afrft(ij)
  587. oirft1(ij) = oa_i (ji,jj, jl1) * afrft(ij)
  588. oirft2(ij) = oa_i (ji,jj, jl1) * afrft(ij) * kraft
  589. !-----------------------------------------------------------------
  590. ! 3.5) Compute properties of new ridges
  591. !-----------------------------------------------------------------
  592. smsw(ij) = vsw(ij) * sss_m(ji,jj) ! salt content of seawater frozen in voids
  593. srdg2(ij) = srdg1(ij) + smsw(ij) ! salt content of new ridge
  594. sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ij) * rhoic * r1_rdtice
  595. wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ij) * rhoic * r1_rdtice ! increase in ice volume due to seawater frozen in voids
  596. ! virtual salt flux to keep salinity constant
  597. IF( nn_icesal == 1 .OR. nn_icesal == 3 ) THEN
  598. srdg2(ij) = srdg2(ij) - vsw(ij) * ( sss_m(ji,jj) - sm_i(ji,jj,jl1) ) ! ridge salinity = sm_i
  599. sfx_bri(ji,jj) = sfx_bri(ji,jj) + sss_m(ji,jj) * vsw(ij) * rhoic * r1_rdtice & ! put back sss_m into the ocean
  600. & - sm_i(ji,jj,jl1) * vsw(ij) * rhoic * r1_rdtice ! and get sm_i from the ocean
  601. ENDIF
  602. !------------------------------------------
  603. ! 3.7 Put the snow somewhere in the ocean
  604. !------------------------------------------
  605. ! Place part of the snow lost by ridging into the ocean.
  606. ! Note that esrdg > 0; the ocean must cool to melt snow.
  607. ! If the ocean temp = Tf already, new ice must grow.
  608. ! During the next time step, thermo_rates will determine whether
  609. ! the ocean cools or new ice grows.
  610. wfx_snw(ji,jj) = wfx_snw(ji,jj) + ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg ) &
  611. & + rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! fresh water source for ocean
  612. hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ( - esrdg(ij) * ( 1._wp - rn_fsnowrdg ) &
  613. & - esrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! heat sink for ocean (<0, W.m-2)
  614. !-----------------------------------------------------------------
  615. ! 3.8 Compute quantities used to apportion ice among categories
  616. ! in the n2 loop below
  617. !-----------------------------------------------------------------
  618. dhr (ij) = 1._wp / ( hrmax(ji,jj,jl1) - hrmin(ji,jj,jl1) )
  619. dhr2(ij) = 1._wp / ( hrmax(ji,jj,jl1) * hrmax(ji,jj,jl1) - hrmin(ji,jj,jl1) * hrmin(ji,jj,jl1) )
  620. ! update jl1 (removing ridged/rafted area)
  621. a_i (ji,jj, jl1) = a_i (ji,jj, jl1) - ardg1 (ij) - arft1 (ij)
  622. v_i (ji,jj, jl1) = v_i (ji,jj, jl1) - vrdg1 (ij) - virft (ij)
  623. v_s (ji,jj, jl1) = v_s (ji,jj, jl1) - vsrdg (ij) - vsrft (ij)
  624. e_s (ji,jj,1,jl1) = e_s (ji,jj,1,jl1) - esrdg (ij) - esrft (ij)
  625. smv_i(ji,jj, jl1) = smv_i(ji,jj, jl1) - srdg1 (ij) - smrft (ij)
  626. oa_i (ji,jj, jl1) = oa_i (ji,jj, jl1) - oirdg1(ij) - oirft1(ij)
  627. END DO
  628. !--------------------------------------------------------------------
  629. ! 3.9 Compute ridging ice enthalpy, remove it from ridging ice and
  630. ! compute ridged ice enthalpy
  631. !--------------------------------------------------------------------
  632. DO jk = 1, nlay_i
  633. DO ij = 1, icells
  634. ji = indxi(ij) ; jj = indxj(ij)
  635. ! heat content of ridged ice
  636. erdg1(ij,jk) = e_i(ji,jj,jk,jl1) * afrac(ij)
  637. eirft(ij,jk) = e_i(ji,jj,jk,jl1) * afrft(ij)
  638. ! enthalpy of the trapped seawater (J/m2, >0)
  639. ! clem: if sst>0, then ersw <0 (is that possible?)
  640. ersw(ij,jk) = - rhoic * vsw(ij) * rcp * sst_m(ji,jj) * r1_nlay_i
  641. ! heat flux to the ocean
  642. hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ersw(ij,jk) * r1_rdtice ! > 0 [W.m-2] ocean->ice flux
  643. ! it is added to sea ice because the sign convention is the opposite of the sign convention for the ocean
  644. erdg2(ij,jk) = erdg1(ij,jk) + ersw(ij,jk)
  645. ! update jl1
  646. e_i (ji,jj,jk,jl1) = e_i(ji,jj,jk,jl1) - erdg1(ij,jk) - eirft(ij,jk)
  647. END DO
  648. END DO
  649. !-------------------------------------------------------------------------------
  650. ! 4) Add area, volume, and energy of new ridge to each category jl2
  651. !-------------------------------------------------------------------------------
  652. DO jl2 = 1, jpl
  653. ! over categories to which ridged/rafted ice is transferred
  654. DO ij = 1, icells
  655. ji = indxi(ij) ; jj = indxj(ij)
  656. ! Compute the fraction of ridged ice area and volume going to thickness category jl2.
  657. IF( hrmin(ji,jj,jl1) <= hi_max(jl2) .AND. hrmax(ji,jj,jl1) > hi_max(jl2-1) ) THEN
  658. hL = MAX( hrmin(ji,jj,jl1), hi_max(jl2-1) )
  659. hR = MIN( hrmax(ji,jj,jl1), hi_max(jl2) )
  660. farea = ( hR - hL ) * dhr(ij)
  661. fvol(ij) = ( hR * hR - hL * hL ) * dhr2(ij)
  662. ELSE
  663. farea = 0._wp
  664. fvol(ij) = 0._wp
  665. ENDIF
  666. ! Compute the fraction of rafted ice area and volume going to thickness category jl2
  667. IF( hraft(ji,jj,jl1) <= hi_max(jl2) .AND. hraft(ji,jj,jl1) > hi_max(jl2-1) ) THEN
  668. zswitch(ij) = 1._wp
  669. ELSE
  670. zswitch(ij) = 0._wp
  671. ENDIF
  672. a_i (ji,jj ,jl2) = a_i (ji,jj ,jl2) + ( ardg2 (ij) * farea + arft2 (ij) * zswitch(ij) )
  673. oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + ( oirdg2(ij) * farea + oirft2(ij) * zswitch(ij) )
  674. v_i (ji,jj ,jl2) = v_i (ji,jj ,jl2) + ( vrdg2 (ij) * fvol(ij) + virft (ij) * zswitch(ij) )
  675. smv_i(ji,jj ,jl2) = smv_i(ji,jj ,jl2) + ( srdg2 (ij) * fvol(ij) + smrft (ij) * zswitch(ij) )
  676. v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + ( vsrdg (ij) * rn_fsnowrdg * fvol(ij) + &
  677. & vsrft (ij) * rn_fsnowrft * zswitch(ij) )
  678. e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + ( esrdg (ij) * rn_fsnowrdg * fvol(ij) + &
  679. & esrft (ij) * rn_fsnowrft * zswitch(ij) )
  680. END DO
  681. ! Transfer ice energy to category jl2 by ridging
  682. DO jk = 1, nlay_i
  683. DO ij = 1, icells
  684. ji = indxi(ij) ; jj = indxj(ij)
  685. e_i(ji,jj,jk,jl2) = e_i(ji,jj,jk,jl2) + erdg2(ij,jk) * fvol(ij) + eirft(ij,jk) * zswitch(ij)
  686. END DO
  687. END DO
  688. !
  689. END DO ! jl2
  690. END DO ! jl1 (deforming categories)
  691. !
  692. CALL wrk_dealloc( jpij, indxi, indxj )
  693. CALL wrk_dealloc( jpij, zswitch, fvol )
  694. CALL wrk_dealloc( jpij, afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
  695. CALL wrk_dealloc( jpij, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 )
  696. CALL wrk_dealloc( jpij, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
  697. CALL wrk_dealloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
  698. !
  699. END SUBROUTINE lim_itd_me_ridgeshift
  700. SUBROUTINE lim_itd_me_icestrength( kstrngth )
  701. !!----------------------------------------------------------------------
  702. !! *** ROUTINE lim_itd_me_icestrength ***
  703. !!
  704. !! ** Purpose : computes ice strength used in dynamics routines of ice thickness
  705. !!
  706. !! ** Method : Compute the strength of the ice pack, defined as the energy (J m-2)
  707. !! dissipated per unit area removed from the ice pack under compression,
  708. !! and assumed proportional to the change in potential energy caused
  709. !! by ridging. Note that only Hibler's formulation is stable and that
  710. !! ice strength has to be smoothed
  711. !!
  712. !! ** Inputs / Ouputs : kstrngth (what kind of ice strength we are using)
  713. !!----------------------------------------------------------------------
  714. INTEGER, INTENT(in) :: kstrngth ! = 1 for Rothrock formulation, 0 for Hibler (1979)
  715. INTEGER :: ji,jj, jl ! dummy loop indices
  716. INTEGER :: ksmooth ! smoothing the resistance to deformation
  717. INTEGER :: numts_rm ! number of time steps for the P smoothing
  718. REAL(wp) :: zp, z1_3 ! local scalars
  719. REAL(wp), POINTER, DIMENSION(:,:) :: zworka ! temporary array used here
  720. !!----------------------------------------------------------------------
  721. CALL wrk_alloc( jpi, jpj, zworka )
  722. !------------------------------------------------------------------------------!
  723. ! 1) Initialize
  724. !------------------------------------------------------------------------------!
  725. strength(:,:) = 0._wp
  726. !------------------------------------------------------------------------------!
  727. ! 2) Compute thickness distribution of ridging and ridged ice
  728. !------------------------------------------------------------------------------!
  729. CALL lim_itd_me_ridgeprep
  730. !------------------------------------------------------------------------------!
  731. ! 3) Rothrock(1975)'s method
  732. !------------------------------------------------------------------------------!
  733. IF( kstrngth == 1 ) THEN
  734. z1_3 = 1._wp / 3._wp
  735. DO jl = 1, jpl
  736. DO jj= 1, jpj
  737. DO ji = 1, jpi
  738. !
  739. IF( athorn(ji,jj,jl) > 0._wp ) THEN
  740. !----------------------------
  741. ! PE loss from deforming ice
  742. !----------------------------
  743. strength(ji,jj) = strength(ji,jj) - athorn(ji,jj,jl) * ht_i(ji,jj,jl) * ht_i(ji,jj,jl)
  744. !--------------------------
  745. ! PE gain from rafting ice
  746. !--------------------------
  747. strength(ji,jj) = strength(ji,jj) + 2._wp * araft(ji,jj,jl) * ht_i(ji,jj,jl) * ht_i(ji,jj,jl)
  748. !----------------------------
  749. ! PE gain from ridging ice
  750. !----------------------------
  751. strength(ji,jj) = strength(ji,jj) + aridge(ji,jj,jl) * krdg(ji,jj,jl) * z1_3 * &
  752. & ( hrmax(ji,jj,jl) * hrmax(ji,jj,jl) + &
  753. & hrmin(ji,jj,jl) * hrmin(ji,jj,jl) + &
  754. & hrmax(ji,jj,jl) * hrmin(ji,jj,jl) )
  755. !!(a**3-b**3)/(a-b) = a*a+ab+b*b
  756. ENDIF
  757. !
  758. END DO
  759. END DO
  760. END DO
  761. strength(:,:) = rn_pe_rdg * Cp * strength(:,:) / aksum(:,:) * tmask(:,:,1)
  762. ! where Cp = (g/2)*(rhow-rhoi)*(rhoi/rhow) and rn_pe_rdg accounts for frictional dissipation
  763. ksmooth = 1
  764. !------------------------------------------------------------------------------!
  765. ! 4) Hibler (1979)' method
  766. !------------------------------------------------------------------------------!
  767. ELSE ! kstrngth ne 1: Hibler (1979) form
  768. !
  769. strength(:,:) = rn_pstar * vt_i(:,:) * EXP( - rn_crhg * ( 1._wp - at_i(:,:) ) ) * tmask(:,:,1)
  770. !
  771. ksmooth = 1
  772. !
  773. ENDIF ! kstrngth
  774. !
  775. !------------------------------------------------------------------------------!
  776. ! 5) Impact of brine volume
  777. !------------------------------------------------------------------------------!
  778. ! CAN BE REMOVED
  779. IF( ln_icestr_bvf ) THEN
  780. DO jj = 1, jpj
  781. DO ji = 1, jpi
  782. strength(ji,jj) = strength(ji,jj) * exp(-5.88*SQRT(MAX(bvm_i(ji,jj),0.0)))
  783. END DO
  784. END DO
  785. ENDIF
  786. !
  787. !------------------------------------------------------------------------------!
  788. ! 6) Smoothing ice strength
  789. !------------------------------------------------------------------------------!
  790. !
  791. !-------------------
  792. ! Spatial smoothing
  793. !-------------------
  794. IF ( ksmooth == 1 ) THEN
  795. CALL lbc_lnk( strength, 'T', 1. )
  796. DO jj = 2, jpjm1
  797. DO ji = 2, jpim1
  798. IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN
  799. zworka(ji,jj) = ( 4.0 * strength(ji,jj) &
  800. & + strength(ji-1,jj) * tmask(ji-1,jj,1) + strength(ji+1,jj) * tmask(ji+1,jj,1) &
  801. & + strength(ji,jj-1) * tmask(ji,jj-1,1) + strength(ji,jj+1) * tmask(ji,jj+1,1) &
  802. & ) / ( 4.0 + tmask(ji-1,jj,1) + tmask(ji+1,jj,1) + tmask(ji,jj-1,1) + tmask(ji,jj+1,1) )
  803. ELSE
  804. zworka(ji,jj) = 0._wp
  805. ENDIF
  806. END DO
  807. END DO
  808. DO jj = 2, jpjm1
  809. DO ji = 2, jpim1
  810. strength(ji,jj) = zworka(ji,jj)
  811. END DO
  812. END DO
  813. CALL lbc_lnk( strength, 'T', 1. )
  814. ENDIF
  815. !--------------------
  816. ! Temporal smoothing
  817. !--------------------
  818. IF ( numit == nit000 + nn_fsbc - 1 ) THEN
  819. strp1(:,:) = 0.0
  820. strp2(:,:) = 0.0
  821. ENDIF
  822. IF ( ksmooth == 2 ) THEN
  823. CALL lbc_lnk( strength, 'T', 1. )
  824. DO jj = 1, jpj - 1
  825. DO ji = 1, jpi - 1
  826. IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN
  827. numts_rm = 1 ! number of time steps for the running mean
  828. IF ( strp1(ji,jj) > 0._wp ) numts_rm = numts_rm + 1
  829. IF ( strp2(ji,jj) > 0._wp ) numts_rm = numts_rm + 1
  830. zp = ( strength(ji,jj) + strp1(ji,jj) + strp2(ji,jj) ) / numts_rm
  831. strp2(ji,jj) = strp1(ji,jj)
  832. strp1(ji,jj) = strength(ji,jj)
  833. strength(ji,jj) = zp
  834. ENDIF
  835. END DO
  836. END DO
  837. ENDIF ! ksmooth
  838. CALL lbc_lnk( strength, 'T', 1. ) ! Boundary conditions
  839. CALL wrk_dealloc( jpi, jpj, zworka )
  840. !
  841. END SUBROUTINE lim_itd_me_icestrength
  842. SUBROUTINE lim_itd_me_init
  843. !!-------------------------------------------------------------------
  844. !! *** ROUTINE lim_itd_me_init ***
  845. !!
  846. !! ** Purpose : Physical constants and parameters linked
  847. !! to the mechanical ice redistribution
  848. !!
  849. !! ** Method : Read the namiceitdme namelist
  850. !! and check the parameters values
  851. !! called at the first timestep (nit000)
  852. !!
  853. !! ** input : Namelist namiceitdme
  854. !!-------------------------------------------------------------------
  855. INTEGER :: ios ! Local integer output status for namelist read
  856. NAMELIST/namiceitdme/ rn_cs, rn_fsnowrdg, rn_fsnowrft, &
  857. & rn_gstar, rn_astar, rn_hstar, ln_rafting, rn_hraft, rn_craft, rn_por_rdg, &
  858. & nn_partfun
  859. !!-------------------------------------------------------------------
  860. !
  861. REWIND( numnam_ice_ref ) ! Namelist namicetdme in reference namelist : Ice mechanical ice redistribution
  862. READ ( numnam_ice_ref, namiceitdme, IOSTAT = ios, ERR = 901)
  863. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitdme in reference namelist', lwp )
  864. REWIND( numnam_ice_cfg ) ! Namelist namiceitdme in configuration namelist : Ice mechanical ice redistribution
  865. READ ( numnam_ice_cfg, namiceitdme, IOSTAT = ios, ERR = 902 )
  866. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitdme in configuration namelist', lwp )
  867. IF(lwm) WRITE ( numoni, namiceitdme )
  868. !
  869. IF (lwp) THEN ! control print
  870. WRITE(numout,*)
  871. WRITE(numout,*)' lim_itd_me_init : ice parameters for mechanical ice redistribution '
  872. WRITE(numout,*)' ~~~~~~~~~~~~~~~'
  873. WRITE(numout,*)' Fraction of shear energy contributing to ridging rn_cs = ', rn_cs
  874. WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrdg = ', rn_fsnowrdg
  875. WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrft = ', rn_fsnowrft
  876. WRITE(numout,*)' Fraction of total ice coverage contributing to ridging rn_gstar = ', rn_gstar
  877. WRITE(numout,*)' Equivalent to G* for an exponential part function rn_astar = ', rn_astar
  878. WRITE(numout,*)' Quantity playing a role in max ridged ice thickness rn_hstar = ', rn_hstar
  879. WRITE(numout,*)' Rafting of ice sheets or not ln_rafting = ', ln_rafting
  880. WRITE(numout,*)' Parmeter thickness (threshold between ridge-raft) rn_hraft = ', rn_hraft
  881. WRITE(numout,*)' Rafting hyperbolic tangent coefficient rn_craft = ', rn_craft
  882. WRITE(numout,*)' Initial porosity of ridges rn_por_rdg = ', rn_por_rdg
  883. WRITE(numout,*)' Switch for part. function (0) linear (1) exponential nn_partfun = ', nn_partfun
  884. ENDIF
  885. !
  886. END SUBROUTINE lim_itd_me_init
  887. #else
  888. !!----------------------------------------------------------------------
  889. !! Default option Empty module NO LIM-3 sea-ice model
  890. !!----------------------------------------------------------------------
  891. CONTAINS
  892. SUBROUTINE lim_itd_me ! Empty routines
  893. END SUBROUTINE lim_itd_me
  894. SUBROUTINE lim_itd_me_icestrength
  895. END SUBROUTINE lim_itd_me_icestrength
  896. SUBROUTINE lim_itd_me_init
  897. END SUBROUTINE lim_itd_me_init
  898. #endif
  899. !!======================================================================
  900. END MODULE limitd_me