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