thd_ice.F90 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. MODULE thd_ice
  2. !!======================================================================
  3. !! *** MODULE thd_ice ***
  4. !! LIM sea-ice : Ice thermodynamics in 1D
  5. !!=====================================================================
  6. !! History : 3.0 ! 2002-11 (C. Ethe) F90: Free form and module
  7. !!----------------------------------------------------------------------
  8. USE in_out_manager ! I/O manager
  9. USE lib_mpp ! MPP library
  10. USE ice, ONLY : nlay_i, nlay_s
  11. IMPLICIT NONE
  12. PRIVATE
  13. PUBLIC thd_ice_alloc ! Routine called by nemogcm.F90
  14. !!---------------------------
  15. !! * Share Module variables
  16. !!---------------------------
  17. ! !!! ** ice-thermo namelist (namicethd) **
  18. REAL(wp), PUBLIC :: rn_himin !: minimum ice thickness
  19. REAL(wp), PUBLIC :: rn_maxfrazb !: maximum portion of frazil ice collecting at the ice bottom
  20. REAL(wp), PUBLIC :: rn_vfrazb !: threshold drift speed for collection of bottom frazil ice
  21. REAL(wp), PUBLIC :: rn_Cfrazb !: squeezing coefficient for collection of bottom frazil ice
  22. REAL(wp), PUBLIC :: rn_hnewice !: thickness for new ice formation (m)
  23. LOGICAL , PUBLIC :: ln_frazil !: use of frazil ice collection as function of wind (T) or not (F)
  24. !!-----------------------------
  25. !! * Share 1D Module variables
  26. !!-----------------------------
  27. !: In ice thermodynamics, to spare memory, the vectors are folded
  28. !: from 1D to 2D vectors. The following variables, with ending _1d
  29. !: are the variables corresponding to 2d vectors
  30. INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: npb !: address vector for 1d vertical thermo computations
  31. INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: nplm !: address vector for mono-category lateral melting
  32. INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: npac !: address vector for new ice formation
  33. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qlead_1d
  34. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ftr_ice_1d
  35. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qsr_ice_1d
  36. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fr1_i0_1d
  37. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fr2_i0_1d
  38. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qns_ice_1d
  39. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: t_bo_1d
  40. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rn_amax_1d
  41. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_sum_1d
  42. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_bom_1d
  43. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_bog_1d
  44. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_dif_1d
  45. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_opw_1d
  46. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_snw_1d
  47. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_1d
  48. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_rem_1d
  49. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_err_dif_1d
  50. ! heat flux associated with ice-atmosphere mass exchange
  51. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_sub_1d
  52. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_spr_1d
  53. ! heat flux associated with ice-ocean mass exchange
  54. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_thd_1d
  55. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hfx_res_1d
  56. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_snw_1d
  57. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_sub_1d
  58. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_bog_1d
  59. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_bom_1d
  60. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_sum_1d
  61. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_sni_1d
  62. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_opw_1d
  63. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_res_1d
  64. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: wfx_spr_1d
  65. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_bri_1d
  66. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_bog_1d
  67. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_bom_1d
  68. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_sum_1d
  69. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_sni_1d
  70. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_opw_1d
  71. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_res_1d
  72. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sfx_sub_1d
  73. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sprecip_1d !: <==> the 2D sprecip
  74. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: frld_1d !: <==> the 2D frld
  75. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: at_i_1d !: <==> the 2D at_i
  76. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fhtur_1d !: <==> the 2D fhtur
  77. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fhld_1d !: <==> the 2D fhld
  78. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dqns_ice_1d !: <==> the 2D dqns_ice
  79. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: evap_ice_1d !: <==> the 2D evap_ice
  80. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qprec_ice_1d !: <==> the 2D qprec_ice
  81. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: qevap_ice_1d !: <==> the 3D qevap_ice
  82. ! ! to reintegrate longwave flux inside the ice thermodynamics
  83. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: i0 !: fraction of radiation transmitted to the ice
  84. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_fl_1d !: Ice salinity variations due to flushing
  85. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_gd_1d !: Ice salinity variations due to gravity drainage
  86. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_se_1d !: Ice salinity variations due to basal salt entrapment
  87. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dsm_i_si_1d !: Ice salinity variations due to lateral accretion
  88. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: hicol_1d !: Ice collection thickness accumulated in leads
  89. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: t_su_1d !: <==> the 2D t_su
  90. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: a_i_1d !: <==> the 2D a_i
  91. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ht_i_1d !: <==> the 2D ht_s
  92. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ht_s_1d !: <==> the 2D ht_i
  93. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_su !: Surface Conduction flux
  94. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: fc_bo_i !: Bottom Conduction flux
  95. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_s_tot !: Snow accretion/ablation [m]
  96. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_i_surf !: Ice surface accretion/ablation [m]
  97. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_i_sub !: Ice surface sublimation [m]
  98. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_i_bott !: Ice bottom accretion/ablation [m]
  99. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: dh_snowice !: Snow ice formation [m of ice]
  100. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sm_i_1d !: Ice bulk salinity [ppt]
  101. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: s_i_new !: Salinity of new ice at the bottom
  102. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_s_1d !: corresponding to the 2D var t_s
  103. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_i_1d !: corresponding to the 2D var t_i
  104. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: s_i_1d !: profiled ice salinity
  105. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_i_1d !: Ice enthalpy per unit volume
  106. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_s_1d !: Snow enthalpy per unit volume
  107. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qh_i_old !: ice heat content (q*h, J.m-2)
  108. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_i_old !: ice thickness layer (m)
  109. INTEGER , PUBLIC :: jiindex_1d ! 1D index of debugging point
  110. !!----------------------------------------------------------------------
  111. !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
  112. !! $Id: thd_ice.F90 4990 2014-12-15 16:42:49Z timgraham $
  113. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  114. !!----------------------------------------------------------------------
  115. CONTAINS
  116. FUNCTION thd_ice_alloc()
  117. !!---------------------------------------------------------------------!
  118. !! *** ROUTINE thd_ice_alloc ***
  119. !!---------------------------------------------------------------------!
  120. INTEGER :: thd_ice_alloc ! return value
  121. INTEGER :: ierr(3)
  122. !!---------------------------------------------------------------------!
  123. ALLOCATE( npb (jpij) , nplm (jpij) , npac (jpij) , &
  124. & qlead_1d (jpij) , ftr_ice_1d(jpij) , qsr_ice_1d (jpij) , &
  125. & fr1_i0_1d(jpij) , fr2_i0_1d (jpij) , qns_ice_1d(jpij) , &
  126. & t_bo_1d (jpij) , &
  127. & hfx_sum_1d(jpij) , hfx_bom_1d(jpij) ,hfx_bog_1d(jpij) , &
  128. & hfx_dif_1d(jpij) , hfx_opw_1d(jpij) , &
  129. & rn_amax_1d(jpij) , &
  130. & hfx_thd_1d(jpij) , hfx_spr_1d(jpij) , &
  131. & hfx_snw_1d(jpij) , hfx_sub_1d(jpij) , hfx_err_1d(jpij) , &
  132. & hfx_res_1d(jpij) , hfx_err_rem_1d(jpij) , hfx_err_dif_1d(jpij) , STAT=ierr(1) )
  133. #if defined key_init_alloc_zero
  134. npb = 0
  135. nplm = 0
  136. npac = 0
  137. qlead_1d = 0
  138. ftr_ice_1d = 0
  139. qsr_ice_1d = 0
  140. fr1_i0_1d = 0
  141. fr2_i0_1d = 0
  142. qns_ice_1d = 0
  143. t_bo_1d = 0
  144. hfx_sum_1d = 0
  145. hfx_bom_1d = 0
  146. hfx_bog_1d = 0
  147. hfx_dif_1d = 0
  148. hfx_opw_1d = 0
  149. rn_amax_1d = 0
  150. hfx_thd_1d = 0
  151. hfx_spr_1d = 0
  152. hfx_snw_1d = 0
  153. hfx_sub_1d = 0
  154. hfx_err_1d = 0
  155. hfx_res_1d = 0
  156. hfx_err_rem_1d = 0
  157. hfx_err_dif_1d = 0
  158. #elif defined key_init_alloc_huge
  159. npb = HUGE(npb)
  160. nplm = HUGE(nplm)
  161. npac = HUGE(npac)
  162. qlead_1d = HUGE(qlead_1d)
  163. ftr_ice_1d = HUGE(ftr_ice_1d)
  164. qsr_ice_1d = HUGE(qsr_ice_1d)
  165. fr1_i0_1d = HUGE(fr1_i0_1d)
  166. fr2_i0_1d = HUGE(fr2_i0_1d)
  167. qns_ice_1d = HUGE(qns_ice_1d)
  168. t_bo_1d = HUGE(t_bo_1d)
  169. hfx_sum_1d = HUGE(hfx_sum_1d)
  170. hfx_bom_1d = HUGE(hfx_bom_1d)
  171. hfx_bog_1d = HUGE(hfx_bog_1d)
  172. hfx_dif_1d = HUGE(hfx_dif_1d)
  173. hfx_opw_1d = HUGE(hfx_opw_1d)
  174. rn_amax_1d = HUGE(rn_amax_1d)
  175. hfx_thd_1d = HUGE(hfx_thd_1d)
  176. hfx_spr_1d = HUGE(hfx_spr_1d)
  177. hfx_snw_1d = HUGE(hfx_snw_1d)
  178. hfx_sub_1d = HUGE(hfx_sub_1d)
  179. hfx_err_1d = HUGE(hfx_err_1d)
  180. hfx_res_1d = HUGE(hfx_res_1d)
  181. hfx_err_rem_1d = HUGE(hfx_err_rem_1d)
  182. hfx_err_dif_1d = HUGE(hfx_err_dif_1d)
  183. #endif
  184. !
  185. ALLOCATE( sprecip_1d (jpij) , frld_1d (jpij) , at_i_1d (jpij) , &
  186. & fhtur_1d (jpij) , wfx_snw_1d (jpij) , wfx_spr_1d (jpij) , &
  187. & fhld_1d (jpij) , wfx_sub_1d (jpij) , wfx_bog_1d (jpij) , wfx_bom_1d(jpij) , &
  188. & wfx_sum_1d(jpij) , wfx_sni_1d (jpij) , wfx_opw_1d (jpij) , wfx_res_1d(jpij) , &
  189. & dqns_ice_1d(jpij) , evap_ice_1d (jpij), &
  190. & qprec_ice_1d(jpij), qevap_ice_1d(jpij), i0 (jpij) , &
  191. & sfx_bri_1d (jpij) , sfx_bog_1d (jpij) , sfx_bom_1d (jpij) , sfx_sum_1d (jpij), &
  192. & sfx_sni_1d (jpij) , sfx_opw_1d (jpij) , sfx_res_1d (jpij) , sfx_sub_1d (jpij), &
  193. & dsm_i_fl_1d(jpij) , dsm_i_gd_1d(jpij) , dsm_i_se_1d(jpij) , &
  194. & dsm_i_si_1d(jpij) , hicol_1d (jpij) , STAT=ierr(2) )
  195. #if defined key_init_alloc_zero
  196. sprecip_1d = 0
  197. frld_1d = 0
  198. at_i_1d = 0
  199. fhtur_1d = 0
  200. wfx_snw_1d = 0
  201. wfx_spr_1d = 0
  202. fhld_1d = 0
  203. wfx_sub_1d = 0
  204. wfx_bog_1d = 0
  205. wfx_bom_1d = 0
  206. wfx_sum_1d = 0
  207. wfx_sni_1d = 0
  208. wfx_opw_1d = 0
  209. wfx_res_1d = 0
  210. dqns_ice_1d = 0
  211. evap_ice_1d = 0
  212. qprec_ice_1d = 0
  213. qevap_ice_1d = 0
  214. i0 = 0
  215. sfx_bri_1d = 0
  216. sfx_bog_1d = 0
  217. sfx_bom_1d = 0
  218. sfx_sum_1d = 0
  219. sfx_sni_1d = 0
  220. sfx_opw_1d = 0
  221. sfx_res_1d = 0
  222. sfx_sub_1d = 0
  223. dsm_i_fl_1d = 0
  224. dsm_i_gd_1d = 0
  225. dsm_i_se_1d = 0
  226. dsm_i_si_1d = 0
  227. hicol_1d = 0
  228. #elif defined key_init_alloc_huge
  229. sprecip_1d = HUGE(sprecip_1d)
  230. frld_1d = HUGE(frld_1d)
  231. at_i_1d = HUGE(at_i_1d)
  232. fhtur_1d = HUGE(fhtur_1d)
  233. wfx_snw_1d = HUGE(wfx_snw_1d)
  234. wfx_spr_1d = HUGE(wfx_spr_1d)
  235. fhld_1d = HUGE(fhld_1d)
  236. wfx_sub_1d = HUGE(wfx_sub_1d)
  237. wfx_bog_1d = HUGE(wfx_bog_1d)
  238. wfx_bom_1d = HUGE(wfx_bom_1d)
  239. wfx_sum_1d = HUGE(wfx_sum_1d)
  240. wfx_sni_1d = HUGE(wfx_sni_1d)
  241. wfx_opw_1d = HUGE(wfx_opw_1d)
  242. wfx_res_1d = HUGE(wfx_res_1d)
  243. dqns_ice_1d = HUGE(dqns_ice_1d)
  244. evap_ice_1d = HUGE(evap_ice_1d)
  245. qprec_ice_1d = HUGE(qprec_ice_1d)
  246. qevap_ice_1d = HUGE(qevap_ice_1d)
  247. i0 = HUGE(i0)
  248. sfx_bri_1d = HUGE(sfx_bri_1d)
  249. sfx_bog_1d = HUGE(sfx_bog_1d)
  250. sfx_bom_1d = HUGE(sfx_bom_1d)
  251. sfx_sum_1d = HUGE(sfx_sum_1d)
  252. sfx_sni_1d = HUGE(sfx_sni_1d)
  253. sfx_opw_1d = HUGE(sfx_opw_1d)
  254. sfx_res_1d = HUGE(sfx_res_1d)
  255. sfx_sub_1d = HUGE(sfx_sub_1d)
  256. dsm_i_fl_1d = HUGE(dsm_i_fl_1d)
  257. dsm_i_gd_1d = HUGE(dsm_i_gd_1d)
  258. dsm_i_se_1d = HUGE(dsm_i_se_1d)
  259. dsm_i_si_1d = HUGE(dsm_i_si_1d)
  260. hicol_1d = HUGE(hicol_1d)
  261. #endif
  262. !
  263. ALLOCATE( t_su_1d (jpij) , a_i_1d (jpij) , ht_i_1d (jpij) , &
  264. & ht_s_1d (jpij) , fc_su (jpij) , fc_bo_i (jpij) , &
  265. & dh_s_tot (jpij) , dh_i_surf(jpij) , dh_i_sub (jpij) , &
  266. & dh_i_bott (jpij) ,dh_snowice(jpij) , sm_i_1d (jpij) , s_i_new (jpij) , &
  267. & t_s_1d(jpij,nlay_s) , t_i_1d(jpij,nlay_i) , s_i_1d(jpij,nlay_i) , &
  268. & q_i_1d(jpij,nlay_i+1) , q_s_1d(jpij,nlay_s) , &
  269. & qh_i_old(jpij,0:nlay_i+1), h_i_old(jpij,0:nlay_i+1) , STAT=ierr(3))
  270. #if defined key_init_alloc_zero
  271. t_su_1d = 0
  272. a_i_1d = 0
  273. ht_i_1d = 0
  274. ht_s_1d = 0
  275. fc_su = 0
  276. fc_bo_i = 0
  277. dh_s_tot = 0
  278. dh_i_surf = 0
  279. dh_i_sub = 0
  280. dh_i_bott = 0
  281. dh_snowice = 0
  282. sm_i_1d = 0
  283. s_i_new = 0
  284. t_s_1d = 0
  285. t_i_1d = 0
  286. s_i_1d = 0
  287. q_i_1d = 0
  288. q_s_1d = 0
  289. qh_i_old = 0
  290. h_i_old = 0
  291. #elif defined key_init_alloc_huge
  292. t_su_1d = HUGE(t_su_1d)
  293. a_i_1d = HUGE(a_i_1d)
  294. ht_i_1d = HUGE(ht_i_1d)
  295. ht_s_1d = HUGE(ht_s_1d)
  296. fc_su = HUGE(fc_su)
  297. fc_bo_i = HUGE(fc_bo_i)
  298. dh_s_tot = HUGE(dh_s_tot)
  299. dh_i_surf = HUGE(dh_i_surf)
  300. dh_i_sub = HUGE(dh_i_sub)
  301. dh_i_bott = HUGE(dh_i_bott)
  302. dh_snowice = HUGE(dh_snowice)
  303. sm_i_1d = HUGE(sm_i_1d)
  304. s_i_new = HUGE(s_i_new)
  305. t_s_1d = HUGE(t_s_1d)
  306. t_i_1d = HUGE(t_i_1d)
  307. s_i_1d = HUGE(s_i_1d)
  308. q_i_1d = HUGE(q_i_1d)
  309. q_s_1d = HUGE(q_s_1d)
  310. qh_i_old = HUGE(qh_i_old)
  311. h_i_old = HUGE(h_i_old)
  312. #endif
  313. !
  314. thd_ice_alloc = MAXVAL( ierr )
  315. IF( thd_ice_alloc /= 0 ) CALL ctl_warn( 'thd_ice_alloc: failed to allocate arrays.' )
  316. !
  317. END FUNCTION thd_ice_alloc
  318. !!======================================================================
  319. END MODULE thd_ice