SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_glt_thermo_ice_r.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 !GLT_LIC The GELATO model is a seaice model used in stand-alone or embedded mode.
6 !GLT_LIC It has been developed by Meteo-France. The holder of GELATO is Meteo-France.
7 !GLT_LIC
8 !GLT_LIC This software is governed by the CeCILL-C license under French law and biding
9 !GLT_LIC by the rules of distribution of free software. See the CeCILL-C_V1-en.txt
10 !GLT_LIC (English) and CeCILL-C_V1-fr.txt (French) for details. The CeCILL is a free
11 !GLT_LIC software license, explicitly compatible with the GNU GPL
12 !GLT_LIC (see http://www.gnu.org/licenses/license-list.en.html#CeCILL)
13 !GLT_LIC
14 !GLT_LIC The CeCILL-C licence agreement grants users the right to modify and re-use the
15 !GLT_LIC software governed by this free software license. The exercising of this right
16 !GLT_LIC is conditional upon the obligation to make available to the community the
17 !GLT_LIC modifications made to the source code of the software so as to contribute to
18 !GLT_LIC its evolution.
19 !GLT_LIC
20 !GLT_LIC In consideration of access to the source code and the rights to copy, modify
21 !GLT_LIC and redistribute granted by the license, users are provided only with a limited
22 !GLT_LIC warranty and the software's author, the holder of the economic rights, and the
23 !GLT_LIC successive licensors only have limited liability. In this respect, the risks
24 !GLT_LIC associated with loading, using, modifying and/or developing or reproducing the
25 !GLT_LIC software by the user are brought to the user's attention, given its Free
26 !GLT_LIC Software status, which may make it complicated to use, with the result that its
27 !GLT_LIC use is reserved for developers and experienced professionals having in-depth
28 !GLT_LIC computer knowledge. Users are therefore encouraged to load and test the
29 !GLT_LIC suitability of the software as regards their requirements in conditions enabling
30 !GLT_LIC the security of their systems and/or data to be ensured and, more generally, to
31 !GLT_LIC use and operate it in the same conditions of security.
32 !GLT_LIC
33 !GLT_LIC The GELATO sofware is cureently distibuted with the SURFEX software, available at
34 !GLT_LIC http://www.cnrm.meteo.fr/surfex. The fact that you download the software deemed that
35 !GLT_LIC you had knowledge of the CeCILL-C license and that you accept its terms.
36 !GLT_LIC Attempts to use this software in a way not complying with CeCILL-C license
37 !GLT_LIC may lead to prosecution.
38 !GLT_LIC
39 ! =======================================================================
40 ! ====================== MODULE modi_glt_thermo_ice_r =======================
41 ! =======================================================================
42 !
43 ! Goal:
44 ! -----
45 ! Do the thermodynamics for the ice covered fraction of the grid cell
46 ! (considering several ice types_glt, defined according to their
47 ! thicknesses).
48 !
49 ! Method:
50 ! -------
51 ! The main involved processes in this part are :
52 ! - the impact of precipitations on sea ice / snow build up,
53 ! - effect of ocean and atmospheric heat fluxes on sea ice
54 ! thickness changes (heat conduction in the ice / snow slab).
55 ! N.B. : Heat fluxes are considered at the top and at the bottom of
56 ! the ice (W / m^2). Positive q-fluxes denote melting.
57 !
58 ! Created : 1996/04 (D. Salas y Melia)
59 ! Also includes bulk fluxes (based on Simonsen, 1996), leads
60 ! physics.
61 ! The thermodynamics is only computed at one point
62 ! Modified: 1997/12 (D. Salas y Melia)
63 ! Regional model: Arctic or Antarctic. Specific for computing
64 ! sea ice thermodynamics.
65 ! Modified: 2001/08 (D. Salas y Melia)
66 ! Increased modularity. Most processes are now described in
67 ! a separate routine.
68 ! Modified: 2009/06 (D. Salas y Melia)
69 ! reduced grid
70 ! Modified: 2010/02 (D. Salas y Melia)
71 ! interactiver salinity
72 ! Modified: 2011/12 (A. Voldoire)
73 ! improved computation of snow and ice mass balance
74 ! Modified: 2012/01 (M. Chevallier)
75 ! invoke glt_updasn_r (i.e. upgrade the state of melt ponds)
76 ! after the last potential water input to the ponds (after
77 ! surface melting processes)
78 !
79 ! -------------------- BEGIN MODULE modi_glt_thermo_ice_r -------------------
80 !
81 !THXS_SFX!MODULE modi_glt_thermo_ice_r
82 !THXS_SFX!INTERFACE
83 !THXS_SFX!!
84 !THXS_SFX!SUBROUTINE glt_thermo_ice_r &
85 !THXS_SFX! ( tpdom,tpmxl,tpatm,tpblki,tpbud,tpdia,tptfl,tpsit,tpsil )
86 !THXS_SFX!!
87 !THXS_SFX! USE modd_types_glt
88 !THXS_SFX! USE modd_glt_param
89 !THXS_SFX!!
90 !THXS_SFX! TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
91 !THXS_SFX! tpdom
92 !THXS_SFX! TYPE(t_mxl), DIMENSION(np), INTENT(in) :: &
93 !THXS_SFX! tpmxl
94 !THXS_SFX! TYPE(t_atm), DIMENSION(np), INTENT(in) :: &
95 !THXS_SFX! tpatm
96 !THXS_SFX! TYPE(t_blk), DIMENSION(nt,np), INTENT(in) :: &
97 !THXS_SFX! tpblki
98 !THXS_SFX! TYPE(t_bud), DIMENSION(np), INTENT(inout) :: &
99 !THXS_SFX! tpbud
100 !THXS_SFX! TYPE(t_dia), DIMENSION(np), INTENT(inout) :: &
101 !THXS_SFX! tpdia
102 !THXS_SFX! TYPE(t_tfl), DIMENSION(np), INTENT(inout) :: &
103 !THXS_SFX! tptfl
104 !THXS_SFX! TYPE(t_sit), DIMENSION(nt,np), INTENT(inout) :: &
105 !THXS_SFX! tpsit
106 !THXS_SFX! TYPE(t_vtp), DIMENSION(nl,nt,np), INTENT(inout) :: &
107 !THXS_SFX! tpsil
108 !THXS_SFX!!
109 !THXS_SFX!END SUBROUTINE glt_thermo_ice_r
110 !THXS_SFX!!
111 !THXS_SFX!END INTERFACE
112 !THXS_SFX!END MODULE modi_glt_thermo_ice_r
113 !
114 ! -------------------- END MODULE modi_glt_thermo_ice_r ---------------------
115 !
116 !
117 !
118 ! -----------------------------------------------------------------------
119 ! --------------------- SUBROUTINE glt_thermo_ice_r -------------------------
120 !
121 SUBROUTINE glt_thermo_ice_r &
122  ( tpdom,tpmxl,tpatm,tpblki,tpbud,tpdia,tptfl,tpsit,tpsil )
123 !
124 !
125 !
126 ! 1. DECLARATIONS AND INITIALIZATIONS
127 ! ====================================
128 !
129 ! 1.1. Module declarations
130 ! ------------------------
131 !
132  USE modd_types_glt
133  USE modd_glt_param
135  USE modi_glt_vhdiff_r
136 ! USE modi_glt_swabs_r
137  USE mode_glt_info_r
138  USE mode_glt_stats_r
139  USE modi_glt_updasn_r
140  USE modi_glt_icetrans_r
141  USE modi_glt_sublim_r
142  USE modi_glt_precip_r
143  USE modi_glt_snowice_r
144  USE modi_glt_updhsn_r
145  USE modi_glt_updhsi_r
146  USE modi_glt_lmltsi_r
147  USE modi_glt_updbud_r
148  USE modi_glt_updice_r
149  USE modi_glt_updsnow_r
150  USE modi_glt_icevsp_r
151  USE modi_gltools_chkglo_r
153  USE modi_glt_updsal_r
154 !
155  IMPLICIT NONE
156 !
157 !
158 ! 1.2. Dummy arguments declarations
159 ! ---------------------------------
160 !
161 ! --- INTENT(in) arguments.
162 !
163  TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
164  tpdom
165  TYPE(t_mxl), DIMENSION(np), INTENT(in) :: &
166  tpmxl
167  TYPE(t_atm), DIMENSION(np), INTENT(in) :: &
168  tpatm
169  TYPE(t_blk), DIMENSION(nt,np), INTENT(in) :: &
170  tpblki
171 !
172 ! --- INTENT(inout) arguments.
173 
174  TYPE(t_bud), DIMENSION(np), INTENT(inout) :: &
175  tpbud
176  TYPE(t_dia), DIMENSION(np), INTENT(inout) :: &
177  tpdia
178  TYPE(t_tfl), DIMENSION(np), INTENT(inout) :: &
179  tptfl
180  TYPE(t_sit), DIMENSION(nt,np), INTENT(inout) :: &
181  tpsit
182  TYPE(t_vtp), DIMENSION(nl,nt,np), INTENT(inout) :: &
183  tpsil
184 !
185 !
186 ! 1.3. Local variables declarations
187 ! ---------------------------------
188 !
189  LOGICAL, DIMENSION(np) :: &
190  grain,gsnow
191  LOGICAL, DIMENSION(nt,np) :: &
192  osmelt
193  INTEGER :: &
194  jl
195  REAL :: &
196  zwork0,zicondt,zicondb,zidhi,zidhs,zinrg,zsnow_a,zemp_a,&
197  zice_a,zemps_a,zsalt_a,zsalf_a
198  real,dimension(np) :: zei1,zes1,zei2,zes2
199  REAL, DIMENSION(np) :: &
200  zwork2,zemps
201  REAL, DIMENSION(nt,np) :: &
202  zcondb,zqtopmelt,znsftop,zdcondt,zqmelt,zmlf3
203  REAL, DIMENSION(nl,nt,np) :: &
204  zswtra,zdhmelt,zvsp,zent
205  TYPE(t_blk), DIMENSION(np) :: &
206  tzdum
207 !
208 !
209 ! 1.4. Welcome message
210 ! --------------------
211 !
212  IF (lp1) THEN
213  WRITE(noutlu,*) ' '
214  WRITE(noutlu,*) '**** LEVEL 4 - SUBROUTINE THERMO_ICE_R'
215  WRITE(noutlu,*) ' '
216  ENDIF
217 !
218 !
219 ! 1.5. Local variables initializations
220 ! ------------------------------------
221 !
222 ! .. Two-dimensional logical arrays
223 !
224  grain(:) = ( tpatm(:)%lip>epsil1 )
225  gsnow(:) = ( tpatm(:)%sop>epsil1 )
226 !
227 ! .. Three-dimensional real arrays
228 !
229  zcondb(:,:) = 0.
230  znsftop(:,:) = 0.
231  zdcondt(:,:) = 0.
232  zqmelt(:,:) = 0.
233  zmlf3(:,:) = 0.
234 !
235 ! .. Vertical salinity profile
236 !
237  CALL glt_icevsp_r( tpsit,zvsp )
238 !
239 ! .. Type variables
240 !
241  tzdum(:)%swa = 0.
242  tzdum(:)%nsf = 0.
243  tzdum(:)%dfl = 0.
244  tzdum(:)%eva = 0.
245 !
246  zemps(:) = 0.
247 !
248 !
249 ! 1.6. Check in
250 ! -------------
251 !
252  CALL gltools_chkglo_r( 'Before THERMO_ICE_R',tpdom,tpsit)
253 !
254  zemps(:) = tptfl(:)%cio
255 !
256  IF ( nupdbud==1 ) THEN
257  CALL glt_updsnow_r(0, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
258  CALL glt_updice_r(0, ' BEGINNING THERMO_ICE ', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
259  ENDIF
260 !
261 !
262 !
263 ! 2. Snow surface processes
264 ! ==========================
265 !
266 ! 2.1. Effect of sublimation of snow/sea ice
267 ! ------------------------------------------
268 !
269  IF ( nicesub==1 ) THEN
270  CALL glt_sublim_r( tpmxl,tpblki,tpsit,tpsil,tptfl,tpdia )
271  ENDIF
272 !
273  tpdia(:)%subcio = tptfl(:)%cio - zemps(:)
274  zemps(:) = tptfl(:)%cio
275 !
276  IF ( nupdbud==1 ) THEN
277  CALL glt_updbud_r( 0,'After glt_sublim_r / Before PRECIP_R:', &
278  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
279  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a, &
280  -1*tpdia(:)%sus, -1*(tpdia(:)%suw+tpdia(:)%sui))
281  CALL glt_updice_r(1, ' AFTER glt_sublim_r ', &
282  tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
283  ENDIF
284 !
285 !
286 ! 2.2. Effect of precipitations
287 ! -----------------------------
288 !
289 ! Here we consider the effects of precipitations on the marine surface
290 ! layer on their physics. Lead evaporation will be taken into account
291 ! later on (THERMO_LEAD subroutine).
292 ! Note that this routine generates a trend on surface temperature,
293 ! that should be taken into account like for other processes later on.
294 !
295  CALL glt_precip_r( grain,gsnow,tpmxl,tpatm,tpsit,tpsil,tptfl,tpdia,zqmelt )
296 !
297  IF ( nupdbud==1 ) THEN
298  CALL glt_updbud_r( 0,'After glt_precip_r / Before ICETRANS_R:', &
299  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
300  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a, &
301  -1*(tpdia(:)%s_pr+tpdia(:)%s_prsn), -1*(tpdia(:)%o_pr+tpdia(:)%o_prsn))
302  CALL glt_updice_r(1, ' AFTER glt_precip_r ', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
303  ENDIF
304 !
305 !
306 ! 2.3. Short wave absorption and transmission
307 ! --------------------------------------------
308 !
309 ! .. Split the absorbed solar flux into three parts:
310 ! - One part is retained by the ice surface,
311 ! - another is stored by the ice (thermal effect of brine
312 ! pockets),
313 ! - the rest crosses the ice slab to reach the mixed layer.
314 !
315  CALL glt_icetrans_r( tpblki,tpmxl,tptfl,tpsit,tpdia,zswtra )
316 !
317 !
318 !
319 ! 3. Update sea ice heat of fusion, temperature and heat reservoirs
320 ! =================================================================
321 !
322 ! 3.1. Treatment for very thin ice or no ice
323 ! ------------------------------------------
324 !
325 ! .. Expand 2D tpmxl(:,:)%mlf array to a 3D array.
326 !
327  zmlf3(:,:) = spread( tpmxl(:)%mlf,1,nt )
328 !
329 ! .. Update gltools_enthalpy profile and surface temperature
330 !
331 ! Surface temperature
332  WHERE ( tpsit(:,:)%hsi<epsil1 )
333  tpsit(:,:)%tsf = zmlf3(:,:)
334  ENDWHERE
335 !
336 ! Ice gltools_enthalpy
337  DO jl = 1,nilay
338  WHERE ( tpsit(:,:)%hsi<epsil1 )
339  tpsil(jl,:,:)%ent = -cpsw*mu*zvsp(jl,:,:)
340  ENDWHERE
341  END DO
342 !
343 ! Snow gltools_enthalpy
344  WHERE( tpsit(:,:)%hsi<epsil1 )
345  tpsil(nilay+1,:,:)%ent = -xmhofusn0
346  ENDWHERE
347 !
348 ! .. Checks
349 !
350  IF ( nupdbud==1 ) THEN
351  CALL glt_updbud_r( 0,'After glt_icetrans_r / Before VHDIFF_R:', &
352  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
353  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
354  CALL glt_updice_r(1, ' AFTER glt_icetrans_r ', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
355  ENDIF
356 !
357 !
358 ! 3.2. Treatment of vertical temperature profiles
359 ! ------------------------------------------------
360 !
361 ! 3.2.1. Update sea ice stored heat and top conduction heat flux
362 ! ...............................................................
363 !
364 ! .. Initialize and then compute top of the ice/snow slab conduction
365 ! flux.
366 !
367  znsftop(:,:) = tpblki(:,:)%nsf + zqmelt(:,:)
368 !
369 ! .. Derivative of znsftop
370 !
371  zdcondt(:,:) = tpblki(:,:)%dfl
372 !
373 !
374 ! 3.2.2. Run 1D heat diffusion scheme with flux bc at the top
375 ! ............................................................
376 !
377 ! This scheme is run with the boundary conditions that have just been
378 ! computed. It updates the vertical temperature profile in the slab,
379 ! and returns the bottom conductive heat flux (ice/ocean interface).
380 !
381  zwork2 = dtt*sum( tpsit(:,:)%fsi*znsftop, dim=1 )
382 !
383  zent(:,:,:) = tpsil(:,:,:)%ent
384  CALL glt_aventh(tpsit,tpsil,zei1,zes1)
385  CALL glt_vhdiff_r &
386  ( tpdom,tpmxl%mlf,zdcondt,tpsit,tpdia, &
387  znsftop,zswtra,zent,zvsp,zcondb,zqtopmelt,zdhmelt,osmelt )
388 !
389  tpsil(:,:,:)%ent = zent(:,:,:)
390  CALL glt_aventh(tpsit,tpsil,zei2,zes2)
391 !
392 ! .. Checks
393 !
394  IF ( nupdbud==1 ) THEN
395  CALL glt_updbud_r( 0,'After glt_vhdiff_r / Before UPDHSN_R:', &
396  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
397  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
398  CALL glt_updice_r(1, ' AFTER glt_vhdiff_r ', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
399  ENDIF
400 !
401 !
402 !
403 ! 4. Update snow albedo and thickness
404 ! ===================================
405 !
406 ! 4.1. Update snow cover thickness
407 ! --------------------------------
408 !
409 ! .. Update snow thickness. If there is not enough snow to be melted,
410 ! pass the residual melt flux over to the ocean.
411 !
412  CALL glt_updhsn_r( osmelt,zdhmelt,tpmxl,tptfl,tpsit,tpsil,tpdia )
413 !
414  IF ( nupdbud==1 ) THEN
415  CALL glt_updbud_r( 0,'After glt_updhsn_r / Before SNOWICE_R:', &
416  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
417  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
418  CALL glt_updice_r(1, ' AFTER glt_updhsn_r ', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
419  ENDIF
420 !
421 !
422 ! 4.2. Snow ice formation
423 ! ------------------------
424 !
425 ! .. See the routine itself for more details.
426 !
427  CALL glt_snowice_r( tpmxl,tpsil,tptfl,tpsit,tpdia )
428 !
429  tpdia(:)%snicio = tptfl(:)%cio - zemps(:)
430  zemps(:) = tptfl(:)%cio
431 !
432  IF ( nupdbud==1 ) THEN
433  CALL glt_updbud_r( 0,'After glt_snowice_r / Before UPDHSI_R:', &
434  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
435  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
436  CALL glt_updice_r(1, ' AFTER SNOWICE_R', tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
437  ENDIF
438 !
439 !
440 !
441 ! 5. Sea ice thickness and concentration changes
442 ! ==============================================
443 !
444 ! 5.1. Update sea ice thickness
445 ! -----------------------------
446 !
447 !
448 ! .. From the contributions of :
449 ! - conduction bottom heat flux : -zcondb
450 ! - mixed layer heat flux : tpmxl%qoc
451 ! - residual ocean flux : tpmxl%qml,
452 ! compute first guess for new sea ice thickness.
453 !
454  CALL glt_updhsi_r( zcondb,zqtopmelt,zdhmelt,tpmxl,tpdia,tptfl,tpsit,tpsil )
455 !
456  tpdia(:)%hsicio = tptfl(:)%cio - zemps(:)
457  zemps(:) = tptfl(:)%cio
458 !
459 ! .. Checks
460 !
461  IF ( nupdbud==1 ) THEN
462  CALL glt_updbud_r( 0,'After glt_updhsi_r / Before UPDASN_R:', &
463  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
464  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
465  CALL glt_updice_r(1, ' AFTER glt_updhsi_r ', &
466  tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
467  ENDIF
468 !
469 !
470 ! 4.2. Snow cover albedo change and melting
471 ! ------------------------------------------
472 !
473 ! .. Update snow cover/bare ice albedo
474 !
475  CALL glt_updasn_r( osmelt,tpatm,tpblki,zvsp,tpsit,tpdia )
476 !
477 ! .. Checks
478 !
479  IF ( nupdbud==1 ) THEN
480  CALL glt_updbud_r( 0,'After glt_updasn_r / before LMLTSI_R:', &
481  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
482  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
483  CALL glt_updice_r(1, ' After glt_updasn_r ', &
484  tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
485  ENDIF
486 !
487 !
488 ! 5.2. Lateral melting of sea ice
489 ! -------------------------------
490 !
491 ! .. As the mixed layer warms up, sea ice ablation not only takes place
492 ! at the underside of the floe, but also laterally (see lmltsi routine
493 ! for more details).
494 !
495  CALL glt_lmltsi_r( tpmxl,tpsil,tpsit,tpdia,tptfl )
496 !
497  tpdia(:)%lmlcio = tptfl(:)%cio - zemps(:)
498  zemps(:) = tptfl(:)%cio
499 !
500  IF ( nupdbud==1 ) THEN
501  CALL glt_updbud_r( 0,'After glt_lmltsi_r / Before UPDSAL_R:', &
502  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
503  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
504  CALL glt_updice_r(1, ' After glt_lmltsi_r ', &
505  tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
506  ENDIF
507 !
508 !
509 !
510 ! 6. Update salinity
511 ! ===================
512 !
513 ! .. Desalination processes are taken into account here
514 !
515  CALL glt_updsal_r( osmelt,tpmxl,tpsit,tptfl )
516 !
517  tpdia(:)%salcio = tptfl(:)%cio - zemps(:)
518  zemps(:) = tptfl(:)%cio
519 !
520 !
521 ! 7. Final operations
522 ! ===================
523 !
524 ! 7.1. Prints (global quantities)
525 ! -------------------------------
526 !
527 ! .. General budget checks
528 !
529  IF ( nupdbud==1 ) THEN
530  CALL glt_updbud_r( 0,'After glt_updsal_r = End of THERMO_ICE_R:', &
531  tpdom,tpmxl,tptfl,tpatm,tzdum,tpblki,tpsit,tpsil,tpbud )
532  CALL glt_updsnow_r(1, ' Snow ', tpdom, tptfl, tpsit, zsnow_a, zemp_a)
533  CALL glt_updice_r(1, ' AFTER glt_updsal_r ', &
534  tpdom, tpsit, zsalt_a, zice_a, tptfl, zemps_a, zsalf_a)
535  ENDIF
536 !
537 ! .. Sea ice extent and volume checks
538 !
539  CALL gltools_chkglo_r( 'After THERMO_ICE_R',tpdom,tpsit )
540 !
541 !
542 ! 7.2. Farewell message
543 ! ---------------------
544 !
545  IF (lp1) THEN
546  WRITE(noutlu,*) ' '
547  WRITE(noutlu,*) '**** LEVEL 4 - END SUBROUTINE THERMO_ICE_R'
548  WRITE(noutlu,*) ' '
549  ENDIF
550 !
551 END SUBROUTINE glt_thermo_ice_r
552 !
553 ! --------------------- END SUBROUTINE glt_thermo_ice_r ---------------------
554 ! -----------------------------------------------------------------------
subroutine glt_thermo_ice_r(tpdom, tpmxl, tpatm, tpblki, tpbud, tpdia, tptfl, tpsit, tpsil)
subroutine glt_vhdiff_r(tpdom, pmlf, pderiv, tpsit, tpdia, pnsftop, pswtra, pent, pvsp, pcondb, pqtopmelt, pdhmelt, gsmelt)
subroutine glt_updsal_r(gsmelt, tpmxl, tpsit, tptfl)
subroutine glt_updasn_r(gsmelt, tpatm, tpblki, pvsp, tpsit, tpdia)
subroutine glt_updice_r(kinit, omsg, tpdom, tpsit, psalt_a, pice_a, tptfl, pemps_a, psalf_a)
subroutine glt_updsnow_r(kinit, omsg, tpdom, tptfl, tpsit, psnow_a, pemp_a, paddterm, paddterm2)
subroutine glt_updhsi_r(pcondb, pqtopmelt, pdhmelt, tpmxl, tpdia, tptfl, tpsit, tpsil)
subroutine glt_lmltsi_r(tpmxl, tpsil, tpsit, tpdia, tptfl)
subroutine glt_sublim_r(tpmxl, tpblki, tpsit, tpsil, tptfl, tpdia)
subroutine glt_icevsp_r(tpsit, pvsp)
subroutine glt_snowice_r(tpmxl, tpsil, tptfl, tpsit, tpdia)
subroutine glt_icetrans_r(tpblki, tpmxl, tptfl, tpsit, tpdia, pswtra)
subroutine glt_precip_r(orain, osnow, tpmxl, tpatm, tpsit, tpsil, tptfl, tpdia, pqmelt)
subroutine gltools_chkglo_r(omsg, tpdom, tpsit)
subroutine glt_updhsn_r(gsmelt, pdhmelt, tpmxl, tptfl, tpsit, tpsil, tpdia)
subroutine glt_updbud_r(kinit, omsg, tpdom, tpmxl, tptfl, tpatm, tpblkw, tpblki, tpsit, tpsil, tpbud)