SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_glt_info_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 mode_glt_info_r =========================
41 ! =======================================================================
42 !
43 ! * This module contains subroutines that perform statistics on
44 ! different variable types. For example, subroutine glt_info_si can be used
45 ! to know which are the extremes and averages of sea ice thicknesses,
46 ! concentrations, and so on.
47 !
48 ! Created: 2009/06 D. Salas (reduced grid version)
49 !
50 ! ----------------------- BEGIN MODULE mode_glt_info_r ---------------------
51 
53 INTERFACE
54 
55 SUBROUTINE glt_info_si_r(omess,tpsit,tpsil)
56  USE modd_types_glt
57  USE modd_glt_param
58  CHARACTER(*) :: &
59  omess
60  TYPE(t_sit), DIMENSION(nt,np), OPTIONAL, INTENT(in) :: &
61  tpsit
62  TYPE(t_vtp), DIMENSION(nl,nt,np), OPTIONAL, INTENT(in) :: &
63  tpsil
64 END SUBROUTINE glt_info_si_r
65 
66 END INTERFACE
67 END MODULE mode_glt_info_r
68 
69 ! ----------------------- END MODULE mode_glt_info_r ------------------------
70 
71 
72 
73 ! -----------------------------------------------------------------------
74 ! ------------------------- SUBROUTINE glt_info_si_r ------------------------
75 !
76 ! * This subroutine computes sea ice fields maxima, minima, averages
77 ! on the thermodynamic reduced grid.
78 ! * The considered fields are the following :
79 ! - u,v sea ice velocities
80 ! - sea ice albedo
81 ! - sea ice fraction
82 ! - sea ice thickness
83 ! - snow layer thickness
84 ! - heat reservoir in the ice slab
85 ! - snow layer density
86 ! - surface temperature.
87 
88 SUBROUTINE glt_info_si_r(omess,tpsit,tpsil)
89 !
90  USE modd_types_glt
91  USE modd_glt_param
93 !
94  IMPLICIT NONE
95 
96  CHARACTER(*) :: &
97  omess
98  TYPE(t_sit), DIMENSION(nt,np), OPTIONAL, INTENT(in) :: &
99  tpsit
100  TYPE(t_vtp), DIMENSION(nl,nt,np), OPTIONAL, INTENT(in) :: &
101  tpsil
102  INTEGER :: &
103  jk,jl
104  INTEGER, DIMENSION(1) :: &
105  imin,imax
106  REAL :: &
107  zfav,zmin,zmax
108  REAL, DIMENSION(np) :: &
109  zfsit,zftot
110 
111 
112  IF (lp2) THEN
113 !
114 ! *** Define glt_output logical unit.
115 !
116  WRITE(noutlu,*) ' '
117  WRITE(noutlu,*) ' ****',omess,'****'
118  WRITE(noutlu,*) ' '
119 !
120  ENDIF
121 !
122 ! *** Performs statistics on sea ice 3D variables.
123 !
124  IF (present(tpsit)) THEN
125 !
126  IF (lp2) THEN
127  zfsit(:) = sum( tpsit(:,:)%fsi,dim=1 )
128  zmin = minval( zfsit(:) )
129  zmax = maxval( zfsit(:) )
130  imin = minloc( zfsit(:) )
131  imax = maxloc( zfsit(:) )
132  WRITE(noutlu,1300) &
133  'fsit :',zmin,imin(1),zmax,imax(1)
134  WRITE(noutlu,*) ' '
135  ENDIF
136 !
137  IF (lp3) THEN
138  DO jk = 1,nt
139 !
140 ! * Snow albedo.
141 !
142  zfav = sum( tpsit(jk,:)%asn ) / float(np)
143  zmin = minval( tpsit(jk,:)%asn )
144  zmax = maxval( tpsit(jk,:)%asn )
145  imin = minloc( tpsit(jk,:)%asn )
146  imax = maxloc( tpsit(jk,:)%asn )
147 !
148  WRITE(noutlu,1400) jk,'asn :',zmin,imin(1), &
149  zmax,imax(1),zfav
150 !
151 ! * Sea ice fraction.
152 !
153  zfav = sum( tpsit(jk,:)%fsi ) / float(np)
154  zmin = minval( tpsit(jk,:)%fsi )
155  zmax = maxval( tpsit(jk,:)%fsi )
156  imin = minloc( tpsit(jk,:)%fsi )
157  imax = maxloc( tpsit(jk,:)%fsi )
158 !
159  WRITE(noutlu,1400) jk,'fsi :',zmin,imin(1), &
160  zmax,imax(1),zfav
161 !
162 ! * Sea ice thickness.
163 !
164  zfav = sum( tpsit(jk,:)%hsi ) / float(np)
165  zmin = minval( tpsit(jk,:)%hsi )
166  zmax = maxval( tpsit(jk,:)%hsi )
167  imin = minloc( tpsit(jk,:)%hsi )
168  imax = maxloc( tpsit(jk,:)%hsi )
169 !
170  WRITE(noutlu,1500) jk,'hsi :',zmin,imin(1), &
171  zmax,imax(1),zfav
172 !
173 ! * Snow thickness.
174 !
175  zfav = sum( tpsit(jk,:)%hsn ) / float(np)
176  zmin = minval( tpsit(jk,:)%hsn )
177  zmax = maxval( tpsit(jk,:)%hsn )
178  imin = minloc( tpsit(jk,:)%hsn )
179  imax = maxloc( tpsit(jk,:)%hsn )
180 !
181  WRITE(noutlu,1500) jk,'hsn :',zmin,imin(1), &
182  zmax,imax(1),zfav
183 !
184 ! * Snow density.
185 !
186  zfav = sum( tpsit(jk,:)%rsn ) / float(np)
187  zmin = minval( tpsit(jk,:)%rsn )
188  zmax = maxval( tpsit(jk,:)%rsn )
189  imin = minloc( tpsit(jk,:)%rsn )
190  imax = maxloc( tpsit(jk,:)%rsn )
191 !
192  WRITE(noutlu,1500) jk,'rsn :',zmin,imin(1), &
193  zmax,imax(1),zfav
194 !
195 ! * Surface temperature.
196 !
197  zfav = sum( tpsit(jk,:)%tsf ) / float(np)
198  zmin = minval( tpsit(jk,:)%tsf )
199  zmax = maxval( tpsit(jk,:)%tsf )
200  imin = minloc( tpsit(jk,:)%tsf )
201  imax = maxloc( tpsit(jk,:)%tsf )
202 !
203  WRITE(noutlu,1800) jk,'tsf :',zmin,imin(1), &
204  zmax,imax(1),zfav
205 !
206 ! * Ice salinity (psu).
207 !
208  IF ( nicesal==1 ) THEN
209  zfav = sum( tpsit(jk,:)%ssi ) / float(np)
210  zmin = minval( tpsit(jk,:)%ssi )
211  zmax = maxval( tpsit(jk,:)%ssi )
212  imin = minloc( tpsit(jk,:)%ssi )
213  imax = maxloc( tpsit(jk,:)%ssi )
214 !
215  WRITE(noutlu,1500) jk,'ssi :',zmin,imin(1), &
216  zmax,imax(1),zfav
217  ENDIF
218 !
219 ! * Ice age (in days).
220 !
221  IF ( niceage==1 ) THEN
222  zfav = sum( tpsit(jk,:)%age ) / xday2sec / float(np)
223  zmin = minval( tpsit(jk,:)%age ) / xday2sec
224  zmax = maxval( tpsit(jk,:)%age ) / xday2sec
225  imin = minloc( tpsit(jk,:)%age )
226  imax = maxloc( tpsit(jk,:)%age )
227 !
228  WRITE(noutlu,1600) jk,'age :',zmin,imin(1), &
229  zmax,imax(1),zfav
230  ENDIF
231 !
232 ! * Melt pond volume.
233 !
234  IF ( nmponds==1 ) THEN
235  zfav = sum( tpsit(jk,:)%vmp ) / float(np)
236  zmin = minval( tpsit(jk,:)%vmp )
237  zmax = maxval( tpsit(jk,:)%vmp )
238  imin = minloc( tpsit(jk,:)%vmp )
239  imax = maxloc( tpsit(jk,:)%vmp )
240 !
241  WRITE(noutlu,1500) jk,'vmp :',zmin,imin(1), &
242  zmax,imax(1),zfav
243  ENDIF
244  WRITE(noutlu,*) ' '
245  END DO
246  ENDIF
247  ENDIF
248 !
249 ! *** Performs statistics on sea ice 4D variables.
250 !
251  IF (present(tpsil)) THEN
252 !
253  IF (lp3) THEN
254  DO jk = 1,nt
255  DO jl = 1,nl
256 !
257 ! * Vertical gltools_enthalpy profile
258 !
259  zfav = sum(tpsil(jl,jk,:)%ent) / float(np)
260  zmin = minval(tpsil(jl,jk,:)%ent)
261  zmax = maxval(tpsil(jl,jk,:)%ent)
262  imin = minloc(tpsil(jl,jk,:)%ent)
263  imax = maxloc(tpsil(jl,jk,:)%ent)
264 !
265  WRITE(noutlu,1700) jk,jl,'ent :',zmin,imin(1), &
266  zmax,imax(1),zfav
267  END DO
268  WRITE(noutlu,*) ' '
269  END DO
270  ENDIF
271  ENDIF
272 !
273 ! *** Formats
274 !
275 1300 FORMAT( a6, &
276  ' min=',f7.4,1x,'at (',i5,') max=', &
277  f7.4,1x,'at (',i5,')' )
278 1400 FORMAT( 'th',i2.2,1x,a5, &
279  ' min=',f7.4,1x,'at (',i5,') max=', &
280  f7.4,1x,'at (',i5,') ave=',f7.4 )
281 1500 FORMAT( 'th',i2.2,1x,a5, &
282  ' min=',f8.4,1x,'at (',i5,') max=', &
283  f8.4,1x,'at (',i5,') ave=',f8.4 )
284 1600 FORMAT( 'th',i2.2,1x,a5, &
285  ' min=',f8.2,1x,'at (',i5,') max=', &
286  f8.2,1x,'at (',i5,') ave=',f8.2 )
287 1700 FORMAT( 'th',i2.2,1x,'lev',i2.2,1x,a5, &
288  ' min=',e12.5,1x,'at (',i5,') max=', &
289  e12.5,1x,'at (',i5,') ave=',e12.5 )
290 1800 FORMAT( 'th',i2.2,1x,a5, &
291  ' min=',f8.3,1x,'at (',i5,') max=', &
292  f8.3,1x,'at (',i5,') ave=',f8.3 )
293 !
294 ! *** End of routine
295 !
296 END SUBROUTINE glt_info_si_r
297 !
298 ! ----------------------- END SUBROUTINE glt_info_si_r ----------------------
299 ! -----------------------------------------------------------------------
subroutine glt_info_si_r(omess, tpsit, tpsil)