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 @ 717

Last change on this file since 717 was 717, checked in by smasson, 17 years ago

finalize the first set of modifications related to ticket:3

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