SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_glt_sublim_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_sublim_r =========================
41 ! =======================================================================
42 !
43 !
44 ! Goal:
45 ! -----
46 ! This module contains a routine manages top the sea ice-snow slab
47 ! sublimation.
48 ! The input is sublimation rate (in meters of equivalent liquid water
49 ! per second). Note that if there is sublimation, the corresponding rate
50 ! is taken to be negative.
51 ! Snow layer thickness is modified, and if necessary (in case there
52 ! is no more snow), the sea ice thickness.
53 !
54 ! Created : 2009/06 (D. Salas y Melia)
55 ! Reduced grid
56 ! Modified: 2010/01 (D. Salas y Melia)
57 ! Consider the removal of salt (only fresh water evaporates)
58 ! Salt is supposed to go to the mixed layer. Associated
59 ! gltools_enthalpy changes are not treated.
60 ! Modified: 2011/12 (A. Voldoire)
61 ! New formulation of the effect of sublimation on sea ice
62 ! thickness and mass balance + new ice/water fluxes interface
63 ! CALL
64 !
65 ! -------------------- BEGIN MODULE modi_glt_sublim_r ----------------------
66 !
67 !THXS_SFX!MODULE modi_glt_sublim_r
68 !THXS_SFX!INTERFACE
69 !THXS_SFX!!
70 !THXS_SFX!SUBROUTINE glt_sublim_r(tpmxl,tpblki,tpsit,tpsil,tptfl,tpdia)
71 !THXS_SFX! USE modd_types_glt
72 !THXS_SFX! USE modd_glt_param
73 !THXS_SFX! TYPE(t_mxl), DIMENSION(np), INTENT(in) :: &
74 !THXS_SFX! tpmxl
75 !THXS_SFX! TYPE(t_blk), DIMENSION(nt,np), INTENT(in) :: &
76 !THXS_SFX! tpblki
77 !THXS_SFX! TYPE(t_sit), DIMENSION(nt,np), INTENT(inout) :: &
78 !THXS_SFX! tpsit
79 !THXS_SFX! TYPE(t_vtp), DIMENSION(nl,nt,np), INTENT(inout) :: &
80 !THXS_SFX! tpsil
81 !THXS_SFX! TYPE(t_tfl), DIMENSION(np), INTENT(inout) :: &
82 !THXS_SFX! tptfl
83 !THXS_SFX! TYPE(t_dia), DIMENSION(np), INTENT(inout) :: &
84 !THXS_SFX! tpdia
85 !THXS_SFX!END SUBROUTINE glt_sublim_r
86 !THXS_SFX!!
87 !THXS_SFX!END INTERFACE
88 !THXS_SFX!END MODULE modi_glt_sublim_r
89 !
90 ! ---------------------- END MODULE modi_glt_sublim_r -----------------------
91 !
92 !
93 !
94 ! -----------------------------------------------------------------------
95 ! ------------------------ SUBROUTINE glt_sublim_r --------------------------
96 !
97 SUBROUTINE glt_sublim_r(tpmxl,tpblki,tpsit,tpsil,tptfl,tpdia)
98  USE modd_types_glt
99  USE modd_glt_param
101  USE modi_glt_updtfl_r
103 !
104  IMPLICIT NONE
105 !
106  TYPE(t_mxl), DIMENSION(np), INTENT(in) :: &
107  tpmxl
108  TYPE(t_blk), DIMENSION(nt,np), INTENT(in) :: &
109  tpblki
110  TYPE(t_sit), DIMENSION(nt,np), INTENT(inout) :: &
111  tpsit
112  TYPE(t_vtp), DIMENSION(nl,nt,np), INTENT(inout) :: &
113  tpsil
114  TYPE(t_tfl), DIMENSION(np), INTENT(inout) :: &
115  tptfl
116  TYPE(t_dia), DIMENSION(np), INTENT(inout) :: &
117  tpdia
118 !
119  REAL, DIMENSION(np) :: &
120  zei1,zei2,zes1,zes2
121  REAL, DIMENSION(nt,np) :: &
122  zhsn,zhsi,zwork,zsus,zsui,zsuw
123 !
124 !
125 !
126 ! 1. Initialize local variables
127 ! ==============================
128 !
129 ! Initial snow and ice thickness
130  zhsn(:,:) = tpsit(:,:)%hsn
131  zhsi(:,:) = tpsit(:,:)%hsi
132 !
133 ! Get initial snow and ice gltools_enthalpy
134  CALL glt_aventh( tpsit,tpsil,zei1,zes1 )
135 !
136 !
137 ! 2. Apply sublimation rate
138 ! ==========================
139 !
140 ! 2.1. Modify the snow layer thickness
141 ! -------------------------------------
142 !
143 ! .. First try on the snow layer
144 ! Note that the test is performed on sea ice thickness (means where there
145 ! is sea ice)
146 ! Note that if condensation takes place (tpblki%eva>0), deposition
147 ! is allowed.
148 !print*,'SUBLIM...'
149 !print*,'hsi (1) =',tpsit(:,:)%hsi
150 !print*,'hsn (1) =',tpsit(:,:)%hsn
151  zwork(:,:) = 0.
152  WHERE( tpsit(:,:)%hsi>epsil1 )
153  tpsit(:,:)%hsn = tpsit(:,:)%hsn + &
154  dtt*tpblki(:,:)%eva/tpsit(:,:)%rsn
155  zwork(:,:) = tpblki(:,:)%eva*tpsit(:,:)%fsi
156  ENDWHERE
157  zsus(:,:) = zwork(:,:) * dtt
158 !print*,'hsn (2) =',tpsit(:,:)%hsn
159 !
160 !
161 ! 2.2. Modify the ice layer (if no snow is left)
162 ! -----------------------------------------------
163 !
164 ! .. If there is no more snow, try on the ice part of the slab
165 !
166  zwork(:,:) = 0.
167  WHERE ( tpsit(:,:)%hsn<0. )
168  tpsit(:,:)%hsi = tpsit(:,:)%hsi + &
169  tpsit(:,:)%hsn*tpsit(:,:)%rsn/rhoice
170 ! tpsit(:,:)%hsn*tpsit(:,:)%rsn/rhoice/ &
171 ! ( 1.-1.e-3*tpsit(:,:)%ssi )
172  zwork(:,:) = tpsit(:,:)%hsn*tpsit(:,:)%rsn*tpsit(:,:)%fsi
173  tpsit(:,:)%hsn = 0.
174  ENDWHERE
175  zsui(:,:) = zwork(:,:)
176  zsus(:,:) = zsus(:,:) - zsui(:,:)
177 !
178 !
179 ! 2.3. Evaporate the ocean mixed layer (if no ice is left)
180 ! ---------------------------------------------------------
181 !
182 ! .. If the ice layer totally disappears (rare cases !), reinitialize
183 ! sea ice category, conserve water and salt (but accept that the
184 ! ovewhelming energy is lost)
185 ! In this case, the salt goes to the mixed layer
186 !
187 !
188  tptfl(:)%sio = tptfl(:)%sio - &
189  1.e-3*rhoice* &
190  sum( tpsit(:,:)%fsi*tpsit(:,:)%ssi*( tpsit(:,:)%hsi ), &
191  mask=(tpsit(:,:)%hsi<0.), dim=1 ) / dtt
192 !
193  zwork(:,:) = 0.
194  WHERE( tpsit(:,:)%hsi<0. )
195  tpsit(:,:)%hsi = 0.
196  tpsit(:,:)%esi = .false.
197  zwork(:,:) = rhoice*tpsit(:,:)%fsi*tpsit(:,:)%hsi* &
198  (1.-1.e-3*tpsit(:,:)%ssi)
199  ENDWHERE
200  zsuw(:,:) = zwork(:,:)
201  zsui(:,:) = zsui(:,:) - zsuw(:,:)
202  tpdia(:)%sut = sum(tpblki(:,:)%eva*tpsit(:,:)%fsi, dim=1)
203  tpdia(:)%sui = sum(zsui(:,:), dim=1) / dtt
204  tpdia(:)%sus = sum(zsus(:,:), dim=1) / dtt
205  tpdia(:)%suw = sum(zsuw(:,:), dim=1) / dtt
206 ! Ice sublimated has to be put in wlo and the inverse in cio => water flux
207 ! impacted but not the salt flux (???? Aurore)
208  CALL glt_updtfl_r('FW2I',tpmxl,tptfl,zsui)
209  CALL glt_updtfl_r('FW2O',tpmxl,tptfl,zsuw)
210 !print*,'hsi (4) =',tpsit(:,:)%hsi
211 !print*,'hsn (4) =',tpsit(:,:)%hsn
212 !
213 !
214 ! 2.3. Conserve salt
215 ! -------------------
216 !
217 ! .. Water is accepted by the atmosphere, but salt does not evaporate...
218 ! If a sea ice category did not sublimate completely, the salt concentration
219 ! of sea ice is modified, else it goes to the mixed layer.
220 !
221  WHERE ( tpsit(:,:)%hsi>epsil1 )
222  tpsit(:,:)%ssi = tpsit(:,:)%ssi * zhsi(:,:)/tpsit(:,:)%hsi
223  ENDWHERE
224 !
225 !
226 ! 2.4. Conserve gltools_enthalpy
227 ! -----------------------
228 !
229 ! .. Note that sublimation is automatically linked with an increase in
230 ! sea ice enthalpy. This sea ice gltools_enthalpy change should be given
231 ! back to sea ice, or to the ocean if there is no sea ice.
232 ! For simplicity, here we deliver this gltools_enthalpy only to the ocean.
233 !
234  CALL glt_aventh( tpsit,tpsil,zei2,zes2 )
235  tptfl(:)%tio = tptfl(:)%tio - (zei2+zes2-zei1-zes1)/dtt
236 !
237 END SUBROUTINE glt_sublim_r
238 
239 ! ---------------------- END SUBROUTINE glt_sublim_r ------------------------
240 ! -----------------------------------------------------------------------
subroutine glt_updtfl_r(hflag, tpmxl, tptfl, pdmass, pent, psalt)
subroutine glt_sublim_r(tpmxl, tpblki, tpsit, tpsil, tptfl, tpdia)