SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_glt_oceflx_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_oceflx_r =========================
41 ! =======================================================================
42 !
43 ! Goal:
44 ! -----
45 ! Transform sea ice ablation/accretion or snow ablation into salt,
46 ! water and heat fluxes directed to the ocean.
47 !
48 ! Method:
49 ! -------
50 ! For every category of ice or snow involved in melting / freezing
51 ! in the grid cell, the following quantities are needed:
52 ! - mass (kg.m-2)
53 ! - massic gltools_enthalpy (J.kg-1)
54 ! - salt (g.kg-1)
55 ! As Gelato can be coupled to rigid lid models (that need a virtual
56 ! freshwater flux) or a free-surface model (that need a virtual
57 ! freshwater flux and a water mass flux). A heat flux is also
58 ! computed
59 !
60 ! Remarks:
61 ! --------
62 ! Note that dmass (the provided mass of melted ice or snow) are
63 ! in kg.m-2. In the case of sea ice:
64 ! (sea ice density) * (fraction) * (thickness variation).
65 !
66 !
67 ! Created : 2001/07 (D. Salas y Melia)
68 ! Taken out from imod_thermo_ice.f90 routine (rigid lid
69 ! assumption is made).
70 !
71 ! Modified: 2002/10 (D. Salas y Melia)
72 ! Introduction of free surface approach.
73 !
74 ! Modified: 2009/06 (D. Salas y Melia) reduced grid
75 !
76 ! Modified: 2009/12 (D. Salas y Melia) make glt_updtfl consistent with the
77 ! new gltools_enthalpy formulation in Gelato.
78 !
79 ! ---------------------- BEGIN MODULE modi_glt_oceflx_r ---------------------
80 !
81 !THXS_SFX!MODULE modi_glt_oceflx_r
82 !THXS_SFX!INTERFACE
83 !THXS_SFX!!
84 !THXS_SFX!SUBROUTINE glt_oceflx_r( tpdom,pustar,tpmxl )
85 !THXS_SFX!!
86 !THXS_SFX! USE modd_types_glt
87 !THXS_SFX! USE modd_glt_param
88 !THXS_SFX! TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
89 !THXS_SFX! tpdom
90 !THXS_SFX! REAL, DIMENSION(np), INTENT(in) :: &
91 !THXS_SFX! pustar
92 !THXS_SFX! TYPE(t_mxl), DIMENSION(np), INTENT(inout) :: &
93 !THXS_SFX! tpmxl
94 !THXS_SFX!END SUBROUTINE glt_oceflx_r
95 !THXS_SFX!!
96 !THXS_SFX!END INTERFACE
97 !THXS_SFX!END MODULE modi_glt_oceflx_r
98 !
99 ! ---------------------- END MODULE modi_glt_oceflx_r -----------------------
100 !
101 !
102 !
103 ! -----------------------------------------------------------------------
104 ! ------------------------- SUBROUTINE glt_oceflx_r -------------------------
105 !
106 SUBROUTINE glt_oceflx_r( tpdom,pustar,tpmxl )
107 !
109  USE modd_glt_const_evp ! omega
110  USE modd_types_glt
111  USE modd_glt_param
112  USE modi_glt_salflx_r
113 !
114  IMPLICIT NONE
115 !
116 ! .. Arguments
117 !
118  TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
119  tpdom
120  REAL, DIMENSION(np), INTENT(in) :: &
121  pustar
122  TYPE(t_mxl), DIMENSION(np), INTENT(inout) :: &
123  tpmxl
124 !
125 ! .. Local variables
126 !
127 ! G_mole_T,G_mole_S molecular diffusion terms for heat/salt
128 ! G_mole_T = 12.5 * 13.8d0**(2d0/3d0) - 6. = 65.9d0
129 ! G_mole_S = 12.5 * 2432d0**(2d0/3d0) - 6. = 2255d0
130  REAL, PARAMETER :: &
131  ppg_mole_t = 65.9d0 , ppg_mole_s = 2255d0
132 !
133 ! g_T,g_S turbulent exchange velocities (m/s)
134 ! G_turb turbulent diffusion term
135  REAL, DIMENSION(np) :: &
136  zg_turb,zg_t,zg_s
137 !
138  REAL, DIMENSION(np) :: &
139  zfcor,zustar
140 !
141 !
142 !
143 ! 1. Initializations
144 ! ===================
145 !
146 ! Coriolis parameter
147 !
148 zfcor(:) = 2. * omega * abs( sin( tpdom(:)%lat ) )
149 !
150 ! Bound ustar
151 !
152 zustar(:) = max( pustar,0.005 )
153 !
154 ! Calculate turbulent exchange velocities zg_T, zg_S
155 ! G_turb = (1/k) ln (u* E n^2 / f h) + 1 / (2 E n) - (1/k)
156 ! = 2.5 ln ( 5300*(u*)^2/coriol ) + 9.62 - 2.5 (assuming n=1)
157 ! Note: n could theoretically depend on the buoyancy flux
158 !
159 zg_turb(:) = 2.5d0 * log( 5300.*zustar(:)*zustar(:)/zfcor(:) ) + 7.12d0
160 !
161 ! Calculate exchange coefficient
162 ! g = u* / ( G_turb + G_mole )
163 !
164 zg_t(:) = zustar(:) / ( zg_turb(:) + ppg_mole_t )
165 zg_s(:) = zustar(:) / ( zg_turb(:) + ppg_mole_s )
166 !
167 !
168 !
169 ! 2. Compute ocean-ice fluxes
170 ! ============================
171 !
172 tpmxl(:)%qoc = rhosw * cpsw * zg_t(:) * &
173  max( tpmxl(:)%tml-tpmxl(:)%mlf, 0. )
174 !
175 END SUBROUTINE glt_oceflx_r
176 !
177 ! ----------------------- END SUBROUTINE glt_oceflx_r -----------------------
178 ! -----------------------------------------------------------------------
subroutine glt_oceflx_r(tpdom, pustar, tpmxl)