SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_gltools_sigma.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 mode_gltools_sigma =======================
41 ! =======================================================================
42 !
43 ! This module contains functions that allow to know sea water density
44 ! as a function of temperature and salinity (polynomial fits)
45 ! Contains also
46 !
47 ! Modified : (D. Salas y Melia)
48 ! Add a function to compute salinity entrapment following
49 ! Cox and Weeks, JGR (1988)
50 !
51 ! ------------------- BEGIN MODULE mode_gltools_sigma ---------------------
52 
54 INTERFACE
55 
56 FUNCTION glt_sigma(pt,ps)
57  USE modd_glt_param, only:nx,ny
58  REAL, DIMENSION(nx,ny) :: &
59  glt_sigma
60  REAL, DIMENSION(nx,ny), INTENT(in) :: &
61  pt,ps
62 END FUNCTION glt_sigma
63 
64 FUNCTION glt_dsigmadt(pt,ps)
65  REAL :: &
67  REAL, INTENT(in) :: &
68  pt,ps
69 END FUNCTION glt_dsigmadt
70 
71 FUNCTION glt_dsigmads(pt,ps)
72  REAL :: &
74  REAL, INTENT(in) :: &
75  pt,ps
76 END FUNCTION glt_dsigmads
77 
78 FUNCTION glt_salfrac( pv )
79  REAL :: &
81  REAL, INTENT(in) :: &! in m.s-1
82  pv
83 END FUNCTION glt_salfrac
84 
85 END INTERFACE
86 END MODULE mode_gltools_sigma
87 
88 ! -------------------- END MODULE mode_gltools_sigma ----------------------
89 
90 
91 ! -----------------------------------------------------------------------
92 ! ---------------------------- FUNCTION glt_sigma ---------------------------
93 !
94 ! * sigma-theta as a function of temp (deg c) and salinity (mil)
95 ! (friedrich-levitus 3rd degree polynomial fit)
96 
97 FUNCTION glt_sigma(pt,ps)
98 !
100  USE modd_glt_param, only:nx,ny
101 !
102  IMPLICIT NONE
103 
104  REAL, DIMENSION(nx,ny) :: &
105  glt_sigma
106  REAL, DIMENSION(nx,ny), INTENT(in) :: &
107  pt,ps
108 
109  glt_sigma(:,:) = &
110  (c1 + c3 * ps(:,:) + pt(:,:) * (c2 + c5 * ps(:,:) + &
111  pt(:,:) * (c4 + c7 * ps(:,:) + pt(:,:) * c6))) * 1.e-03
112 !
113 END FUNCTION glt_sigma
114 
115 ! ------------------------- END FUNCTION glt_sigma --------------------------
116 ! -----------------------------------------------------------------------
117 
118 
119 ! -----------------------------------------------------------------------
120 ! -------------------------- FUNCTION glt_dsigmadt --------------------------
121 !
122 ! Computes d(sigma)/dt
123 
124 FUNCTION glt_dsigmadt(pt,ps)
125 !
127 !
128  IMPLICIT NONE
129 
130  REAL :: &
132  REAL, INTENT(in) :: &
133  pt,ps
134 
135  glt_dsigmadt = (c2 + c5 * ps + 2. * pt * (c4 + c7 * ps + &
136  1.5 * pt * c6)) * 1.e-3
137 !
138 END FUNCTION glt_dsigmadt
139 
140 ! ------------------------ END FUNCTION glt_dsigmadt ------------------------
141 ! -----------------------------------------------------------------------
142 
143 
144 ! -----------------------------------------------------------------------
145 ! -------------------------- FUNCTION glt_dsigmads --------------------------
146 !
147 ! Computes d(sigma)/ds
148 
149 FUNCTION glt_dsigmads(pt,ps)
150 !
152 !
153  IMPLICIT NONE
154 
155  REAL :: &
157  REAL, INTENT(in) :: &
158  pt,ps
159 
160  glt_dsigmads = (c3 + pt * (c5 + pt * c7)) * 1.e-3
161 !
162 END FUNCTION glt_dsigmads
163 
164 ! ------------------------ END FUNCTION glt_dsigmads ------------------------
165 ! -----------------------------------------------------------------------
166 
167 
168 ! -----------------------------------------------------------------------
169 ! -------------------------- FUNCTION glt_salfrac ---------------------------
170 !
171 ! If S is the ocean salinity, as sea ice forms at a rate V (in m.s-1),
172 ! the salinity of the new formed sea ice is : Si = keff.Sw
173 ! Here we follow Cox and Weeks (1988) to compute keff as a function of V.
174 !
175 FUNCTION glt_salfrac( pv )
176 !
177  IMPLICIT NONE
178  REAL :: &
180  REAL, INTENT(in) :: &
181  pv
182  REAL :: &
183  zalpha
184 
185 !! IF ( pv > 3.8e-7 ) THEN
186 !! glt_salfrac = 0.26 / ( 0.26+0.74*exp( -724300.*pv ) )
187 !! ELSE IF ( pv > 3.4e-7 ) THEN
188 !! zalpha = ( pv-3.4e-7 ) / 0.4e-7
189 !! glt_salfrac = zalpha * 0.26 / ( 0.26+0.74*exp( -724300.*pv ) ) + &
190 !! ( 1.-zalpha ) * 0.8925 + 0.0568*log( 100.*pv )
191 !! ELSE IF ( pv > 2.2e-8 ) THEN
192 !! glt_salfrac = 0.8925 + 0.0568*log( 100.*pv )
193 !! ELSE IF ( pv > 1.8e-8 ) THEN
194 !! zalpha = ( pv-1.8e-8 ) / 0.4e-8
195 !! glt_salfrac = zalpha * ( 0.8925 + 0.0568*log( 100.*pv ) ) + &
196 !! ( 1.-zalpha ) * 0.12
197 !! ELSE
198 !! glt_salfrac = 0.12
199 !! ENDIF
200  IF ( pv > 3.6e-7 ) THEN
201  glt_salfrac = 0.26 / ( 0.26+0.74*exp( -724300.*pv ) )
202  ELSE IF ( pv > 1.24e-8 ) THEN
203  glt_salfrac = 0.8925 + 0.0568*log( 100.*pv )
204  ELSE
205  glt_salfrac = 0.12
206  ENDIF
207 !
208 END FUNCTION glt_salfrac
209 !
210 ! ------------------------- END FUNCTION glt_salfrac ------------------------
211 ! -----------------------------------------------------------------------
real function glt_dsigmads(pt, ps)
real function glt_dsigmadt(pt, ps)
real function, dimension(nx, ny) glt_sigma(pt, ps)
real function glt_salfrac(pv)