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.
limthd.F90 in trunk/NEMO/LIM_SRC – NEMO

source: trunk/NEMO/LIM_SRC/limthd.F90 @ 247

Last change on this file since 247 was 247, checked in by opalod, 19 years ago

CL : Add CVS Header and CeCILL licence information

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.5 KB
Line 
1MODULE limthd
2   !!======================================================================
3   !!                  ***  MODULE limthd   ***
4   !!              LIM thermo ice model : ice thermodynamic
5   !!======================================================================
6#if defined key_ice_lim
7   !!----------------------------------------------------------------------
8   !!   'key_ice_lim' :                                   LIM sea-ice model
9   !!----------------------------------------------------------------------
10   !!   lim_thd      : thermodynamic of sea ice
11   !!   lim_thd_init : initialisation of sea-ice thermodynamic
12   !!----------------------------------------------------------------------
13   !! * Modules used
14   USE phycst          ! physical constants
15   USE dom_oce         ! ocean space and time domain variables
16   USE lbclnk
17   USE in_out_manager  ! I/O manager
18   USE ice             ! LIM sea-ice variables
19   USE ice_oce         ! sea-ice/ocean variables
20   USE flx_oce         ! sea-ice/ocean forcings variables
21   USE thd_ice         ! LIM thermodynamic sea-ice variables
22   USE dom_ice         ! LIM sea-ice domain
23   USE iceini
24   USE limthd_zdf
25   USE limthd_lac
26   USE limtab
27     
28   IMPLICIT NONE
29   PRIVATE
30
31   !! * Routine accessibility
32   PUBLIC lim_thd       ! called by lim_step
33
34   !! * Module variables
35   REAL(wp)  ::            &  ! constant values
36      epsi20 = 1.e-20   ,  &
37      epsi16 = 1.e-16   ,  &
38      epsi04 = 1.e-04   ,  &
39      zzero  = 0.e0     ,  &
40      zone   = 1.e0
41
42   !! * Substitutions
43#  include "domzgr_substitute.h90"
44#  include "vectopt_loop_substitute.h90"
45   !!-------- -------------------------------------------------------------
46   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005)
47   !! $Header$
48   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
49   !!----------------------------------------------------------------------
50
51CONTAINS
52
53   SUBROUTINE lim_thd
54      !!-------------------------------------------------------------------
55      !!                ***  ROUTINE lim_thd  ***       
56      !! 
57      !! ** Purpose : This routine manages the ice thermodynamic.
58      !!         
59      !! ** Action : - Initialisation of some variables
60      !!             - Some preliminary computation (oceanic heat flux
61      !!               at the ice base, snow acc.,heat budget of the leads)
62      !!             - selection of the icy points and put them in an array
63      !!             - call lim_vert_ther for vert ice thermodynamic
64      !!             - back to the geographic grid
65      !!             - selection of points for lateral accretion
66      !!             - call lim_lat_acc  for the ice accretion
67      !!             - back to the geographic grid
68      !!
69      !! ** References :
70      !!       H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90
71      !!
72      !! History :
73      !!   1.0  !  00-01 (LIM)
74      !!   2.0  !  02-07 (C. Ethe, G. Madec) F90
75      !!---------------------------------------------------------------------
76      !! * Local variables
77      INTEGER  ::   ji, jj,    &   ! dummy loop indices
78         nbpb  ,               &   ! nb of icy pts for thermo. cal.
79         nbpac                     ! nb of pts for lateral accretion
80      REAL(wp) ::  &
81         zfric_umin = 5e-03 ,  &   ! lower bound for the friction velocity
82         zfric_umax = 2e-02        ! upper bound for the friction velocity
83      REAL(wp) ::   &
84         zinda              ,  &   ! switch for test. the val. of concen.
85         zindb, zindg       ,  &   ! switches for test. the val of arg
86         za , zh, zthsnice  ,  &
87         zfric_u            ,  &   ! friction velocity
88         zfnsol             ,  &   ! total non solar heat
89         zfontn             ,  &   ! heat flux from snow thickness
90         zfntlat, zpareff          ! test. the val. of lead heat budget
91      REAL(wp), DIMENSION(jpi,jpj) :: &
92         zhicifp            ,  &   ! ice thickness for outputs
93         zqlbsbq                   ! link with lead energy budget qldif
94      !!-------------------------------------------------------------------
95
96      IF( numit == nstart  )   CALL lim_thd_init  ! Initialization (first time-step only)
97   
98      !-------------------------------------------!
99      !   Initilization of diagnostic variables   !
100      !-------------------------------------------!
101     
102!i est-ce utile?  oui au moins en partie
103      rdvosif(:,:) = 0.e0   ! variation of ice volume at surface
104      rdvobif(:,:) = 0.e0   ! variation of ice volume at bottom
105      fdvolif(:,:) = 0.e0   ! total variation of ice volume
106      rdvonif(:,:) = 0.e0   ! lateral variation of ice volume
107      fstric (:,:) = 0.e0   ! part of solar radiation absorbing inside the ice
108      fscmbq (:,:) = 0.e0   ! linked with fstric
109      ffltbif(:,:) = 0.e0   ! linked with fstric
110      qfvbq  (:,:) = 0.e0   ! linked with fstric
111      rdmsnif(:,:) = 0.e0   ! variation of snow mass per unit area
112      rdmicif(:,:) = 0.e0   ! variation of ice mass per unit area
113      hicifp (:,:) = 0.e0   ! daily thermodynamic ice production.
114
115      DO jj = 1, jpj
116         DO ji = 1, jpi
117            hsnif(ji,jj)  = hsnif(ji,jj) *  MAX( zzero, SIGN( zone , hsnif(ji,jj) - epsi04 ) )
118         END DO
119      END DO
120      IF(l_ctl)   WRITE(numout,*) 'lim_thd  : ', SUM( hsnif(2:nictl,2:njctl) ) , ' hsnif'
121     
122     
123      !-----------------------------------!
124      !   Treatment of particular cases   !
125      !-----------------------------------!
126     
127      DO jj = 1, jpj
128         DO ji = 1, jpi
129            !  snow is transformed into ice if the original ice cover disappears.
130            zindg         = tms(ji,jj) *  MAX( zzero , SIGN( zone , -hicif(ji,jj) ) )
131            hicif(ji,jj)  = hicif(ji,jj) + zindg * rhosn * hsnif(ji,jj) / rau0
132            hsnif(ji,jj)  = ( zone - zindg ) * hsnif(ji,jj) + zindg * hicif(ji,jj) * ( rau0 - rhoic ) / rhosn
133            dmgwi(ji,jj)  = zindg * (1.0 - frld(ji,jj)) * rhoic * hicif(ji,jj)   ! snow/ice mass
134           
135            !  the lead fraction, frld, must be little than or equal to amax (ice ridging).
136            zthsnice      = hsnif(ji,jj) + hicif(ji,jj)
137            zindb         = tms(ji,jj) * ( 1.0 - MAX( zzero , SIGN( zone , - zthsnice ) ) ) 
138            za            = zindb * MIN( zone, ( 1.0 - frld(ji,jj) ) * uscomi )
139            hsnif (ji,jj) = hsnif(ji,jj)  * za
140            hicif (ji,jj) = hicif(ji,jj)  * za
141            qstoif(ji,jj) = qstoif(ji,jj) * za
142            frld  (ji,jj) = 1.0 - zindb * ( 1.0 - frld(ji,jj) ) / MAX( za , epsi20 )
143           
144            !  the in situ ice thickness, hicif, must be equal to or greater than hiclim.
145            zh            = MAX( zone , zindb * hiclim  / MAX( hicif(ji,jj) , epsi20 ) )
146            hsnif (ji,jj) = hsnif(ji,jj)  * zh
147            hicif (ji,jj) = hicif(ji,jj)  * zh
148            qstoif(ji,jj) = qstoif(ji,jj) * zh
149            frld  (ji,jj) = ( frld(ji,jj) + ( zh - 1.0 ) ) / zh
150         END DO
151      END DO
152      IF(l_ctl) THEN
153         WRITE(numout,*) 'lim_thd: hicif : ', SUM( hicif (2:nictl,2:njctl) )
154         WRITE(numout,*) 'lim_thd: hsnif : ', SUM( hsnif (2:nictl,2:njctl) )
155         WRITE(numout,*) 'lim_thd: dmgwi : ', SUM( dmgwi (2:nictl,2:njctl) )
156         WRITE(numout,*) 'lim_thd: qstoif: ', SUM( qstoif(2:nictl,2:njctl) )
157         WRITE(numout,*) 'lim_thd: frld  : ', SUM( frld  (2:nictl,2:njctl) )
158      ENDIF
159
160     
161      !-------------------------------!
162      !   Thermodynamics of sea ice   !
163      !-------------------------------!
164     
165      !      Partial computation of forcing for the thermodynamic sea ice model.
166      !--------------------------------------------------------------------------
167
168      !CDIR NOVERRCHK
169      DO jj = 1, jpj
170         !CDIR NOVERRCHK
171         DO ji = 1, jpi
172            zthsnice       = hsnif(ji,jj) + hicif(ji,jj)
173            zindb          = tms(ji,jj) * ( 1.0 - MAX( zzero , SIGN( zone , - zthsnice ) ) ) 
174            pfrld(ji,jj)   = frld(ji,jj)
175            zinda          = 1.0 - MAX( zzero , SIGN( zone , - ( 1.0 - pfrld(ji,jj) ) ) )
176           
177            !  solar irradiance transmission at the mixed layer bottom and used in the lead heat budget
178            thcm(ji,jj)    = 0.e0 
179           
180            !  net downward heat flux from the ice to the ocean, expressed as a function of ocean
181            !  temperature and turbulent mixing (McPhee, 1992)
182            zfric_u        = MAX ( MIN( SQRT( ust2s(ji,jj) ) , zfric_umax ) , zfric_umin )  ! friction velocity
183            fdtcn(ji,jj)  = zindb * rau0 * rcp * 0.006  * zfric_u * ( sst_io(ji,jj) - tfu(ji,jj) ) 
184            qdtcn(ji,jj)  = zindb * fdtcn(ji,jj) * frld(ji,jj) * rdt_ice
185                       
186            !  partial computation of the lead energy budget (qldif)
187            zfontn         = ( sprecip(ji,jj) / rhosn ) * xlsn  !   energy for melting
188            zfnsol         = qnsr_oce(ji,jj)  !  total non solar flux
189            qldif(ji,jj)   = tms(ji,jj) * ( qsr_oce(ji,jj) * ( 1.0 - thcm(ji,jj) )   &
190               &                               + zfnsol + fdtcn(ji,jj) - zfontn     &
191               &                               + ( 1.0 - zindb ) * fsbbq(ji,jj) )   &
192               &                               * frld(ji,jj) * rdt_ice   
193            !  parlat : percentage of energy used for lateral ablation (0.0)
194            zfntlat        = 1.0 - MAX( zzero , SIGN( zone ,  - qldif(ji,jj) ) )
195            zpareff        = 1.0 + ( parlat - 1.0 ) * zinda * zfntlat
196            zqlbsbq(ji,jj) = qldif(ji,jj) * ( 1.0 - zpareff ) / MAX( (1.0 - frld(ji,jj)) * rdt_ice , epsi16 )
197            qldif  (ji,jj) = zpareff *  qldif(ji,jj)
198            qdtcn  (ji,jj) = zpareff * qdtcn(ji,jj)
199           
200            !  energy needed to bring ocean surface layer until its freezing
201            qcmif  (ji,jj) =  rau0 * rcp * fse3t(ji,jj,1) * ( tfu(ji,jj) - sst_io(ji,jj) ) * ( 1 - zinda )
202           
203            !  calculate oceanic heat flux.
204            fbif   (ji,jj) = zindb * (  fsbbq(ji,jj) / MAX( (1.0 - frld(ji,jj)) , epsi20 ) + fdtcn(ji,jj) )
205           
206            ! computation of the daily thermodynamic ice production (only needed for output)
207            zhicifp(ji,jj) = hicif(ji,jj) * ( 1.0 - frld(ji,jj) )
208         END DO
209      END DO
210     
211     
212      !         Select icy points and fulfill arrays for the vectorial grid.
213      !----------------------------------------------------------------------
214      nbpb = 0
215      DO jj = 1, jpj
216         DO ji = 1, jpi
217            IF ( frld(ji,jj) < 1.0 ) THEN     
218               nbpb      = nbpb + 1
219               npb(nbpb) = (jj - 1) * jpi + ji
220            ENDIF
221         END DO
222      END DO
223      IF(l_ctl) THEN
224         WRITE(numout,*) 'lim_thd: pfrld ' , SUM( pfrld  (2:nictl,2:njctl) ), ' thcm    ', SUM( thcm   (2:nictl,2:njctl) )
225         WRITE(numout,*) 'lim_thd: fdtcn ' , SUM( fdtcn  (2:nictl,2:njctl) ), ' qdtcn   ', SUM( qdtcn  (2:nictl,2:njctl) )
226         WRITE(numout,*) 'lim_thd: qldif ' , SUM( qldif  (2:nictl,2:njctl) ), ' zqlbsbq ', SUM( zqlbsbq(2:nictl,2:njctl) )
227         WRITE(numout,*) 'lim_thd: qcmif ' , SUM( qcmif  (2:nictl,2:njctl) ), ' fbif    ', SUM( fbif   (2:nictl,2:njctl) )
228         WRITE(numout,*) 'lim_thd: qcmif  ', SUM( qcmif  (2:nictl,2:njctl)*tms(2:nictl,2:njctl) )
229         WRITE(numout,*) 'lim_thd: zhicifp', SUM( zhicifp(2:nictl,2:njctl) )
230         WRITE(numout,*) 'limthd : nbpb = ', nbpb
231      ENDIF
232     
233     
234      ! If there is no ice, do nothing. Otherwise, compute Top and Bottom accretion/ablation
235      !------------------------------------------------------------------------------------
236
237      IF ( nbpb > 0) THEN
238         
239         !  put the variable in a 1-D array for thermodynamics process
240         CALL tab_2d_1d( nbpb, frld_1d    (1:nbpb)     , frld       , jpi, jpj, npb(1:nbpb) )
241         CALL tab_2d_1d( nbpb, h_ice_1d   (1:nbpb)     , hicif      , jpi, jpj, npb(1:nbpb) )
242         CALL tab_2d_1d( nbpb, h_snow_1d  (1:nbpb)     , hsnif      , jpi, jpj, npb(1:nbpb) )
243         CALL tab_2d_1d( nbpb, sist_1d    (1:nbpb)     , sist       , jpi, jpj, npb(1:nbpb) )
244         CALL tab_2d_1d( nbpb, tbif_1d    (1:nbpb , 1 ), tbif(:,:,1), jpi, jpj, npb(1:nbpb) )
245         CALL tab_2d_1d( nbpb, tbif_1d    (1:nbpb , 2 ), tbif(:,:,2), jpi, jpj, npb(1:nbpb) )
246         CALL tab_2d_1d( nbpb, tbif_1d    (1:nbpb , 3 ), tbif(:,:,3), jpi, jpj, npb(1:nbpb) )
247         CALL tab_2d_1d( nbpb, qsr_ice_1d (1:nbpb)     , qsr_ice    , jpi, jpj, npb(1:nbpb) )
248         CALL tab_2d_1d( nbpb, fr1_i0_1d  (1:nbpb)     , fr1_i0     , jpi, jpj, npb(1:nbpb) )
249         CALL tab_2d_1d( nbpb, fr2_i0_1d  (1:nbpb)     , fr2_i0     , jpi, jpj, npb(1:nbpb) )
250         CALL tab_2d_1d( nbpb, qnsr_ice_1d(1:nbpb)     , qnsr_ice   , jpi, jpj, npb(1:nbpb) )
251#if ! defined key_coupled
252         CALL tab_2d_1d( nbpb, qla_ice_1d (1:nbpb)     , qla_ice    , jpi, jpj, npb(1:nbpb) )
253         CALL tab_2d_1d( nbpb, dqla_ice_1d(1:nbpb)     , dqla_ice   , jpi, jpj, npb(1:nbpb) )
254#endif
255         CALL tab_2d_1d( nbpb, dqns_ice_1d(1:nbpb)     , dqns_ice   , jpi, jpj, npb(1:nbpb) )
256         CALL tab_2d_1d( nbpb, tfu_1d     (1:nbpb)     , tfu        , jpi, jpj, npb(1:nbpb) )
257         CALL tab_2d_1d( nbpb, sprecip_1d (1:nbpb)     , sprecip    , jpi, jpj, npb(1:nbpb) ) 
258         CALL tab_2d_1d( nbpb, fbif_1d    (1:nbpb)     , fbif       , jpi, jpj, npb(1:nbpb) )
259         CALL tab_2d_1d( nbpb, thcm_1d    (1:nbpb)     , thcm       , jpi, jpj, npb(1:nbpb) )
260         CALL tab_2d_1d( nbpb, qldif_1d   (1:nbpb)     , qldif      , jpi, jpj, npb(1:nbpb) )
261         CALL tab_2d_1d( nbpb, qstbif_1d  (1:nbpb)     , qstoif     , jpi, jpj, npb(1:nbpb) )
262         CALL tab_2d_1d( nbpb, rdmicif_1d (1:nbpb)     , rdmicif    , jpi, jpj, npb(1:nbpb) )
263         CALL tab_2d_1d( nbpb, dmgwi_1d   (1:nbpb)     , dmgwi      , jpi, jpj, npb(1:nbpb) )
264         CALL tab_2d_1d( nbpb, qlbbq_1d   (1:nbpb)     , zqlbsbq    , jpi, jpj, npb(1:nbpb) )
265 
266         CALL lim_thd_zdf( 1, nbpb )       !  compute ice growth
267         
268         !  back to the geographic grid.
269         CALL tab_1d_2d( nbpb, frld       , npb, frld_1d   (1:nbpb)     , jpi, jpj )
270         CALL tab_1d_2d( nbpb, hicif      , npb, h_ice_1d  (1:nbpb)     , jpi, jpj )
271         CALL tab_1d_2d( nbpb, hsnif      , npb, h_snow_1d (1:nbpb)     , jpi, jpj )
272         CALL tab_1d_2d( nbpb, sist       , npb, sist_1d   (1:nbpb)     , jpi, jpj )
273         CALL tab_1d_2d( nbpb, tbif(:,:,1), npb, tbif_1d   (1:nbpb , 1 ), jpi, jpj )   
274         CALL tab_1d_2d( nbpb, tbif(:,:,2), npb, tbif_1d   (1:nbpb , 2 ), jpi, jpj )   
275         CALL tab_1d_2d( nbpb, tbif(:,:,3), npb, tbif_1d   (1:nbpb , 3 ), jpi, jpj )   
276         CALL tab_1d_2d( nbpb, fscmbq     , npb, fscbq_1d  (1:nbpb)     , jpi, jpj )
277         CALL tab_1d_2d( nbpb, ffltbif    , npb, fltbif_1d (1:nbpb)     , jpi, jpj )
278         CALL tab_1d_2d( nbpb, fstric     , npb, fstbif_1d (1:nbpb)     , jpi, jpj )
279         CALL tab_1d_2d( nbpb, qldif      , npb, qldif_1d  (1:nbpb)     , jpi, jpj )
280         CALL tab_1d_2d( nbpb, qfvbq      , npb, qfvbq_1d  (1:nbpb)     , jpi, jpj )
281         CALL tab_1d_2d( nbpb, qstoif     , npb, qstbif_1d (1:nbpb)     , jpi, jpj )
282         CALL tab_1d_2d( nbpb, rdmicif    , npb, rdmicif_1d(1:nbpb)     , jpi, jpj )
283         CALL tab_1d_2d( nbpb, dmgwi      , npb, dmgwi_1d  (1:nbpb)     , jpi, jpj )
284         CALL tab_1d_2d( nbpb, rdmsnif    , npb, rdmsnif_1d(1:nbpb)     , jpi, jpj )
285         CALL tab_1d_2d( nbpb, rdvosif    , npb, dvsbq_1d  (1:nbpb)     , jpi, jpj )
286         CALL tab_1d_2d( nbpb, rdvobif    , npb, dvbbq_1d  (1:nbpb)     , jpi, jpj )
287         CALL tab_1d_2d( nbpb, fdvolif    , npb, dvlbq_1d  (1:nbpb)     , jpi, jpj )
288         CALL tab_1d_2d( nbpb, rdvonif    , npb, dvnbq_1d  (1:nbpb)     , jpi, jpj ) 
289
290 
291      ENDIF
292
293     
294      !      Up-date sea ice thickness.
295      !---------------------------------
296      DO jj = 1, jpj
297         DO ji = 1, jpi
298            phicif(ji,jj) = hicif(ji,jj) 
299            hicif(ji,jj)  = hicif(ji,jj) *  ( zone -  MAX( zzero, SIGN( zone, - ( 1.0 - frld(ji,jj) ) ) ) )
300         END DO
301      END DO
302
303     
304      !      Tricky trick : add 2 to frld in the Southern Hemisphere.
305      !----------------------------------------------------------
306      IF( fcor(1,1) < 0.e0 ) THEN
307         DO jj = 1, njeqm1      !ibug in mpp
308            DO ji = 1, jpi
309               frld(ji,jj) = frld(ji,jj) + 2.0
310            END DO
311         END DO
312      ENDIF
313     
314     
315      !     Select points for lateral accretion (this occurs when heat exchange
316      !     between ice and ocean is negative; ocean losing heat)
317      !-----------------------------------------------------------------
318      nbpac = 0
319      DO jj = 1, jpj
320         DO ji = 1, jpi
321!i yes!     IF ( ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.e0 ) THEN
322            IF ( tms(ji,jj) * ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.e0 ) THEN
323               nbpac = nbpac + 1
324               npac( nbpac ) = (jj - 1) * jpi + ji
325            ENDIF
326         END DO
327      END DO
328     
329      IF(l_ctl) THEN
330         WRITE(numout,*) 'lim_thd : phicif ', SUM( phicif(2:nictl,2:njctl) ), ' hicif ', SUM( hicif(2:nictl,2:njctl) )
331         WRITE(numout,*) 'lim_thd : nbpac = ', nbpac
332      ENDIF
333
334     
335      !
336      !     If ocean gains heat do nothing ; otherwise, one performs lateral accretion
337      !--------------------------------------------------------------------------------
338
339      IF( nbpac > 0 ) THEN
340         
341         !...Put the variable in a 1-D array for lateral accretion
342         CALL tab_2d_1d( nbpac, frld_1d   (1:nbpac)     , frld       , jpi, jpj, npac(1:nbpac) )
343         CALL tab_2d_1d( nbpac, h_snow_1d (1:nbpac)     , hsnif      , jpi, jpj, npac(1:nbpac) )
344         CALL tab_2d_1d( nbpac, h_ice_1d  (1:nbpac)     , hicif      , jpi, jpj, npac(1:nbpac) )
345         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 1 ), tbif(:,:,1), jpi, jpj, npac(1:nbpac) )   
346         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 2 ), tbif(:,:,2), jpi, jpj, npac(1:nbpac) )   
347         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 3 ), tbif(:,:,3), jpi, jpj, npac(1:nbpac) )   
348         CALL tab_2d_1d( nbpac, qldif_1d  (1:nbpac)     , qldif      , jpi, jpj, npac(1:nbpac) )
349         CALL tab_2d_1d( nbpac, qcmif_1d  (1:nbpac)     , qcmif      , jpi, jpj, npac(1:nbpac) )
350         CALL tab_2d_1d( nbpac, qstbif_1d (1:nbpac)     , qstoif     , jpi, jpj, npac(1:nbpac) )
351         CALL tab_2d_1d( nbpac, rdmicif_1d(1:nbpac)     , rdmicif    , jpi, jpj, npac(1:nbpac) )
352         CALL tab_2d_1d( nbpac, dvlbq_1d  (1:nbpac)     , fdvolif    , jpi, jpj, npac(1:nbpac) )
353         CALL tab_2d_1d( nbpac, tfu_1d    (1:nbpac)     , tfu        , jpi, jpj, npac(1:nbpac) )
354       
355         !  call lateral accretion routine.
356         CALL lim_thd_lac( 1 , nbpac )
357         
358         !   back to the geographic grid
359         CALL tab_1d_2d( nbpac, frld       , npac(1:nbpac), frld_1d   (1:nbpac)     , jpi, jpj )
360         CALL tab_1d_2d( nbpac, hsnif      , npac(1:nbpac), h_snow_1d (1:nbpac)     , jpi, jpj )
361         CALL tab_1d_2d( nbpac, hicif      , npac(1:nbpac), h_ice_1d  (1:nbpac)     , jpi, jpj )
362         CALL tab_1d_2d( nbpac, tbif(:,:,1), npac(1:nbpac), tbif_1d   (1:nbpac , 1 ), jpi, jpj )
363         CALL tab_1d_2d( nbpac, tbif(:,:,2), npac(1:nbpac), tbif_1d   (1:nbpac , 2 ), jpi, jpj )
364         CALL tab_1d_2d( nbpac, tbif(:,:,3), npac(1:nbpac), tbif_1d   (1:nbpac , 3 ), jpi, jpj )
365         CALL tab_1d_2d( nbpac, qstoif     , npac(1:nbpac), qstbif_1d (1:nbpac)     , jpi, jpj )
366         CALL tab_1d_2d( nbpac, rdmicif    , npac(1:nbpac), rdmicif_1d(1:nbpac)     , jpi, jpj )
367         CALL tab_1d_2d( nbpac, fdvolif    , npac(1:nbpac), dvlbq_1d  (1:nbpac)     , jpi, jpj )
368       
369      ENDIF
370       
371       
372      !      Recover frld values between 0 and 1 in the Southern Hemisphere (tricky trick)
373      !      Update daily thermodynamic ice production.   
374      !------------------------------------------------------------------------------
375       
376      DO jj = 1, jpj
377         DO ji = 1, jpi
378            frld  (ji,jj) = MIN( frld(ji,jj), ABS( frld(ji,jj) - 2.0 ) )
379            hicifp(ji,jj) =  hicif(ji,jj) * ( 1.0 - frld(ji,jj) ) - zhicifp(ji,jj) + hicifp(ji,jj)
380         END DO
381      END DO
382
383      IF(l_ctl) THEN
384         WRITE(numout,*) ' lim_thd  end  '
385         WRITE(numout,*) '  hicif ', SUM( hicif (2:nictl,2:njctl)   ), '  hsnif ', SUM( hsnif (2:nictl,2:njctl)   )
386         WRITE(numout,*) '  frld  ', SUM( frld  (2:nictl,2:njctl)   ), '  hicifp', SUM( hicifp(2:nictl,2:njctl)   )
387         WRITE(numout,*) '  phicif', SUM( phicif(2:nictl,2:njctl)   ), '  pfrld ', SUM( pfrld (2:nictl,2:njctl)   )
388         WRITE(numout,*) '  sist  ', SUM( sist  (2:nictl,2:njctl)   ), '  tbif 1', SUM( tbif  (2:nictl,2:njctl,1) )
389         WRITE(numout,*) '  tbif 2', SUM( tbif  (2:nictl,2:njctl,2) ), '  tbif 3', SUM( tbif  (2:nictl,2:njctl,3) )
390         WRITE(numout,*) '  fdtcn ', SUM( fdtcn (2:nictl,2:njctl)   ), '  qdtcn ', SUM( qdtcn (2:nictl,2:njctl)   )
391         WRITE(numout,*) '  qstoif', SUM( qstoif(2:nictl,2:njctl)   ), '  fsbbq ', SUM( fsbbq (2:nictl,2:njctl)   )
392      ENDIF
393
394    END SUBROUTINE lim_thd
395
396
397    SUBROUTINE lim_thd_init
398      !!-------------------------------------------------------------------
399      !!                   ***  ROUTINE lim_thd_init ***
400      !!                 
401      !! ** Purpose :   Physical constants and parameters linked to the ice
402      !!      thermodynamics
403      !!
404      !! ** Method  :   Read the namicethd namelist and check the ice-thermo
405      !!       parameter values called at the first timestep (nit000)
406      !!
407      !! ** input   :   Namelist namicether
408      !!
409      !! history :
410      !!  8.5  ! 03-08 (C. Ethe) original code
411      !!-------------------------------------------------------------------
412      NAMELIST/namicethd/ hmelt , hiccrit, hicmin, hiclim, amax  ,        &
413         &                swiqst, sbeta  , parlat, hakspl, hibspl, exld,  &
414         &                hakdif, hnzst  , thth  , parsub, alphs
415      !!-------------------------------------------------------------------
416     
417
418      ! Define the initial parameters
419      ! -------------------------
420      REWIND( numnam_ice )
421      READ  ( numnam_ice , namicethd )
422      IF(lwp) THEN
423         WRITE(numout,*)
424         WRITE(numout,*)'lim_thd_init : ice parameters for ice thermodynamic computation '
425         WRITE(numout,*)'~~~~~~~~~~~~'
426         WRITE(numout,*)'       maximum melting at the bottom                           hmelt        = ', hmelt
427         WRITE(numout,*)'       ice thick. for lateral accretion in NH (SH)             hiccrit(1/2) = ', hiccrit
428         WRITE(numout,*)'       ice thick. corr. to max. energy stored in brine pocket  hicmin       = ', hicmin 
429         WRITE(numout,*)'       minimum ice thickness                                   hiclim       = ', hiclim 
430         WRITE(numout,*)'       maximum lead fraction                                   amax         = ', amax
431         WRITE(numout,*)'       energy stored in brine pocket (=1) or not (=0)     swiqst       = ', swiqst 
432         WRITE(numout,*)'       numerical carac. of the scheme for diffusion in ice '
433         WRITE(numout,*)'       Cranck-Nicholson (=0.5), implicit (=1), explicit (=0)   sbeta        = ', sbeta
434         WRITE(numout,*)'       percentage of energy used for lateral ablation          parlat       = ', parlat
435         WRITE(numout,*)'       slope of distr. for Hakkinen-Mellor lateral melting     hakspl       = ', hakspl 
436         WRITE(numout,*)'       slope of distribution for Hibler lateral melting        hibspl       = ', hibspl
437         WRITE(numout,*)'       exponent for leads-closure rate                         exld         = ', exld
438         WRITE(numout,*)'       coefficient for diffusions of ice and snow              hakdif       = ', hakdif
439         WRITE(numout,*)'       threshold thick. for comp. of eq. thermal conductivity  zhth         = ', thth 
440         WRITE(numout,*)'       thickness of the surf. layer in temp. computation       hnzst        = ', hnzst
441         WRITE(numout,*)'       switch for snow sublimation  (=1) or not (=0)           parsub       = ', parsub 
442         WRITE(numout,*)'       coefficient for snow density when snow ice formation    alphs        = ', alphs
443      ENDIF
444           
445      uscomi = 1.0 / ( 1.0 - amax )   ! inverse of minimum lead fraction
446      rcdsn = hakdif * rcdsn 
447      rcdic = hakdif * rcdic
448     
449      IF ( ( hsndif > 100.e0 ) .OR. ( hicdif > 100.e0 ) ) THEN
450         cnscg = 0.e0
451      ELSE
452         cnscg = rcpsn / rcpic   ! ratio  rcpsn/rcpic
453      ENDIF
454 
455   END SUBROUTINE lim_thd_init
456
457#else
458   !!----------------------------------------------------------------------
459   !!   Default option          Dummy module           NO LIM sea-ice model
460   !!----------------------------------------------------------------------
461CONTAINS
462   SUBROUTINE lim_thd         ! Dummy routine
463   END SUBROUTINE lim_thd
464#endif
465
466   !!======================================================================
467END MODULE limthd
Note: See TracBrowser for help on using the repository browser.