SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_gltools_swfrzt.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_swfrzt =====================
41 ! =======================================================================
42 !
43 ! This module contains functions that allow to know sea water
44 ! freezing temperature as a function of salinity (no pressure term,
45 ! because we only consider surface sea water, for which p=0).
46 !
47 
48 ! ------------------- BEGIN MODULE mode_gltools_swfrzt --------------------
49 
51 INTERFACE
52 
53 FUNCTION glt_swfrzt0d(ps)
54  REAL :: &
56  REAL, INTENT(in) :: &
57  ps
58 END FUNCTION glt_swfrzt0d
59 
60 FUNCTION glt_swfrzt2d(ps)
61  USE modd_glt_param, only:nx,ny
62  REAL, DIMENSION(nx,ny) :: &
64  REAL, DIMENSION(nx,ny), INTENT(in) :: &
65  ps
66 END FUNCTION glt_swfrzt2d
67 
68 FUNCTION glt_swfrzt3d(ps)
69  USE modd_glt_param, only:nt,nx,ny
70  REAL, DIMENSION(nt,nx,ny) :: &
72  REAL, DIMENSION(nt,nx,ny), INTENT(in) :: &
73  ps
74 END FUNCTION glt_swfrzt3d
75 
76 END INTERFACE
77 END MODULE mode_gltools_swfrzt
78 
79 ! -------------------- END MODULE mode_gltools_swfrzt ---------------------
80 
81 
82 ! -----------------------------------------------------------------------
83 ! --------------------------- FUNCTION glt_swfrzt0d -------------------------
84 !
85 ! * glt_swfrzt0d represents surface sea water freezing point temperature,
86 ! (Celsius) a function of salinity (computation is made at only one
87 ! point here).
88 ! Units : salinity ps in psu units.
89 ! freezing point temperature glt_swfrzt0d degrees celsius
90 ! Reference : unesco tech. papers in the marine science no 28 1978
91 ! eigth report jpots
92 ! annex 6 freezing point of seawater F.J.Millero pp.29-35
93 
94 FUNCTION glt_swfrzt0d(ps)
95 !
97 !
98  IMPLICIT NONE
99 
100  REAL :: &
102  REAL, INTENT(in) :: &
103  ps
104 
105  glt_swfrzt0d = (-0.0575 + 1.710523e-3*sqrt(ps) - 2.154996e-4*ps) * ps
106 !
107 END FUNCTION glt_swfrzt0d
108 
109 ! ------------------------ END FUNCTION glt_swfrzt0d ------------------------
110 ! -----------------------------------------------------------------------
111 
112 
113 ! -----------------------------------------------------------------------
114 ! --------------------------- FUNCTION glt_swfrzt2d -------------------------
115 !
116 ! * glt_swfrzt2d (Celsius) represents surface sea water freezing point
117 ! temperature, a function of salinity. This subroutine handles 2D arrays,
118 ! unlike glt_swfrzt0d which computes freezing point temperature only for one
119 ! point.
120 ! Units : salinity ps in psu units.
121 ! freezing point temperature gltools_swfrzt degrees celsius
122 ! Reference : unesco tech. papers in the marine science no 28 1978
123 ! eigth report jpots
124 ! annex 6 freezing point of seawater F.J.Millero pp.29-35
125 
126 FUNCTION glt_swfrzt2d(ps)
127 !
129  USE modd_glt_param, only:nx,ny
130 !
131  IMPLICIT NONE
132 
133  REAL, DIMENSION(nx,ny) :: &
135  REAL, DIMENSION(nx,ny), INTENT(in) :: &
136  ps
137 
138  glt_swfrzt2d(:,:) = &
139  (-0.0575 + 1.710523e-3*sqrt(ps(:,:)) - 2.154996e-4*ps(:,:)) * &
140  ps(:,:)
141 !
142 END FUNCTION glt_swfrzt2d
143 
144 ! ------------------------ END FUNCTION glt_swfrzt2d ------------------------
145 ! -----------------------------------------------------------------------
146 
147 
148 ! -----------------------------------------------------------------------
149 ! --------------------------- FUNCTION glt_swfrzt3d -------------------------
150 !
151 ! * glt_swfrzt3d (Celsius) represents surface sea water freezing point
152 ! temperature, a function of salinity. This subroutine handles 3D arrays,
153 ! unlike, for example glt_swfrzt0d which computes freezing point temperature
154 ! only for one point.
155 ! Units : salinity ps in psu units.
156 ! freezing point temperature glt_swfrzt3d degrees celsius
157 ! Reference : unesco tech. papers in the marine science no 28 1978
158 ! eigth report jpots
159 ! annex 6 freezing point of seawater F.J.Millero pp.29-35
160 
161 FUNCTION glt_swfrzt3d(ps)
162 !
164  USE modd_glt_param, only:nt,nx,ny
165 !
166  IMPLICIT NONE
167 
168  REAL, DIMENSION(nt,nx,ny) :: &
170  REAL, DIMENSION(nt,nx,ny), INTENT(in) :: &
171  ps
172 
173  glt_swfrzt3d(:,:,:) = &
174  (-0.0575 + 1.710523e-3*sqrt(ps(:,:,:)) - 2.154996e-4*ps(:,:,:)) * &
175  ps(:,:,:)
176 !
177 END FUNCTION glt_swfrzt3d
178 
179 ! ------------------------ END FUNCTION glt_swfrzt3d ------------------------
180 ! -----------------------------------------------------------------------
real function, dimension(nx, ny) glt_swfrzt2d(ps)
real function glt_swfrzt0d(ps)
real function, dimension(nt, nx, ny) glt_swfrzt3d(ps)