New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
icethd.F90 in branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/LIM_SRC_3 – NEMO

source: branches/UKMO/dev_r8126_LIM3_couple/NEMOGCM/NEMO/LIM_SRC_3/icethd.F90

Last change on this file was 8892, checked in by frrh, 7 years ago

Commit updates with debugging write statements.

File size: 38.5 KB
Line 
1MODULE icethd
2   !!======================================================================
3   !!                  ***  MODULE icethd   ***
4   !!   sea-ice : master routine for thermodynamics
5   !!======================================================================
6   !! History :  LIM  ! 2000-01 (M.A. Morales Maqueda, H. Goosse, T. Fichefet) LIM-1
7   !!            2.0  ! 2002-07 (C. Ethe, G. Madec)  LIM-2 (F90 rewriting)
8   !!            3.0  ! 2005-11 (M. Vancoppenolle)  LIM-3 : Multi-layer thermodynamics + salinity variations
9   !!             -   ! 2007-04 (M. Vancoppenolle) add ice_thd_glohec, ice_thd_con_dh and ice_thd_con_dif
10   !!            3.2  ! 2009-07 (M. Vancoppenolle, Y. Aksenov, G. Madec) bug correction in wfx_snw
11   !!            3.3  ! 2010-11 (G. Madec) corrected snow melting heat (due to factor betas)
12   !!            4.0  ! 2011-02 (G. Madec) dynamical allocation
13   !!             -   ! 2012-05 (C. Rousset) add penetration solar flux
14   !!----------------------------------------------------------------------
15#if defined key_lim3
16   !!----------------------------------------------------------------------
17   !!   'key_lim3'                                       ESIM sea-ice model
18   !!----------------------------------------------------------------------
19   !!   ice_thd       : thermodynamics of sea ice
20   !!   ice_thd_init  : initialisation of sea-ice thermodynamics
21   !!----------------------------------------------------------------------
22   USE phycst         ! physical constants
23   USE dom_oce        ! ocean space and time domain variables
24   USE ice            ! sea-ice: variables
25!!gm list trop longue ==>>> why not passage en argument d'appel ?
26   USE sbc_oce , ONLY : sss_m, sst_m, e3t_m, utau, vtau, ssu_m, ssv_m, frq_m, qns_tot, qsr_tot, sprecip, ln_cpl
27   USE sbc_ice , ONLY : qsr_oce, qns_oce, qemp_oce, qsr_ice, qns_ice, dqns_ice, evap_ice, qprec_ice, qevap_ice, &
28      &                 qml_ice, qcn_ice, qsr_ice_tr
29   USE ice1D          ! sea-ice: thermodynamics variables
30   USE icethd_zdf     ! sea-ice: vertical heat diffusion
31   USE icethd_dh      ! sea-ice: ice-snow growth and melt
32   USE icethd_da      ! sea-ice: lateral melting
33   USE icethd_sal     ! sea-ice: salinity
34   USE icethd_ent     ! sea-ice: enthalpy redistribution
35   USE icethd_do      ! sea-ice: growth in open water
36   USE icethd_pnd     ! sea-ice: melt ponds
37   USE iceitd         ! sea-ice: remapping thickness distribution
38   USE icetab         ! sea-ice: 1D <==> 2D transformation
39   USE icevar         ! sea-ice: operations
40   USE icectl         ! sea-ice: control print
41   !
42   USE in_out_manager ! I/O manager
43   USE lib_mpp        ! MPP library
44   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
45   USE lbclnk         ! lateral boundary conditions (or mpp links)
46   USE timing         ! Timing
47
48   IMPLICIT NONE
49   PRIVATE
50
51   PUBLIC   ice_thd         ! called by limstp module
52   PUBLIC   ice_thd_init    ! called by ice_init
53
54   !!** namelist (namthd) **
55   LOGICAL ::   ln_icedH         ! activate ice thickness change from growing/melting (T) or not (F)
56   LOGICAL ::   ln_icedA         ! activate lateral melting param. (T) or not (F)
57   LOGICAL ::   ln_icedO         ! activate ice growth in open-water (T) or not (F)
58   LOGICAL ::   ln_icedS         ! activate gravity drainage and flushing (T) or not (F)
59
60   !! * Substitutions
61#  include "vectopt_loop_substitute.h90"
62   !!----------------------------------------------------------------------
63   !! NEMO/ICE 4.0 , NEMO Consortium (2017)
64   !! $Id: icethd.F90 8420 2017-08-08 12:18:46Z clem $
65   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
66   !!----------------------------------------------------------------------
67CONTAINS
68
69   SUBROUTINE ice_thd( kt )
70      !!-------------------------------------------------------------------
71      !!                ***  ROUTINE ice_thd  ***       
72      !! 
73      !! ** Purpose : This routine manages ice thermodynamics
74      !!         
75      !! ** Action : - Initialisation of some variables
76      !!             - Some preliminary computation (oceanic heat flux
77      !!               at the ice base, snow acc.,heat budget of the leads)
78      !!             - selection of the icy points and put them in an array
79      !!             - call ice_thd_zdf  for vertical heat diffusion
80      !!             - call ice_thd_dh   for vertical ice growth and melt
81      !!             - call ice_thd_ent  for enthalpy remapping
82      !!             - call ice_thd_sal  for ice desalination
83      !!             - call ice_thd_temp to  retrieve temperature from ice enthalpy
84      !!             - call ice_thd_lam  for extra lateral ice melt if monocat
85      !!             - call ice_thd_da   for lateral ice melt
86      !!             - back to the geographic grid
87      !!             - call ice_thd_rem  for remapping thickness distribution
88      !!             - call ice_thd_do   for ice growth in leads
89      !!-------------------------------------------------------------------
90      INTEGER, INTENT(in) :: kt    ! number of iteration
91      !
92      INTEGER  :: ji, jj, jk, jl   ! dummy loop indices
93      REAL(wp) :: zfric_u, zqld, zqfr, zqfr_neg
94      REAL(wp), PARAMETER :: zfric_umin = 0._wp           ! lower bound for the friction velocity (cice value=5.e-04)
95      REAL(wp), PARAMETER :: zch        = 0.0057_wp       ! heat transfer coefficient
96      REAL(wp), DIMENSION(jpi,jpj) ::   zu_io, zv_io, zfric   ! ice-ocean velocity (m/s) and frictional velocity (m2/s2)
97      !
98      !!-------------------------------------------------------------------
99      ! controls
100      IF( nn_timing == 1 )   CALL timing_start('icethd')                                                             ! timing
101
102write(numout,*) "RSRH icethd AA", kt; flush(numout)
103      IF( ln_icediachk   )   CALL ice_cons_hsm(0, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
104write(numout,*) "RSRH icethd BB", kt; flush(numout)
105
106write(numout,*) "RSRH icethd BB u_ice", kt, glob_sum(u_ice(:,:)); flush(numout)
107write(numout,*) "RSRH icethd BB v_ice", kt, glob_sum(v_ice(:,:)); flush(numout)
108write(numout,*) "RSRH icethd BB ssu_m", kt, glob_sum(ssu_m(:,:)); flush(numout)
109write(numout,*) "RSRH icethd BB ssv_m", kt, glob_sum(ssv_m(:,:)); flush(numout)
110      IF( kt == nit000 .AND. lwp ) THEN
111         WRITE(numout,*)
112         WRITE(numout,*) 'ice_thd: sea-ice thermodynamics'
113         WRITE(numout,*) '~~~~~~~'
114      ENDIF
115write(numout,*) "RSRH icethd CC", kt; flush(numout)
116     
117      CALL ice_var_glo2eqv
118write(numout,*) "RSRH icethd DD", kt; flush(numout)
119     
120      ! RSRH. zfric needs to be properly initialised....Duuuuhh!
121      zfric(:,:) = 0.0 
122
123      !---------------------------------------------!
124      ! computation of friction velocity at T points
125      !---------------------------------------------!
126      IF( ln_icedyn ) THEN
127write(numout,*) "RSRH icethd EE in", kt; flush(numout)
128         zu_io(:,:) = u_ice(:,:) - ssu_m(:,:)
129         zv_io(:,:) = v_ice(:,:) - ssv_m(:,:)
130
131write(numout,*) "RSRH icethd EE u_ice", kt, glob_sum(u_ice(:,:)); flush(numout)
132write(numout,*) "RSRH icethd EE v_ice", kt, glob_sum(v_ice(:,:)); flush(numout)
133write(numout,*) "RSRH icethd EE ssu_m", kt, glob_sum(ssu_m(:,:)); flush(numout)
134write(numout,*) "RSRH icethd EE ssv_m", kt, glob_sum(ssv_m(:,:)); flush(numout)
135write(numout,*) "RSRH icethd EE zu_io", kt, glob_sum(zu_io(:,:)); flush(numout)
136write(numout,*) "RSRH icethd EE zv_io", kt, glob_sum(zv_io(:,:)); flush(numout)
137
138write(numout,*) "RSRH PE icethd EE u_ice", kt, sum(u_ice(:,:)); flush(numout)
139write(numout,*) "RSRH PE icethd EE v_ice", kt, sum(v_ice(:,:)); flush(numout)
140write(numout,*) "RSRH PE icethd EE ssu_m", kt, sum(ssu_m(:,:)); flush(numout)
141write(numout,*) "RSRH PE icethd EE ssv_m", kt, sum(ssv_m(:,:)); flush(numout)
142write(numout,*) "RSRH PE icethd EE zu_io", kt, sum(zu_io(:,:)); flush(numout)
143write(numout,*) "RSRH PE icethd EE zv_io", kt, sum(zv_io(:,:)); flush(numout)
144   
145
146         DO jj = 2, jpjm1 
147            DO ji = fs_2, fs_jpim1
148               zfric(ji,jj) = rn_cio * ( 0.5_wp *  &
149                  &                    (  zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj)   &
150                  &                     + zv_io(ji,jj) * zv_io(ji,jj) + zv_io(ji,jj-1) * zv_io(ji,jj-1) ) ) * tmask(ji,jj,1)
151            END DO
152         END DO
153write(numout,*) "RSRH icethd EE", kt; flush(numout)
154      ELSE      !  if no ice dynamics => transmit directly the atmospheric stress to the ocean
155write(numout,*) "RSRH icethd FF in", kt; flush(numout)
156         DO jj = 2, jpjm1
157            DO ji = fs_2, fs_jpim1
158               zfric(ji,jj) = r1_rau0 * SQRT( 0.5_wp *  &
159                  &                         (  utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj)   &
160                  &                          + vtau(ji,jj) * vtau(ji,jj) + vtau(ji,jj-1) * vtau(ji,jj-1) ) ) * tmask(ji,jj,1)
161            END DO
162         END DO
163      ENDIF
164write(numout,*) "RSRH icethd GG", kt; flush(numout)
165write(numout,*) "RSRH icethd GG pre zfric link", kt; flush(numout)
166write(numout,*) "RSRH icethd GG sum pre zfric link", kt, glob_sum(zfric(:,:)); flush(numout)
167write(numout,*) "RSRH PE icethd GG sum pre zfric link SUM", kt, sum(zfric(:,:)); flush(numout)
168
169      CALL lbc_lnk( zfric, 'T',  1. )
170 write(numout,*) "RSRH icethd GG after zfric link", kt; flush(numout)
171     !
172      ftr_ice(:,:,:) = 0._wp  ! initialization (part of solar radiation transmitted through the ice)
173
174write(numout,*) "RSRH GG at_i", glob_sum(at_i(:,:)); flush(numout)
175write(numout,*) "RSRH GG at_i_b", glob_sum(at_i_b(:,:)); flush(numout)
176write(numout,*) "RSRH GG qsr_oce", glob_sum(qsr_oce(:,:)); flush(numout)
177write(numout,*) "RSRH GG qns_oce", glob_sum(qns_oce(:,:)); flush(numout)
178write(numout,*) "RSRH GG frq_m", glob_sum(frq_m(:,:)); flush(numout)
179write(numout,*) "RSRH GG qemp_oce", glob_sum(qemp_oce(:,:)); flush(numout)
180write(numout,*) "RSRH GG e3t_m", glob_sum(e3t_m(:,:)); flush(numout)
181write(numout,*) "RSRH GG t_bo", glob_sum(t_bo(:,:)); flush(numout)
182write(numout,*) "RSRH GG sst_m", glob_sum(sst_m(:,:)); flush(numout)
183
184write(numout,*) "RSRH GG zfric", glob_sum(zfric(:,:)); flush(numout)
185
186      !--------------------------------------------------------------------!
187      ! Partial computation of forcing for the thermodynamic sea ice model
188      !--------------------------------------------------------------------!
189      DO jj = 1, jpj
190         DO ji = 1, jpi
191            rswitch  = tmask(ji,jj,1) * MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi10 ) ) ! 0 if no ice
192            !
193            !           !  solar irradiance transmission at the mixed layer bottom and used in the lead heat budget
194            !           !  practically no "direct lateral ablation"
195            !           
196            !           !  net downward heat flux from the ice to the ocean, expressed as a function of ocean
197            !           !  temperature and turbulent mixing (McPhee, 1992)
198            !
199            ! --- Energy received in the lead, zqld is defined everywhere (J.m-2) --- !
200            zqld =  tmask(ji,jj,1) * rdt_ice *  &
201               &    ( ( 1._wp - at_i_b(ji,jj) ) * qsr_oce(ji,jj) * frq_m(ji,jj) +  &
202               &      ( 1._wp - at_i_b(ji,jj) ) * qns_oce(ji,jj) + qemp_oce(ji,jj) )
203
204            ! --- Energy needed to bring ocean surface layer until its freezing (<0, J.m-2) --- !
205            ! includes supercooling potential energy (>0) or "above-freezing" energy (<0)
206            zqfr = tmask(ji,jj,1) * rau0 * rcp * e3t_m(ji,jj) * ( t_bo(ji,jj) - ( sst_m(ji,jj) + rt0 ) )
207
208            ! --- Above-freezing sensible heat content (J/m2 grid)
209            zqfr_neg = tmask(ji,jj,1) * rau0 * rcp * e3t_m(ji,jj) * MIN( ( t_bo(ji,jj) - ( sst_m(ji,jj) + rt0 ) ), 0._wp )
210
211            ! --- Sensible ocean-to-ice heat flux (W/m2)
212            zfric_u      = MAX( SQRT( zfric(ji,jj) ), zfric_umin ) 
213            fhtur(ji,jj) = rswitch * rau0 * rcp * zch  * zfric_u * ( ( sst_m(ji,jj) + rt0 ) - t_bo(ji,jj) ) ! W.m-2
214
215            fhtur(ji,jj) = rswitch * MIN( fhtur(ji,jj), - zqfr_neg * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) )
216            ! upper bound for fhtur: the heat retrieved from the ocean must be smaller than the heat necessary to reach
217            !                        the freezing point, so that we do not have SST < T_freeze
218            !                        This implies: - ( fhtur(ji,jj) * at_i(ji,jj) * rtdice ) - zqfr >= 0
219
220            !-- Energy Budget of the leads (J.m-2), source of lateral accretion. Must be < 0 to form ice
221            qlead(ji,jj) = MIN( 0._wp , zqld - ( fhtur(ji,jj) * at_i(ji,jj) * rdt_ice ) - zqfr )
222
223            ! If there is ice and leads are warming, then transfer energy from the lead budget and use it for bottom melting
224            IF( zqld > 0._wp ) THEN
225               fhld (ji,jj) = rswitch * zqld * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) ! divided by at_i since this is (re)multiplied by a_i in icethd_dh.F90
226               qlead(ji,jj) = 0._wp
227            ELSE
228               fhld (ji,jj) = 0._wp
229            ENDIF
230            !
231            ! Net heat flux on top of the ice-ocean [W.m-2]
232            ! ---------------------------------------------
233            hfx_in(ji,jj) = qns_tot(ji,jj) + qsr_tot(ji,jj) 
234         END DO
235      END DO
236write(numout,*) "RSRH icethd HH", kt; flush(numout)
237     
238      ! In case we bypass open-water ice formation
239      IF( .NOT. ln_icedO )  qlead(:,:) = 0._wp
240      ! In case we bypass growing/melting from top and bottom: we suppose ice is impermeable => ocean is isolated from atmosphere
241      IF( .NOT. ln_icedH ) THEN
242         hfx_in(:,:) = ( 1._wp - at_i_b(:,:) ) * ( qns_oce(:,:) + qsr_oce(:,:) ) + qemp_oce(:,:)
243         fhtur (:,:) = 0._wp
244         fhld  (:,:) = 0._wp
245      ENDIF
246
247      ! ---------------------------------------------------------------------
248      ! Net heat flux on top of the ocean after ice thermo (1st step) [W.m-2]
249      ! ---------------------------------------------------------------------
250      !     First  step here              :  non solar + precip - qlead - qturb
251      !     Second step in icethd_dh      :  heat remaining if total melt (zq_rema)
252      !     Third  step in iceupdate.F90  :  heat from ice-ocean mass exchange (zf_mass) + solar
253      hfx_out(:,:) = ( 1._wp - at_i_b(:,:) ) * qns_oce(:,:) + qemp_oce(:,:)  &  ! Non solar heat flux received by the ocean               
254         &           - qlead(:,:) * r1_rdtice                                &  ! heat flux taken from the ocean where there is open water ice formation
255         &           - at_i (:,:) * fhtur(:,:)                               &  ! heat flux taken by turbulence
256         &           - at_i (:,:) *  fhld(:,:)                                  ! heat flux taken during bottom growth/melt
257                                                                                !    (fhld should be 0 while bott growth)
258write(numout,*) "RSRH icethd II", kt; flush(numout)
259      !-------------------------------------------------------------------------------------------!
260      ! Thermodynamic computation (only on grid points covered by ice) => loop over ice categories
261      !-------------------------------------------------------------------------------------------!
262      DO jl = 1, jpl
263
264 write(numout,*) "RSRH icethd JJ for Jl",jl, kt; flush(numout)
265        ! select ice covered grid points
266         npti = 0 ; nptidx(:) = 0
267         DO jj = 1, jpj
268            DO ji = 1, jpi
269               IF ( a_i(ji,jj,jl) > epsi10 ) THEN     
270                  npti         = npti  + 1
271                  nptidx(npti) = (jj - 1) * jpi + ji
272               ENDIF
273            END DO
274         END DO
275
276write(numout,*) "RSRH icethd KK for Jl",jl, kt; flush(numout)
277         IF( lk_mpp )         CALL mpp_ini_ice( npti , numout )
278
279write(numout,*) "RSRH icethd LL for Jl",jl, kt; flush(numout)
280         IF( npti > 0 ) THEN  ! If there is no ice, do nothing.
281            !                                                               
282                              CALL ice_thd_1d2d( jl, 1 )            ! --- Move to 1D arrays --- !
283            !                                                       ! --- & Change units of e_i, e_s from J/m2 to J/m3 --- !
284write(numout,*) "RSRH icethd MM for Jl",jl, kt; flush(numout)
285            !
286            s_i_new   (1:npti) = 0._wp ; dh_s_tot (1:npti) = 0._wp  ! --- some init --- !  (important to have them here)
287            dh_i_surf (1:npti) = 0._wp ; dh_i_bott(1:npti) = 0._wp
288            dh_snowice(1:npti) = 0._wp ; dh_i_sub (1:npti) = 0._wp ; dh_s_mlt(1:npti) = 0._wp
289            !
290            IF( ln_icedH ) THEN                                     ! --- growing/melting --- !
291                              CALL ice_thd_zdf                             ! Ice/Snow Temperature profile
292                              CALL ice_thd_dh                              ! Ice/Snow thickness   
293                              CALL ice_thd_pnd                             ! Melt ponds formation
294                              CALL ice_thd_ent( e_i_1d(1:npti,:) )         ! Ice enthalpy remapping
295            ENDIF
296write(numout,*) "RSRH icethd NN for Jl",jl, kt; flush(numout)
297            !
298                              CALL ice_thd_sal( ln_icedS )          ! --- Ice salinity --- !   
299write(numout,*) "RSRH icethd OO for Jl",jl, kt; flush(numout)
300            !
301                              CALL ice_thd_temp                     ! --- temperature update --- !
302write(numout,*) "RSRH icethd PP for Jl",jl, kt; flush(numout)
303            !
304!!gm please create a new logical (l_thd_lam or a better explicit name) set one for all in icestp.F90 module
305!!gm        l_thd_lam = ln_icedH .AND. ( ( nn_monocat == 1 .OR. nn_monocat == 4 ) .AND. jpl == 1 )
306!!gm        by the way, the different options associated with nn_monocat =1 to 4  are quite impossible to identify
307!!gm        more comment to add when ready the namelist, with an explicit print in the ocean.output
308            IF( ln_icedH ) THEN
309               IF ( ( nn_monocat == 1 .OR. nn_monocat == 4 ) .AND. jpl == 1 ) THEN
310                              CALL ice_thd_lam                      ! --- extra lateral melting if monocat --- !
311               END IF
312            END IF
313            !
314write(numout,*) "RSRH icethd QQ for Jl",jl, kt; flush(numout)
315            IF( ln_icedA )    CALL ice_thd_da                       ! --- lateral melting --- !
316            !
317write(numout,*) "RSRH icethd RR for Jl",jl, kt; flush(numout)
318                              CALL ice_thd_1d2d( jl, 2 )            ! --- Change units of e_i, e_s from J/m3 to J/m2 --- !
319            !                                                       ! --- & Move to 2D arrays --- !
320write(numout,*) "RSRH icethd SS for Jl",jl, kt; flush(numout)
321            !
322            IF( lk_mpp )      CALL mpp_comm_free( ncomm_ice ) !RB necessary ??
323         ENDIF
324         !
325      END DO
326      ! update ice age (in case a_i changed, i.e. becomes 0 or lateral melting)
327      oa_i(:,:,:) = o_i(:,:,:) * a_i(:,:,:)
328
329      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icethd', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft)
330write(numout,*) "RSRH icethd UU for Jl",jl, kt; flush(numout)
331      !
332                           CALL ice_var_zapsmall           ! --- remove very small ice concentration (<1e-10) --- !
333write(numout,*) "RSRH icethd VV for Jl",jl, kt; flush(numout)
334      !                                                    !     & make sure at_i=SUM(a_i) & ato_i=1 where at_i=0
335      !                   
336      IF( jpl > 1 )        CALL ice_itd_rem( kt )          ! --- Transport ice between thickness categories --- !
337      !
338      IF( ln_icedO )       CALL ice_thd_do                 ! --- frazil ice growing in leads --- !
339      !
340      ! controls
341      IF( ln_icectl      )   CALL ice_prt    (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints
342      IF( ln_ctl         )   CALL ice_prt3D  ('icethd')                                        ! prints
343      IF( nn_timing == 1 )   CALL timing_stop('icethd')                                        ! timing
344      !
345   END SUBROUTINE ice_thd 
346
347 
348   SUBROUTINE ice_thd_temp
349      !!-----------------------------------------------------------------------
350      !!                   ***  ROUTINE ice_thd_temp ***
351      !!                 
352      !! ** Purpose :   Computes sea ice temperature (Kelvin) from enthalpy
353      !!
354      !! ** Method  :   Formula (Bitz and Lipscomb, 1999)
355      !!-------------------------------------------------------------------
356      INTEGER  ::   ji, jk   ! dummy loop indices
357      REAL(wp) ::   ztmelts, zbbb, zccc  ! local scalar
358      !!-------------------------------------------------------------------
359      ! Recover ice temperature
360      DO jk = 1, nlay_i
361         DO ji = 1, npti
362            ztmelts       = -tmut * sz_i_1d(ji,jk)
363            ! Conversion q(S,T) -> T (second order equation)
364            zbbb          = ( rcp - cpic ) * ztmelts + e_i_1d(ji,jk) * r1_rhoic - lfus
365            zccc          = SQRT( MAX( zbbb * zbbb - 4._wp * cpic * lfus * ztmelts, 0._wp ) )
366            t_i_1d(ji,jk) = rt0 - ( zbbb + zccc ) * 0.5_wp * r1_cpic
367           
368            ! mask temperature
369            rswitch       = 1._wp - MAX( 0._wp , SIGN( 1._wp , - h_i_1d(ji) ) ) 
370            t_i_1d(ji,jk) = rswitch * t_i_1d(ji,jk) + ( 1._wp - rswitch ) * rt0
371         END DO
372      END DO 
373      !
374   END SUBROUTINE ice_thd_temp
375
376
377   SUBROUTINE ice_thd_lam
378      !!-----------------------------------------------------------------------
379      !!                   ***  ROUTINE ice_thd_lam ***
380      !!                 
381      !! ** Purpose :   Lateral melting in case monocategory
382      !!                          ( dA = A/2h dh )
383      !!-----------------------------------------------------------------------
384      INTEGER  ::   ji                 ! dummy loop indices
385      REAL(wp) ::   zhi_bef            ! ice thickness before thermo
386      REAL(wp) ::   zdh_mel, zda_mel   ! net melting
387      REAL(wp) ::   zvi, zvs           ! ice/snow volumes
388      !!-----------------------------------------------------------------------
389      !
390      DO ji = 1, npti
391         zdh_mel = MIN( 0._wp, dh_i_surf(ji) + dh_i_bott(ji) + dh_snowice(ji) + dh_i_sub(ji) )
392         IF( zdh_mel < 0._wp .AND. a_i_1d(ji) > 0._wp )  THEN
393            zvi          = a_i_1d(ji) * h_i_1d(ji)
394            zvs          = a_i_1d(ji) * h_s_1d(ji)
395            ! lateral melting = concentration change
396            zhi_bef     = h_i_1d(ji) - zdh_mel
397            rswitch     = MAX( 0._wp , SIGN( 1._wp , zhi_bef - epsi20 ) )
398            zda_mel     = rswitch * a_i_1d(ji) * zdh_mel / ( 2._wp * MAX( zhi_bef, epsi20 ) )
399            a_i_1d(ji)  = MAX( epsi20, a_i_1d(ji) + zda_mel ) 
400            ! adjust thickness
401            h_i_1d(ji) = zvi / a_i_1d(ji)           
402            h_s_1d(ji) = zvs / a_i_1d(ji)           
403            ! retrieve total concentration
404            at_i_1d(ji) = a_i_1d(ji)
405         END IF
406      END DO
407      !
408   END SUBROUTINE ice_thd_lam
409
410
411   SUBROUTINE ice_thd_1d2d( kl, kn )
412      !!-----------------------------------------------------------------------
413      !!                   ***  ROUTINE ice_thd_1d2d ***
414      !!                 
415      !! ** Purpose :   move arrays from 1d to 2d and the reverse
416      !!-----------------------------------------------------------------------
417      INTEGER, INTENT(in) ::   kl   ! index of the ice category
418      INTEGER, INTENT(in) ::   kn   ! 1= from 2D to 1D   ;   2= from 1D to 2D
419      !
420      INTEGER ::   jk   ! dummy loop indices
421      !!-----------------------------------------------------------------------
422      !
423      SELECT CASE( kn )
424      !                    !---------------------!
425      CASE( 1 )            !==  from 2D to 1D  ==!
426         !                 !---------------------!
427         CALL tab_2d_1d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i             )
428         CALL tab_2d_1d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl)     )
429         CALL tab_2d_1d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl)     )
430         CALL tab_2d_1d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl)     )
431         CALL tab_2d_1d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl)     )
432         CALL tab_2d_1d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl)     )
433         DO jk = 1, nlay_s
434            CALL tab_2d_1d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl)    )
435            CALL tab_2d_1d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl)    )
436         END DO
437         DO jk = 1, nlay_i
438            CALL tab_2d_1d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl)  )
439            CALL tab_2d_1d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl)  )
440            CALL tab_2d_1d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl)  )
441         END DO
442         CALL tab_2d_1d( npti, nptidx(1:npti), a_ip_1d     (1:npti), a_ip     (:,:,kl) )
443         CALL tab_2d_1d( npti, nptidx(1:npti), h_ip_1d     (1:npti), h_ip     (:,:,kl) )
444         CALL tab_2d_1d( npti, nptidx(1:npti), a_ip_frac_1d(1:npti), a_ip_frac(:,:,kl) )
445         !
446         CALL tab_2d_1d( npti, nptidx(1:npti), qprec_ice_1d(1:npti), qprec_ice        )
447         CALL tab_2d_1d( npti, nptidx(1:npti), qsr_ice_1d  (1:npti), qsr_ice (:,:,kl) )
448         CALL tab_2d_1d( npti, nptidx(1:npti), qns_ice_1d  (1:npti), qns_ice (:,:,kl) )
449         CALL tab_2d_1d( npti, nptidx(1:npti), ftr_ice_1d  (1:npti), ftr_ice (:,:,kl) )
450         CALL tab_2d_1d( npti, nptidx(1:npti), evap_ice_1d (1:npti), evap_ice(:,:,kl) )
451         CALL tab_2d_1d( npti, nptidx(1:npti), dqns_ice_1d (1:npti), dqns_ice(:,:,kl) )
452         CALL tab_2d_1d( npti, nptidx(1:npti), t_bo_1d     (1:npti), t_bo             )
453         CALL tab_2d_1d( npti, nptidx(1:npti), sprecip_1d  (1:npti), sprecip          ) 
454         CALL tab_2d_1d( npti, nptidx(1:npti), fhtur_1d    (1:npti), fhtur            )
455         CALL tab_2d_1d( npti, nptidx(1:npti), fhld_1d     (1:npti), fhld             )
456         
457         CALL tab_2d_1d( npti, nptidx(1:npti), qml_ice_1d   (1:npti), qml_ice      (:,:,kl)  )
458         CALL tab_2d_1d( npti, nptidx(1:npti), qcn_ice_1d   (1:npti), qcn_ice      (:,:,kl) )
459         CALL tab_2d_1d( npti, nptidx(1:npti), qsr_ice_tr_1d(1:npti), qsr_ice_tr   (:,:,kl) )
460         !
461         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni   )
462         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum   )
463         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sub_1d    (1:npti), wfx_sub       )
464         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub   )
465         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub   )
466         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub   )
467         !
468         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog          )
469         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom          )
470         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum          )
471         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni          )
472         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res          )
473         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr          )
474         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam          )
475         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_pnd_1d (1:npti), wfx_pnd          )
476         !
477         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog          )
478         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom          )
479         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum          )
480         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni          )
481         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri          )
482         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res          )
483         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub          )
484         CALL tab_2d_1d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam          )
485         !
486         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd          )
487         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr          )
488         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum          )
489         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom          )
490         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog          )
491         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif          )
492         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw          )
493         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw          )
494         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub          )
495         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res          )
496         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif   )
497         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_err_rem_1d(1:npti), hfx_err_rem   )
498         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_out_1d (1:npti), hfx_out          )
499         !
500         ! SIMIP diagnostics
501         CALL tab_2d_1d( npti, nptidx(1:npti), diag_fc_bo_1d(1:npti), diag_fc_bo   )
502         CALL tab_2d_1d( npti, nptidx(1:npti), diag_fc_su_1d(1:npti), diag_fc_su   )
503         ! ocean surface fields
504         CALL tab_2d_1d( npti, nptidx(1:npti), sst_1d(1:npti), sst_m )
505         CALL tab_2d_1d( npti, nptidx(1:npti), sss_1d(1:npti), sss_m )
506
507         ! --- Change units of e_i, e_s from J/m2 to J/m3 --- !
508         DO jk = 1, nlay_i
509            WHERE( h_i_1d(1:npti)>0._wp ) e_i_1d(1:npti,jk) = e_i_1d(1:npti,jk) / (h_i_1d(1:npti) * a_i_1d(1:npti)) * nlay_i
510         END DO
511         DO jk = 1, nlay_s
512            WHERE( h_s_1d(1:npti)>0._wp ) e_s_1d(1:npti,jk) = e_s_1d(1:npti,jk) / (h_s_1d(1:npti) * a_i_1d(1:npti)) * nlay_s
513         END DO
514         !
515         !                 !---------------------!
516      CASE( 2 )            !==  from 1D to 2D  ==!
517         !                 !---------------------!
518         ! --- Change units of e_i, e_s from J/m3 to J/m2 --- !
519         DO jk = 1, nlay_i
520            e_i_1d(1:npti,jk) = e_i_1d(1:npti,jk) * h_i_1d(1:npti) * a_i_1d(1:npti) * r1_nlay_i
521         END DO
522         DO jk = 1, nlay_s
523            e_s_1d(1:npti,jk) = e_s_1d(1:npti,jk) * h_s_1d(1:npti) * a_i_1d(1:npti) * r1_nlay_s
524         END DO
525         !
526         ! Change thickness to volume (replaces routine ice_var_eqv2glo)
527         v_i_1d (1:npti) = h_i_1d (1:npti) * a_i_1d (1:npti)
528         v_s_1d (1:npti) = h_s_1d (1:npti) * a_i_1d (1:npti)
529         sv_i_1d(1:npti) = s_i_1d (1:npti) * v_i_1d (1:npti)
530         v_ip_1d(1:npti) = h_ip_1d(1:npti) * a_ip_1d(1:npti)
531         
532         CALL tab_1d_2d( npti, nptidx(1:npti), at_i_1d(1:npti), at_i             )
533         CALL tab_1d_2d( npti, nptidx(1:npti), a_i_1d (1:npti), a_i (:,:,kl)     )
534         CALL tab_1d_2d( npti, nptidx(1:npti), h_i_1d (1:npti), h_i (:,:,kl)     )
535         CALL tab_1d_2d( npti, nptidx(1:npti), h_s_1d (1:npti), h_s (:,:,kl)     )
536         CALL tab_1d_2d( npti, nptidx(1:npti), t_su_1d(1:npti), t_su(:,:,kl)     )
537         CALL tab_1d_2d( npti, nptidx(1:npti), s_i_1d (1:npti), s_i (:,:,kl)     )
538         DO jk = 1, nlay_s
539            CALL tab_1d_2d( npti, nptidx(1:npti), t_s_1d(1:npti,jk), t_s(:,:,jk,kl)    )
540            CALL tab_1d_2d( npti, nptidx(1:npti), e_s_1d(1:npti,jk), e_s(:,:,jk,kl)    )
541         END DO
542         DO jk = 1, nlay_i
543            CALL tab_1d_2d( npti, nptidx(1:npti), t_i_1d (1:npti,jk), t_i (:,:,jk,kl)  )
544            CALL tab_1d_2d( npti, nptidx(1:npti), e_i_1d (1:npti,jk), e_i (:,:,jk,kl)  )
545            CALL tab_1d_2d( npti, nptidx(1:npti), sz_i_1d(1:npti,jk), sz_i(:,:,jk,kl)  )
546         END DO
547         CALL tab_1d_2d( npti, nptidx(1:npti), a_ip_1d     (1:npti), a_ip     (:,:,kl) )
548         CALL tab_1d_2d( npti, nptidx(1:npti), h_ip_1d     (1:npti), h_ip     (:,:,kl) )
549         CALL tab_1d_2d( npti, nptidx(1:npti), a_ip_frac_1d(1:npti), a_ip_frac(:,:,kl) )
550         !
551         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sni_1d(1:npti), wfx_snw_sni )
552         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sum_1d(1:npti), wfx_snw_sum )
553         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sub_1d    (1:npti), wfx_sub     )
554         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_sub_1d(1:npti), wfx_snw_sub )
555         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_ice_sub_1d(1:npti), wfx_ice_sub )
556         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_err_sub_1d(1:npti), wfx_err_sub )
557         !
558         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bog_1d (1:npti), wfx_bog        )
559         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_bom_1d (1:npti), wfx_bom        )
560         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sum_1d (1:npti), wfx_sum        )
561         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_sni_1d (1:npti), wfx_sni        )
562         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_res_1d (1:npti), wfx_res        )
563         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_spr_1d (1:npti), wfx_spr        )
564         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_lam_1d (1:npti), wfx_lam        )
565         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_pnd_1d (1:npti), wfx_pnd        )
566         !
567         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bog_1d (1:npti), sfx_bog        )
568         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bom_1d (1:npti), sfx_bom        )
569         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sum_1d (1:npti), sfx_sum        )
570         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sni_1d (1:npti), sfx_sni        )
571         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_bri_1d (1:npti), sfx_bri        )
572         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_res_1d (1:npti), sfx_res        )
573         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_sub_1d (1:npti), sfx_sub        )
574         CALL tab_1d_2d( npti, nptidx(1:npti), sfx_lam_1d (1:npti), sfx_lam        )
575         !
576         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_thd_1d (1:npti), hfx_thd        )
577         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_spr_1d (1:npti), hfx_spr        )
578         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sum_1d (1:npti), hfx_sum        )
579         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bom_1d (1:npti), hfx_bom        )
580         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_bog_1d (1:npti), hfx_bog        )
581         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_dif_1d (1:npti), hfx_dif        )
582         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_opw_1d (1:npti), hfx_opw        )
583         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_snw_1d (1:npti), hfx_snw        )
584         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_sub_1d (1:npti), hfx_sub        )
585         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_res_1d (1:npti), hfx_res        )
586         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_err_dif_1d(1:npti), hfx_err_dif )
587         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_err_rem_1d(1:npti), hfx_err_rem )
588         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_out_1d (1:npti), hfx_out        )
589         !
590         CALL tab_1d_2d( npti, nptidx(1:npti), qns_ice_1d(1:npti), qns_ice(:,:,kl) )
591         CALL tab_1d_2d( npti, nptidx(1:npti), ftr_ice_1d(1:npti), ftr_ice(:,:,kl) )
592         ! effective conductivity (for Jules coupling)
593         CALL tab_1d_2d( npti, nptidx(1:npti), cnd_ice_1d(1:npti), cnd_ice(:,:,kl) )
594         CALL tab_1d_2d( npti, nptidx(1:npti), t1_ice_1d (1:npti), t1_ice (:,:,kl) )
595         ! SIMIP diagnostics         
596         CALL tab_1d_2d( npti, nptidx(1:npti), t_si_1d      (1:npti), t_si(:,:,kl) )
597         CALL tab_1d_2d( npti, nptidx(1:npti), diag_fc_bo_1d(1:npti), diag_fc_bo   )
598         CALL tab_1d_2d( npti, nptidx(1:npti), diag_fc_su_1d(1:npti), diag_fc_su   )
599         ! extensive variables
600         CALL tab_1d_2d( npti, nptidx(1:npti), v_i_1d (1:npti), v_i (:,:,kl) )
601         CALL tab_1d_2d( npti, nptidx(1:npti), v_s_1d (1:npti), v_s (:,:,kl) )
602         CALL tab_1d_2d( npti, nptidx(1:npti), sv_i_1d(1:npti), sv_i(:,:,kl) )
603         CALL tab_1d_2d( npti, nptidx(1:npti), v_ip_1d(1:npti), v_ip(:,:,kl) )
604         !
605      END SELECT
606      !
607   END SUBROUTINE ice_thd_1d2d
608
609
610   SUBROUTINE ice_thd_init
611      !!-------------------------------------------------------------------
612      !!                   ***  ROUTINE ice_thd_init ***
613      !!                 
614      !! ** Purpose :   Physical constants and parameters associated with
615      !!                ice thermodynamics
616      !!
617      !! ** Method  :   Read the namthd namelist and check the parameters
618      !!                called at the first timestep (nit000)
619      !!
620      !! ** input   :   Namelist namthd
621      !!-------------------------------------------------------------------
622      INTEGER  ::   ios   ! Local integer output status for namelist read
623      !!
624      NAMELIST/namthd/ ln_icedH, ln_icedA, ln_icedO, ln_icedS
625      !!-------------------------------------------------------------------
626      !
627      REWIND( numnam_ice_ref )              ! Namelist namthd in reference namelist : Ice thermodynamics
628      READ  ( numnam_ice_ref, namthd, IOSTAT = ios, ERR = 901)
629901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in reference namelist', lwp )
630
631      REWIND( numnam_ice_cfg )              ! Namelist namthd in configuration namelist : Ice thermodynamics
632      READ  ( numnam_ice_cfg, namthd, IOSTAT = ios, ERR = 902 )
633902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namthd in configuration namelist', lwp )
634      IF(lwm) WRITE ( numoni, namthd )
635      !
636      !
637      IF(lwp) THEN                          ! control print
638         WRITE(numout,*) 'ice_thd_init: Ice Thermodynamics'
639         WRITE(numout,*) '~~~~~~~~~~~~'
640         WRITE(numout,*) '   Namelist namthd:'
641         WRITE(numout,*) '      activate ice thick change from top/bot (T) or not (F)   ln_icedH  = ', ln_icedH
642         WRITE(numout,*) '      activate lateral melting (T) or not (F)                 ln_icedA  = ', ln_icedA
643         WRITE(numout,*) '      activate ice growth in open-water (T) or not (F)        ln_icedO  = ', ln_icedO
644         WRITE(numout,*) '      activate gravity drainage and flushing (T) or not (F)   ln_icedS  = ', ln_icedS
645     ENDIF
646      !
647                       CALL ice_thd_zdf_init   ! set ice heat diffusion parameters
648      IF( ln_icedA )   CALL ice_thd_da_init    ! set ice lateral melting parameters
649      IF( ln_icedO )   CALL ice_thd_do_init    ! set ice growth in open water parameters
650                       CALL ice_thd_sal_init   ! set ice salinity parameters
651                       CALL ice_thd_pnd_init   ! set melt ponds parameters
652      !
653   END SUBROUTINE ice_thd_init
654
655#else
656   !!----------------------------------------------------------------------
657   !!   Default option         Dummy module          NO  ESIM sea-ice model
658   !!----------------------------------------------------------------------
659#endif
660
661   !!======================================================================
662END MODULE icethd
Note: See TracBrowser for help on using the repository browser.