SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_glt_gelato.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_gelato =========================
41 ! =======================================================================
42 !
43 !
44 ! glt_gelato Sea Ice Dynamics and Thermodynamics
45 ! @(#)5.18 version
46 !
47 ! David Salas y Melia
48 !
49 !
50 ! * glt_gelato determines the evolution of sea ice state variables,
51 ! considering both dynamics and thermodynamics on a specified
52 ! gridded region and within given time boundaries.
53 !
54 ! Created : 1999 (D. Salas y Melia)
55 ! Can be called from glt.f90 main program (Gelato in stand-alone
56 ! mode) or from an ocean model
57 ! Modified: 2000-2008 (D. Salas y Melia)
58 ! Many changes due to changes in thermodynamics, dynamics,
59 ! diagnostics...
60 ! Modified: 2009 (D. Salas y Melia)
61 ! Substantial interface change. Use of structured, optional
62 ! arguments to handle double or single physics.
63 ! Modified: 2012/05 (D. Salas y Melia)
64 ! Parallel dynamics, advection and redistribution
65 ! Modified: 2012/11 (D. Salas y Melia)
66 ! Changes to introduce sea ice damping + total parallelism
67 !
68 ! ----------------------- BEGIN MODULE modi_glt_gelato ----------------------
69 !
70 !THXS_SFX!MODULE modi_glt_gelato
71 !THXS_SFX!INTERFACE
72 !THXS_SFX!!
73 !THXS_SFX!SUBROUTINE glt_gelato( tpglt )
74 !THXS_SFX!!
75 !THXS_SFX! USE modd_types_glt
76 !THXS_SFX! TYPE(t_glt), INTENT(inout) :: &
77 !THXS_SFX! tpglt
78 !THXS_SFX!END SUBROUTINE glt_gelato
79 !THXS_SFX!!
80 !THXS_SFX!END INTERFACE
81 !THXS_SFX!END MODULE modi_glt_gelato
82 !
83 ! ----------------------- END MODULE modi_glt_gelato ------------------------
84 !
85 !
86 ! -----------------------------------------------------------------------
87 ! ----------------------- SUBROUTINE glt_gelato -------------------------
88 !
89 SUBROUTINE glt_gelato( tpglt )
90 !
91 !
92 ! 1. Declarations
93 ! ================
94 !
95 ! 1.1. Module use declarations
96 ! -----------------------------
97 !
98 !#if ! defined in_surfex
99 !USE mpi
100 !#endif
101 !
102 ! * Contains physical constants.
104 !
105 #if ! defined in_surfex
106 ! * Contains physical constants for elastic viscous-plastic dynamics
108 #endif
109 !
110 ! * Contains types_glt definitions.
111 USE modd_types_glt
112 !
113 ! * To get access to parameters read from the "namelist".
114 USE modd_glt_param
115 !
116 ! * To send an error message
117 USE modi_gltools_glterr
118 !
119 ! * To initialize the control of energy budget
120 USE modi_glt_inibud
121 !
122 ! * Sea ice and leads thermodynamics.
123 USE modi_glt_thermo
124 !
125 ! * To print statistics in glt_gelato glt_output file.
126 USE mode_glt_info
127 !
128 USE modi_glt_updbud
129 USE modi_gltools_timers
130 !
131 !
132 ! * No variables are implicitely declared.
133 IMPLICIT NONE
134 !
135 !
136 ! 1.2. Dummy arguments
137 ! ---------------------
138 !
139 TYPE(t_glt), INTENT(inout) :: &
140  tpglt
141 !
142 !
143 !
144 ! 2. Initialization (every time step)
145 ! ====================================
146 !
147 ! 2.1. Local variables
148 ! ---------------------
149 !
150 IF (lp1) THEN
151  WRITE(noutlu,*) ' '
152  WRITE(noutlu,*) ' ** LEVEL 2 - SUBROUTINE GELATO'
153  WRITE(noutlu,*) ' '
154 ENDIF
155 !
156 !
157 ! 2.2. Initialize lead temperature and sea ice-ocean fluxes
158 ! ----------------------------------------------------------
159 !
160  CALL initfl( tpglt%tfl )
161 !
162 !
163 ! 2.3. Initialize diagnostics
164 ! ----------------------------
165 !
166  CALL inidia( tpglt%ind,tpglt%dia,tpglt%cdia0,tpglt%cdia )
167  CALL gltools_timers('end inidia')
168 !
169 !
170 ! 2.4. Budgets initialization
171 ! ----------------------------
172 !
173  CALL glt_inibud( tpglt%bud )
174 !
175  CALL glt_info_si( 'Initial conditions:',tpglt%dom,tpsit=tpglt%sit )
176  CALL gltools_timers('end inibud')
177 !
178 !
179 !
180 ! 3. Input data
181 ! ==============
182 !
183 ! .. Print level
184 !
185 IF ( tpglt%ind%cur==tpglt%ind%end ) nprinto = nprlast
186 lp1 = (lwg.AND.nprinto>=1)
187 lp2 = (lwg.AND.nprinto>=2)
188 lp3 = (lwg.AND.nprinto>=3)
189 lp4 = (lwg.AND.nprinto>=4)
190 lp5 = (lwg.AND.nprinto>=5)
191 !
192 !
193 ! 3.1. Sea ice salinity initialization
194 ! -------------------------------------
195 !
196 ! .. This is done only at first time step. If no proper salinity
197 ! field was found in the restart, the bulk salinity is deduced from
198 ! sea surface salinity (hence this routine must be invoked after
199 ! ocean surface forcing fields are obtained !)
200 !
201 IF ( tpglt%ind%cur==tpglt%ind%beg ) CALL inisal( tpglt%dom,tpglt%tml,tpglt%sit )
202 !
203 !
204 ! 3.2. First energy update budget
205 ! --------------------------------
206 !
207 ! .. This is done even if glt_updbud flag is off, to allow the computation
208 ! of certain diagnostics if wished by the user.
209 !
210  CALL glt_updbud( 1,'Initial conditions:', &
211  tpglt%dom,tpglt%tml,tpglt%tfl,tpglt%atm_all,tpglt%blkw,tpglt%blki, &
212  tpglt%sit,tpglt%sil,tpglt%bud )
213 !
214 !
215 !
216 ! 4. Sea ice and leads thermodynamics
217 ! ====================================
218 !
219 IF ( ntd==0 ) THEN
220 !
221 ! .. Thermodynamics without sea ice constraint
222 !
223  CALL glt_thermo &
224  ( tpglt%dom,tpglt%ust,tpglt%tml,tpglt%atm_all,tpglt%blkw,tpglt%blki, &
225  tpglt%bud,tpglt%dia,tpglt%tfl,tpglt%sit,tpglt%sil )
226 ELSE
227 !
228 ! .. Thermodynamics with sea ice constraint (no energy conservation)
229 !
230  CALL glt_thermo &
231  ( tpglt%dom,tpglt%ust,tpglt%tml,tpglt%atm_all,tpglt%blkw,tpglt%blki, &
232  tpglt%bud,tpglt%dia,tpglt%tfl,tpglt%sit,tpglt%sil,tpsit_d=tpglt%sit_d )
233 ENDIF
234 !
235  CALL gltools_timers('end thermo')
236 !
237 !
238 IF (lp1) THEN
239  WRITE(noutlu,*) ' '
240  WRITE(noutlu,*) ' ** LEVEL 2 - END SUBROUTINE GELATO'
241  WRITE(noutlu,*) ' '
242 ENDIF
243 !
244 END SUBROUTINE glt_gelato
245 !
246 ! ====================== END SUBROUTINE glt_gelato ======================
247 ! =======================================================================
subroutine initfl(tptfl)
subroutine glt_gelato(tpglt)
subroutine inidia(tpind, tpdia, pcumdia0, pcumdia)
subroutine glt_inibud(tpbud)
subroutine glt_thermo(tpdom, pustar, tpmxl, tpatm, tpblkw, tpblki, tpbud, tpdia, tptfl, tpsit, tpsil, tpsit_d)
subroutine gltools_timers(hlabel)
subroutine inisal(tpdom, tpmxl, tpsit)
subroutine glt_updbud(kinit, omsg, tpdom, tpmxl, tptfl, tpatm, tpblkw, tpblki, tpsit, tpsil, tpbud)