limitd_me.F90 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035
  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 8152 2017-06-08 10:43:44Z vancop $
  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. REAL(wp) :: zwfx_snw ! snow mass flux increment
  500. INTEGER , POINTER, DIMENSION(:) :: indxi, indxj ! compressed indices
  501. REAL(wp), POINTER, DIMENSION(:) :: zswitch, fvol ! new ridge volume going to n2
  502. REAL(wp), POINTER, DIMENSION(:) :: afrac ! fraction of category area ridged
  503. REAL(wp), POINTER, DIMENSION(:) :: ardg1 , ardg2 ! area of ice ridged & new ridges
  504. REAL(wp), POINTER, DIMENSION(:) :: vsrdg , esrdg ! snow volume & energy of ridging ice
  505. REAL(wp), POINTER, DIMENSION(:) :: dhr , dhr2 ! hrmax - hrmin & hrmax^2 - hrmin^2
  506. REAL(wp), POINTER, DIMENSION(:) :: vrdg1 ! volume of ice ridged
  507. REAL(wp), POINTER, DIMENSION(:) :: vrdg2 ! volume of new ridges
  508. REAL(wp), POINTER, DIMENSION(:) :: vsw ! volume of seawater trapped into ridges
  509. REAL(wp), POINTER, DIMENSION(:) :: srdg1 ! sal*volume of ice ridged
  510. REAL(wp), POINTER, DIMENSION(:) :: srdg2 ! sal*volume of new ridges
  511. REAL(wp), POINTER, DIMENSION(:) :: smsw ! sal*volume of water trapped into ridges
  512. REAL(wp), POINTER, DIMENSION(:) :: oirdg1, oirdg2 ! ice age of ice ridged
  513. REAL(wp), POINTER, DIMENSION(:) :: afrft ! fraction of category area rafted
  514. REAL(wp), POINTER, DIMENSION(:) :: arft1 , arft2 ! area of ice rafted and new rafted zone
  515. REAL(wp), POINTER, DIMENSION(:) :: virft , vsrft ! ice & snow volume of rafting ice
  516. REAL(wp), POINTER, DIMENSION(:) :: esrft , smrft ! snow energy & salinity of rafting ice
  517. REAL(wp), POINTER, DIMENSION(:) :: oirft1, oirft2 ! ice age of ice rafted
  518. REAL(wp), POINTER, DIMENSION(:,:) :: eirft ! ice energy of rafting ice
  519. REAL(wp), POINTER, DIMENSION(:,:) :: erdg1 ! enth*volume of ice ridged
  520. REAL(wp), POINTER, DIMENSION(:,:) :: erdg2 ! enth*volume of new ridges
  521. REAL(wp), POINTER, DIMENSION(:,:) :: ersw ! enth of water trapped into ridges
  522. !!----------------------------------------------------------------------
  523. CALL wrk_alloc( jpij, indxi, indxj )
  524. CALL wrk_alloc( jpij, zswitch, fvol )
  525. CALL wrk_alloc( jpij, afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
  526. CALL wrk_alloc( jpij, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 )
  527. CALL wrk_alloc( jpij, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
  528. CALL wrk_alloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
  529. !-------------------------------------------------------------------------------
  530. ! 1) Compute change in open water area due to closing and opening.
  531. !-------------------------------------------------------------------------------
  532. DO jj = 1, jpj
  533. DO ji = 1, jpi
  534. ato_i(ji,jj) = MAX( 0._wp, ato_i(ji,jj) + &
  535. & ( opning(ji,jj) - athorn(ji,jj,0) * closing_gross(ji,jj) ) * rdt_ice )
  536. END DO
  537. END DO
  538. !-----------------------------------------------------------------
  539. ! 3) Pump everything from ice which is being ridged / rafted
  540. !-----------------------------------------------------------------
  541. ! Compute the area, volume, and energy of ice ridging in each
  542. ! category, along with the area of the resulting ridge.
  543. DO jl1 = 1, jpl !jl1 describes the ridging category
  544. !------------------------------------------------
  545. ! 3.1) Identify grid cells with nonzero ridging
  546. !------------------------------------------------
  547. icells = 0
  548. DO jj = 1, jpj
  549. DO ji = 1, jpi
  550. IF( athorn(ji,jj,jl1) > 0._wp .AND. closing_gross(ji,jj) > 0._wp ) THEN
  551. icells = icells + 1
  552. indxi(icells) = ji
  553. indxj(icells) = jj
  554. ENDIF
  555. END DO
  556. END DO
  557. DO ij = 1, icells
  558. ji = indxi(ij) ; jj = indxj(ij)
  559. !--------------------------------------------------------------------
  560. ! 3.2) Compute area of ridging ice (ardg1) and of new ridge (ardg2)
  561. !--------------------------------------------------------------------
  562. ardg1(ij) = aridge(ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice
  563. arft1(ij) = araft (ji,jj,jl1) * closing_gross(ji,jj) * rdt_ice
  564. !---------------------------------------------------------------
  565. ! 3.3) Compute ridging /rafting fractions, make sure afrac <=1
  566. !---------------------------------------------------------------
  567. afrac(ij) = ardg1(ij) / a_i(ji,jj,jl1) !ridging
  568. afrft(ij) = arft1(ij) / a_i(ji,jj,jl1) !rafting
  569. ardg2(ij) = ardg1(ij) * krdg(ji,jj,jl1)
  570. arft2(ij) = arft1(ij) * kraft
  571. !--------------------------------------------------------------------------
  572. ! 3.4) Subtract area, volume, and energy from ridging
  573. ! / rafting category n1.
  574. !--------------------------------------------------------------------------
  575. vrdg1(ij) = v_i(ji,jj,jl1) * afrac(ij)
  576. vrdg2(ij) = vrdg1(ij) * ( 1. + rn_por_rdg )
  577. vsw (ij) = vrdg1(ij) * rn_por_rdg
  578. vsrdg (ij) = v_s (ji,jj, jl1) * afrac(ij)
  579. esrdg (ij) = e_s (ji,jj,1,jl1) * afrac(ij)
  580. srdg1 (ij) = smv_i(ji,jj, jl1) * afrac(ij)
  581. oirdg1(ij) = oa_i (ji,jj, jl1) * afrac(ij)
  582. oirdg2(ij) = oa_i (ji,jj, jl1) * afrac(ij) * krdg(ji,jj,jl1)
  583. ! rafting volumes, heat contents ...
  584. virft (ij) = v_i (ji,jj, jl1) * afrft(ij)
  585. vsrft (ij) = v_s (ji,jj, jl1) * afrft(ij)
  586. esrft (ij) = e_s (ji,jj,1,jl1) * afrft(ij)
  587. smrft (ij) = smv_i(ji,jj, jl1) * afrft(ij)
  588. oirft1(ij) = oa_i (ji,jj, jl1) * afrft(ij)
  589. oirft2(ij) = oa_i (ji,jj, jl1) * afrft(ij) * kraft
  590. !-----------------------------------------------------------------
  591. ! 3.5) Compute properties of new ridges
  592. !-----------------------------------------------------------------
  593. smsw(ij) = vsw(ij) * sss_m(ji,jj) ! salt content of seawater frozen in voids
  594. srdg2(ij) = srdg1(ij) + smsw(ij) ! salt content of new ridge
  595. sfx_dyn(ji,jj) = sfx_dyn(ji,jj) - smsw(ij) * rhoic * r1_rdtice
  596. wfx_dyn(ji,jj) = wfx_dyn(ji,jj) - vsw (ij) * rhoic * r1_rdtice ! increase in ice volume due to seawater frozen in voids
  597. ! virtual salt flux to keep salinity constant
  598. IF( nn_icesal == 1 .OR. nn_icesal == 3 ) THEN
  599. srdg2(ij) = srdg2(ij) - vsw(ij) * ( sss_m(ji,jj) - sm_i(ji,jj,jl1) ) ! ridge salinity = sm_i
  600. sfx_bri(ji,jj) = sfx_bri(ji,jj) + sss_m(ji,jj) * vsw(ij) * rhoic * r1_rdtice & ! put back sss_m into the ocean
  601. & - sm_i(ji,jj,jl1) * vsw(ij) * rhoic * r1_rdtice ! and get sm_i from the ocean
  602. ENDIF
  603. !------------------------------------------
  604. ! 3.7 Put the snow somewhere in the ocean
  605. !------------------------------------------
  606. ! Place part of the snow lost by ridging into the ocean.
  607. ! Note that esrdg > 0; the ocean must cool to melt snow.
  608. ! If the ocean temp = Tf already, new ice must grow.
  609. ! During the next time step, thermo_rates will determine whether
  610. ! the ocean cools or new ice grows.
  611. zwfx_snw = ( rhosn * vsrdg(ij) * ( 1._wp - rn_fsnowrdg ) &
  612. & + rhosn * vsrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! fresh water source for ocean
  613. wfx_snw_dyn(ji,jj) = wfx_snw_dyn(ji,jj) + zwfx_snw
  614. wfx_snw(ji,jj) = wfx_snw(ji,jj) + zwfx_snw
  615. hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ( - esrdg(ij) * ( 1._wp - rn_fsnowrdg ) &
  616. & - esrft(ij) * ( 1._wp - rn_fsnowrft ) ) * r1_rdtice ! heat sink for ocean (<0, W.m-2)
  617. !-----------------------------------------------------------------
  618. ! 3.8 Compute quantities used to apportion ice among categories
  619. ! in the n2 loop below
  620. !-----------------------------------------------------------------
  621. dhr (ij) = 1._wp / ( hrmax(ji,jj,jl1) - hrmin(ji,jj,jl1) )
  622. dhr2(ij) = 1._wp / ( hrmax(ji,jj,jl1) * hrmax(ji,jj,jl1) - hrmin(ji,jj,jl1) * hrmin(ji,jj,jl1) )
  623. ! update jl1 (removing ridged/rafted area)
  624. a_i (ji,jj, jl1) = a_i (ji,jj, jl1) - ardg1 (ij) - arft1 (ij)
  625. v_i (ji,jj, jl1) = v_i (ji,jj, jl1) - vrdg1 (ij) - virft (ij)
  626. v_s (ji,jj, jl1) = v_s (ji,jj, jl1) - vsrdg (ij) - vsrft (ij)
  627. e_s (ji,jj,1,jl1) = e_s (ji,jj,1,jl1) - esrdg (ij) - esrft (ij)
  628. smv_i(ji,jj, jl1) = smv_i(ji,jj, jl1) - srdg1 (ij) - smrft (ij)
  629. oa_i (ji,jj, jl1) = oa_i (ji,jj, jl1) - oirdg1(ij) - oirft1(ij)
  630. END DO
  631. !--------------------------------------------------------------------
  632. ! 3.9 Compute ridging ice enthalpy, remove it from ridging ice and
  633. ! compute ridged ice enthalpy
  634. !--------------------------------------------------------------------
  635. DO jk = 1, nlay_i
  636. DO ij = 1, icells
  637. ji = indxi(ij) ; jj = indxj(ij)
  638. ! heat content of ridged ice
  639. erdg1(ij,jk) = e_i(ji,jj,jk,jl1) * afrac(ij)
  640. eirft(ij,jk) = e_i(ji,jj,jk,jl1) * afrft(ij)
  641. ! enthalpy of the trapped seawater (J/m2, >0)
  642. ! clem: if sst>0, then ersw <0 (is that possible?)
  643. ersw(ij,jk) = - rhoic * vsw(ij) * rcp * sst_m(ji,jj) * r1_nlay_i
  644. ! heat flux to the ocean
  645. hfx_dyn(ji,jj) = hfx_dyn(ji,jj) + ersw(ij,jk) * r1_rdtice ! > 0 [W.m-2] ocean->ice flux
  646. ! it is added to sea ice because the sign convention is the opposite of the sign convention for the ocean
  647. erdg2(ij,jk) = erdg1(ij,jk) + ersw(ij,jk)
  648. ! update jl1
  649. e_i (ji,jj,jk,jl1) = e_i(ji,jj,jk,jl1) - erdg1(ij,jk) - eirft(ij,jk)
  650. END DO
  651. END DO
  652. !-------------------------------------------------------------------------------
  653. ! 4) Add area, volume, and energy of new ridge to each category jl2
  654. !-------------------------------------------------------------------------------
  655. DO jl2 = 1, jpl
  656. ! over categories to which ridged/rafted ice is transferred
  657. DO ij = 1, icells
  658. ji = indxi(ij) ; jj = indxj(ij)
  659. ! Compute the fraction of ridged ice area and volume going to thickness category jl2.
  660. IF( hrmin(ji,jj,jl1) <= hi_max(jl2) .AND. hrmax(ji,jj,jl1) > hi_max(jl2-1) ) THEN
  661. hL = MAX( hrmin(ji,jj,jl1), hi_max(jl2-1) )
  662. hR = MIN( hrmax(ji,jj,jl1), hi_max(jl2) )
  663. farea = ( hR - hL ) * dhr(ij)
  664. fvol(ij) = ( hR * hR - hL * hL ) * dhr2(ij)
  665. ELSE
  666. farea = 0._wp
  667. fvol(ij) = 0._wp
  668. ENDIF
  669. ! Compute the fraction of rafted ice area and volume going to thickness category jl2
  670. IF( hraft(ji,jj,jl1) <= hi_max(jl2) .AND. hraft(ji,jj,jl1) > hi_max(jl2-1) ) THEN
  671. zswitch(ij) = 1._wp
  672. ELSE
  673. zswitch(ij) = 0._wp
  674. ENDIF
  675. a_i (ji,jj ,jl2) = a_i (ji,jj ,jl2) + ( ardg2 (ij) * farea + arft2 (ij) * zswitch(ij) )
  676. oa_i (ji,jj ,jl2) = oa_i (ji,jj ,jl2) + ( oirdg2(ij) * farea + oirft2(ij) * zswitch(ij) )
  677. v_i (ji,jj ,jl2) = v_i (ji,jj ,jl2) + ( vrdg2 (ij) * fvol(ij) + virft (ij) * zswitch(ij) )
  678. smv_i(ji,jj ,jl2) = smv_i(ji,jj ,jl2) + ( srdg2 (ij) * fvol(ij) + smrft (ij) * zswitch(ij) )
  679. v_s (ji,jj ,jl2) = v_s (ji,jj ,jl2) + ( vsrdg (ij) * rn_fsnowrdg * fvol(ij) + &
  680. & vsrft (ij) * rn_fsnowrft * zswitch(ij) )
  681. e_s (ji,jj,1,jl2) = e_s (ji,jj,1,jl2) + ( esrdg (ij) * rn_fsnowrdg * fvol(ij) + &
  682. & esrft (ij) * rn_fsnowrft * zswitch(ij) )
  683. END DO
  684. ! Transfer ice energy to category jl2 by ridging
  685. DO jk = 1, nlay_i
  686. DO ij = 1, icells
  687. ji = indxi(ij) ; jj = indxj(ij)
  688. e_i(ji,jj,jk,jl2) = e_i(ji,jj,jk,jl2) + erdg2(ij,jk) * fvol(ij) + eirft(ij,jk) * zswitch(ij)
  689. END DO
  690. END DO
  691. !
  692. END DO ! jl2
  693. END DO ! jl1 (deforming categories)
  694. ! SIMIP diagnostics
  695. diag_dmi_dyn(:,:) = - wfx_dyn(:,:) + rhoic * diag_trp_vi(:,:)
  696. diag_dms_dyn(:,:) = - wfx_snw_dyn(:,:) + rhosn * diag_trp_vs(:,:)
  697. !
  698. CALL wrk_dealloc( jpij, indxi, indxj )
  699. CALL wrk_dealloc( jpij, zswitch, fvol )
  700. CALL wrk_dealloc( jpij, afrac, ardg1, ardg2, vsrdg, esrdg, dhr, dhr2 )
  701. CALL wrk_dealloc( jpij, vrdg1, vrdg2, vsw , srdg1, srdg2, smsw, oirdg1, oirdg2 )
  702. CALL wrk_dealloc( jpij, afrft, arft1, arft2, virft, vsrft, esrft, smrft, oirft1, oirft2 )
  703. CALL wrk_dealloc( jpij,nlay_i, eirft, erdg1, erdg2, ersw )
  704. !
  705. END SUBROUTINE lim_itd_me_ridgeshift
  706. SUBROUTINE lim_itd_me_icestrength( kstrngth )
  707. !!----------------------------------------------------------------------
  708. !! *** ROUTINE lim_itd_me_icestrength ***
  709. !!
  710. !! ** Purpose : computes ice strength used in dynamics routines of ice thickness
  711. !!
  712. !! ** Method : Compute the strength of the ice pack, defined as the energy (J m-2)
  713. !! dissipated per unit area removed from the ice pack under compression,
  714. !! and assumed proportional to the change in potential energy caused
  715. !! by ridging. Note that only Hibler's formulation is stable and that
  716. !! ice strength has to be smoothed
  717. !!
  718. !! ** Inputs / Ouputs : kstrngth (what kind of ice strength we are using)
  719. !!----------------------------------------------------------------------
  720. INTEGER, INTENT(in) :: kstrngth ! = 1 for Rothrock formulation, 0 for Hibler (1979)
  721. INTEGER :: ji,jj, jl ! dummy loop indices
  722. INTEGER :: ksmooth ! smoothing the resistance to deformation
  723. INTEGER :: numts_rm ! number of time steps for the P smoothing
  724. REAL(wp) :: zp, z1_3 ! local scalars
  725. REAL(wp), POINTER, DIMENSION(:,:) :: zworka ! temporary array used here
  726. !!----------------------------------------------------------------------
  727. CALL wrk_alloc( jpi, jpj, zworka )
  728. !------------------------------------------------------------------------------!
  729. ! 1) Initialize
  730. !------------------------------------------------------------------------------!
  731. strength(:,:) = 0._wp
  732. !------------------------------------------------------------------------------!
  733. ! 2) Compute thickness distribution of ridging and ridged ice
  734. !------------------------------------------------------------------------------!
  735. CALL lim_itd_me_ridgeprep
  736. !------------------------------------------------------------------------------!
  737. ! 3) Rothrock(1975)'s method
  738. !------------------------------------------------------------------------------!
  739. IF( kstrngth == 1 ) THEN
  740. z1_3 = 1._wp / 3._wp
  741. DO jl = 1, jpl
  742. DO jj= 1, jpj
  743. DO ji = 1, jpi
  744. !
  745. IF( athorn(ji,jj,jl) > 0._wp ) THEN
  746. !----------------------------
  747. ! PE loss from deforming ice
  748. !----------------------------
  749. strength(ji,jj) = strength(ji,jj) - athorn(ji,jj,jl) * ht_i(ji,jj,jl) * ht_i(ji,jj,jl)
  750. !--------------------------
  751. ! PE gain from rafting ice
  752. !--------------------------
  753. strength(ji,jj) = strength(ji,jj) + 2._wp * araft(ji,jj,jl) * ht_i(ji,jj,jl) * ht_i(ji,jj,jl)
  754. !----------------------------
  755. ! PE gain from ridging ice
  756. !----------------------------
  757. strength(ji,jj) = strength(ji,jj) + aridge(ji,jj,jl) * krdg(ji,jj,jl) * z1_3 * &
  758. & ( hrmax(ji,jj,jl) * hrmax(ji,jj,jl) + &
  759. & hrmin(ji,jj,jl) * hrmin(ji,jj,jl) + &
  760. & hrmax(ji,jj,jl) * hrmin(ji,jj,jl) )
  761. !!(a**3-b**3)/(a-b) = a*a+ab+b*b
  762. ENDIF
  763. !
  764. END DO
  765. END DO
  766. END DO
  767. strength(:,:) = rn_pe_rdg * Cp * strength(:,:) / aksum(:,:) * tmask(:,:,1)
  768. ! where Cp = (g/2)*(rhow-rhoi)*(rhoi/rhow) and rn_pe_rdg accounts for frictional dissipation
  769. ksmooth = 1
  770. !------------------------------------------------------------------------------!
  771. ! 4) Hibler (1979)' method
  772. !------------------------------------------------------------------------------!
  773. ELSE ! kstrngth ne 1: Hibler (1979) form
  774. !
  775. strength(:,:) = rn_pstar * vt_i(:,:) * EXP( - rn_crhg * ( 1._wp - at_i(:,:) ) ) * tmask(:,:,1)
  776. !
  777. ksmooth = 1
  778. !
  779. ENDIF ! kstrngth
  780. !
  781. !------------------------------------------------------------------------------!
  782. ! 5) Impact of brine volume
  783. !------------------------------------------------------------------------------!
  784. ! CAN BE REMOVED
  785. IF( ln_icestr_bvf ) THEN
  786. DO jj = 1, jpj
  787. DO ji = 1, jpi
  788. strength(ji,jj) = strength(ji,jj) * exp(-5.88*SQRT(MAX(bvm_i(ji,jj),0.0)))
  789. END DO
  790. END DO
  791. ENDIF
  792. !
  793. !------------------------------------------------------------------------------!
  794. ! 6) Smoothing ice strength
  795. !------------------------------------------------------------------------------!
  796. !
  797. !-------------------
  798. ! Spatial smoothing
  799. !-------------------
  800. IF ( ksmooth == 1 ) THEN
  801. CALL lbc_lnk( strength, 'T', 1. )
  802. DO jj = 2, jpjm1
  803. DO ji = 2, jpim1
  804. IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN
  805. zworka(ji,jj) = ( 4.0 * strength(ji,jj) &
  806. & + strength(ji-1,jj) * tmask(ji-1,jj,1) + strength(ji+1,jj) * tmask(ji+1,jj,1) &
  807. & + strength(ji,jj-1) * tmask(ji,jj-1,1) + strength(ji,jj+1) * tmask(ji,jj+1,1) &
  808. & ) / ( 4.0 + tmask(ji-1,jj,1) + tmask(ji+1,jj,1) + tmask(ji,jj-1,1) + tmask(ji,jj+1,1) )
  809. ELSE
  810. zworka(ji,jj) = 0._wp
  811. ENDIF
  812. END DO
  813. END DO
  814. DO jj = 2, jpjm1
  815. DO ji = 2, jpim1
  816. strength(ji,jj) = zworka(ji,jj)
  817. END DO
  818. END DO
  819. CALL lbc_lnk( strength, 'T', 1. )
  820. ENDIF
  821. !--------------------
  822. ! Temporal smoothing
  823. !--------------------
  824. IF ( numit == nit000 + nn_fsbc - 1 ) THEN
  825. strp1(:,:) = 0.0
  826. strp2(:,:) = 0.0
  827. ENDIF
  828. IF ( ksmooth == 2 ) THEN
  829. CALL lbc_lnk( strength, 'T', 1. )
  830. DO jj = 1, jpj - 1
  831. DO ji = 1, jpi - 1
  832. IF ( ( asum(ji,jj) - ato_i(ji,jj) ) > 0._wp) THEN
  833. numts_rm = 1 ! number of time steps for the running mean
  834. IF ( strp1(ji,jj) > 0._wp ) numts_rm = numts_rm + 1
  835. IF ( strp2(ji,jj) > 0._wp ) numts_rm = numts_rm + 1
  836. zp = ( strength(ji,jj) + strp1(ji,jj) + strp2(ji,jj) ) / numts_rm
  837. strp2(ji,jj) = strp1(ji,jj)
  838. strp1(ji,jj) = strength(ji,jj)
  839. strength(ji,jj) = zp
  840. ENDIF
  841. END DO
  842. END DO
  843. ENDIF ! ksmooth
  844. CALL lbc_lnk( strength, 'T', 1. ) ! Boundary conditions
  845. CALL wrk_dealloc( jpi, jpj, zworka )
  846. !
  847. END SUBROUTINE lim_itd_me_icestrength
  848. SUBROUTINE lim_itd_me_init
  849. !!-------------------------------------------------------------------
  850. !! *** ROUTINE lim_itd_me_init ***
  851. !!
  852. !! ** Purpose : Physical constants and parameters linked
  853. !! to the mechanical ice redistribution
  854. !!
  855. !! ** Method : Read the namiceitdme namelist
  856. !! and check the parameters values
  857. !! called at the first timestep (nit000)
  858. !!
  859. !! ** input : Namelist namiceitdme
  860. !!-------------------------------------------------------------------
  861. INTEGER :: ios ! Local integer output status for namelist read
  862. NAMELIST/namiceitdme/ rn_cs, rn_fsnowrdg, rn_fsnowrft, &
  863. & rn_gstar, rn_astar, rn_hstar, ln_rafting, rn_hraft, rn_craft, rn_por_rdg, &
  864. & nn_partfun
  865. !!-------------------------------------------------------------------
  866. !
  867. REWIND( numnam_ice_ref ) ! Namelist namicetdme in reference namelist : Ice mechanical ice redistribution
  868. READ ( numnam_ice_ref, namiceitdme, IOSTAT = ios, ERR = 901)
  869. 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitdme in reference namelist', lwp )
  870. REWIND( numnam_ice_cfg ) ! Namelist namiceitdme in configuration namelist : Ice mechanical ice redistribution
  871. READ ( numnam_ice_cfg, namiceitdme, IOSTAT = ios, ERR = 902 )
  872. 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitdme in configuration namelist', lwp )
  873. IF(lwm) WRITE ( numoni, namiceitdme )
  874. !
  875. IF (lwp) THEN ! control print
  876. WRITE(numout,*)
  877. WRITE(numout,*)' lim_itd_me_init : ice parameters for mechanical ice redistribution '
  878. WRITE(numout,*)' ~~~~~~~~~~~~~~~'
  879. WRITE(numout,*)' Fraction of shear energy contributing to ridging rn_cs = ', rn_cs
  880. WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrdg = ', rn_fsnowrdg
  881. WRITE(numout,*)' Fraction of snow volume conserved during ridging rn_fsnowrft = ', rn_fsnowrft
  882. WRITE(numout,*)' Fraction of total ice coverage contributing to ridging rn_gstar = ', rn_gstar
  883. WRITE(numout,*)' Equivalent to G* for an exponential part function rn_astar = ', rn_astar
  884. WRITE(numout,*)' Quantity playing a role in max ridged ice thickness rn_hstar = ', rn_hstar
  885. WRITE(numout,*)' Rafting of ice sheets or not ln_rafting = ', ln_rafting
  886. WRITE(numout,*)' Parmeter thickness (threshold between ridge-raft) rn_hraft = ', rn_hraft
  887. WRITE(numout,*)' Rafting hyperbolic tangent coefficient rn_craft = ', rn_craft
  888. WRITE(numout,*)' Initial porosity of ridges rn_por_rdg = ', rn_por_rdg
  889. WRITE(numout,*)' Switch for part. function (0) linear (1) exponential nn_partfun = ', nn_partfun
  890. ENDIF
  891. !
  892. END SUBROUTINE lim_itd_me_init
  893. #else
  894. !!----------------------------------------------------------------------
  895. !! Default option Empty module NO LIM-3 sea-ice model
  896. !!----------------------------------------------------------------------
  897. CONTAINS
  898. SUBROUTINE lim_itd_me ! Empty routines
  899. END SUBROUTINE lim_itd_me
  900. SUBROUTINE lim_itd_me_icestrength
  901. END SUBROUTINE lim_itd_me_icestrength
  902. SUBROUTINE lim_itd_me_init
  903. END SUBROUTINE lim_itd_me_init
  904. #endif
  905. !!======================================================================
  906. END MODULE limitd_me