SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_glt_stats.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_stats ===========================
41 ! =======================================================================
42 !
43 !
44 ! This module contains some subroutines that help the icestate user or
45 ! developper to have better control on model outputs, while it is
46 ! running.
47 !
48 
49 ! --------------------- BEGIN MODULE mode_glt_stats -------------------------
50 
52 INTERFACE
53 
54 FUNCTION glt_get_class(phsi)
55  REAL, INTENT(in) :: &
56  phsi
57  INTEGER :: &
59 END FUNCTION glt_get_class
60 
61 FUNCTION glt_iceconc(kicell,kjcell,tpsit)
62  USE modd_types_glt
63  USE modd_glt_param
64  INTEGER, INTENT(in) :: &
65  kicell,kjcell
66  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
67  tpsit
68  REAL :: &
70 END FUNCTION glt_iceconc
71 
72 FUNCTION glt_iceconcm(tpdom,tpsit)
73  USE modd_types_glt
74  USE modd_glt_param
75  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
76  tpdom
77  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
78  tpsit
79  REAL, DIMENSION(nx,ny) :: &
81 END FUNCTION glt_iceconcm
82 
83 FUNCTION glt_thinice_concm(tpdom,tpsit)
84  USE modd_types_glt
85  USE modd_glt_param
86  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
87  tpdom
88  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
89  tpsit
90  REAL, DIMENSION(nx,ny) :: &
92 END FUNCTION glt_thinice_concm
93 
94 FUNCTION glt_thickice_concm(tpdom,tpsit)
95  USE modd_types_glt
96  USE modd_glt_param
97  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
98  tpdom
99  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
100  tpsit
101  REAL, DIMENSION(nx,ny) :: &
103 END FUNCTION glt_thickice_concm
104 
105 FUNCTION glt_icesurfg(tpdom,tpsit)
106  USE modd_types_glt
107  USE modd_glt_param
108  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
109  tpdom
110  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
111  tpsit
112  REAL :: &
114 END FUNCTION glt_icesurfg
115 
116 FUNCTION glt_avg(tpdom,pfield,ktot)
117  USE modd_types_glt
118  USE modd_glt_param
119  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
120  tpdom
121  REAL, DIMENSION(nx,ny), INTENT(in) :: &
122  pfield
123  INTEGER, INTENT(in) :: &
124  ktot
125  REAL :: &
126  glt_avg
127 END FUNCTION glt_avg
128 
129 FUNCTION glt_avhice(kicell,kjcell,tpsit)
130  USE modd_types_glt
131  USE modd_glt_param
132  INTEGER, INTENT(in) :: &
133  kicell,kjcell
134  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
135  tpsit
136  REAL :: &
137  glt_avhice
138 END FUNCTION glt_avhice
139 
140 FUNCTION glt_avhicem(tpdom,tpsit)
141  USE modd_types_glt
142  USE modd_glt_param
143  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
144  tpdom
145  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
146  tpsit
147  REAL, DIMENSION(nx,ny) :: &
149 END FUNCTION glt_avhicem
150 
151 FUNCTION glt_avhsnwm(tpdom,tpsit)
152  USE modd_types_glt
153  USE modd_glt_param
154  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
155  tpdom
156  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
157  tpsit
158  REAL, DIMENSION(nx,ny) :: &
160 END FUNCTION glt_avhsnwm
161 
162 FUNCTION glt_avmsnwm(tpdom,tpsit)
163  USE modd_types_glt
164  USE modd_glt_param
165  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
166  tpdom
167  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
168  tpsit
169  REAL, DIMENSION(nx,ny) :: &
171 END FUNCTION glt_avmsnwm
172 
173 FUNCTION glt_avhiceg(tpdom,tpsit)
174  USE modd_types_glt
175  USE modd_glt_param
176  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
177  tpdom
178  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
179  tpsit
180  REAL :: &
182 END FUNCTION glt_avhiceg
183 
184 FUNCTION glt_voliceg(tpdom,tpsit)
185  USE modd_types_glt
186  USE modd_glt_param
187  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
188  tpdom
189  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
190  tpsit
191  REAL :: &
193 END FUNCTION glt_voliceg
194 
195 FUNCTION glt_vtpint(pz,pvtpo,plevo)
196  REAL, INTENT(in) :: &
197  pz
198  REAL, DIMENSION(:), INTENT(in) :: &
199  pvtpo
200  REAL, DIMENSION(:), INTENT(in) :: &
201  plevo
202  REAL :: &
203  glt_vtpint
204 END FUNCTION glt_vtpint
205 
206 END INTERFACE
207 END MODULE mode_glt_stats
208 
209 ! ---------------------- END MODULE mode_glt_stats --------------------------
210 
211 
212 
213 ! -----------------------------------------------------------------------
214 ! ------------------------- FUNCTION glt_get_class --------------------------
215 
216 ! The input argument is a thickness, expressed in meters. Function
217 ! glt_get_class returns the class to which this thickness belongs.
218 
219 FUNCTION glt_get_class(phsi)
220 !
221  USE modd_glt_param
222 !
223  IMPLICIT none
224 
225  REAL, INTENT(in) :: &
226  phsi
227  INTEGER :: &
229  INTEGER :: &
230  ji
231 
232  ji = 0
233  DO ji = 1,nt
234  IF (thick(ji) < phsi .AND. phsi <= thick(ji+1)) EXIT
235  END DO
236  glt_get_class = ji
237 !
238 END FUNCTION glt_get_class
239 
240 ! ----------------------- END FUNCTION glt_get_class ------------------------
241 ! -----------------------------------------------------------------------
242 
243 
244 ! -----------------------------------------------------------------------
245 ! ------------------------- FUNCTION glt_iceconc ----------------------------
246 
247 ! Returns the surface of the ice cover on a specified grid cell (a
248 ! percentage given in fractions of unity)
249 
250 FUNCTION glt_iceconc(kicell,kjcell,tpsit)
251 !
252  USE modd_types_glt
253  USE modd_glt_param
254 !
255  IMPLICIT NONE
256 
257  INTEGER, INTENT(in) :: &
258  kicell,kjcell
259  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
260  tpsit
261  REAL :: &
262  glt_iceconc
263 
264  glt_iceconc = sum( tpsit(:,kicell,kjcell)%fsi )
265 !
266 END FUNCTION glt_iceconc
267 
268 ! ------------------------ END FUNCTION glt_iceconc -------------------------
269 ! -----------------------------------------------------------------------
270 
271 
272 ! -----------------------------------------------------------------------
273 ! ------------------------- FUNCTION glt_iceconcm ---------------------------
274 
275 ! Returns the array of fractional ice coverage on all the cells of
276 ! the domain.
277 
278 FUNCTION glt_iceconcm(tpdom,tpsit)
279 !
280  USE modd_types_glt
281  USE modd_glt_param
282 !
283  IMPLICIT NONE
284 
285  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
286  tpdom
287  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
288  tpsit
289  REAL, DIMENSION(nx,ny) :: &
290  glt_iceconcm
291 
292 ! * Compute total sea ice concentration.
293  glt_iceconcm(:,:) = sum( tpsit(:,:,:)%fsi,dim=1 )
294  WHERE (tpdom(:,:)%tmk==0)
295  glt_iceconcm(:,:) = 0.
296  ENDWHERE
297 !
298 END FUNCTION glt_iceconcm
299 
300 ! ------------------------ END FUNCTION glt_iceconcm ------------------------
301 ! -----------------------------------------------------------------------
302 
303 
304 ! -----------------------------------------------------------------------
305 ! ----------------------- FUNCTION glt_thinice_concm ------------------------
306 
307 ! Returns the array of fractional ice coverage on all the cells of
308 ! the domain (ONLY thin ice, thinner than a threshold thickness that
309 ! is given as a namelist parameter).
310 
311 FUNCTION glt_thinice_concm(tpdom,tpsit)
312 !
313  USE modd_types_glt
314  USE modd_glt_param
315 !
316  IMPLICIT NONE
317 
318  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
319  tpdom
320  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
321  tpsit
322  REAL, DIMENSION(nx,ny) :: &
324 
325  glt_thinice_concm(:,:) = &
326  sum(tpsit(:,:,:)%fsi,mask=(tpsit(:,:,:)%hsi<xicethcr),dim=1)
327  WHERE (tpdom(:,:)%tmk == 0)
328  glt_thinice_concm(:,:) = 0.
329  ENDWHERE
330 !
331 END FUNCTION glt_thinice_concm
332 
333 ! --------------------- END FUNCTION glt_thinice_concm ----------------------
334 ! -----------------------------------------------------------------------
335 
336 
337 ! -----------------------------------------------------------------------
338 ! ----------------------- FUNCTION glt_thickice_concm -----------------------
339 
340 ! Returns the array of fractional ice coverage on all the cells of
341 ! the domain (ONLY thick ice, thicker than a threshold thickness that
342 ! is given as a namelist parameter : xicethcr).
343 
344 FUNCTION glt_thickice_concm(tpdom,tpsit)
345 !
346  USE modd_types_glt
347  USE modd_glt_param
348 !
349  IMPLICIT NONE
350 
351  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
352  tpdom
353  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
354  tpsit
355  REAL, DIMENSION(nx,ny) :: &
357 
358  glt_thickice_concm(:,:) = &
359  sum(tpsit(:,:,:)%fsi,mask=(tpsit(:,:,:)%hsi>xicethcr),dim=1)
360  WHERE (tpdom(:,:)%tmk == 0)
361  glt_thickice_concm(:,:) = 0.
362  ENDWHERE
363 !
364 END FUNCTION glt_thickice_concm
365 
366 ! -------------------- END FUNCTION glt_thickice_concm ----------------------
367 ! -----------------------------------------------------------------------
368 
369 
370 ! -----------------------------------------------------------------------
371 ! -------------------------- FUNCTION glt_icesurfg --------------------------
372 
373 ! Returns the total surface of the ice cover in a given region (sq. m)
374 
375 FUNCTION glt_icesurfg(tpdom,tpsit)
376 !
377  USE modd_types_glt
378  USE modd_glt_param
379  USE lib_mpp
380 !
381  IMPLICIT NONE
382 
383  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
384  tpdom
385  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
386  tpsit
387  REAL :: &
389  REAL, DIMENSION(nx,ny) :: &
390  z2_sumfsi
391 
392  z2_sumfsi(:,:) = sum( tpsit(:,:,:)%fsi,dim=1 )
393  WHERE (tpdom(:,:)%tmk==0)
394  z2_sumfsi(:,:) = 0.
395  ENDWHERE
396  glt_icesurfg = sum(z2_sumfsi(:,:)*tpdom(:,:)%srf, mask=(tpdom(:,:)%tmk==1))
397 !
398  CALL mpp_sum( glt_icesurfg )
399 !
400 END FUNCTION glt_icesurfg
401 
402 ! ------------------------ END FUNCTION glt_icesurfg ------------------------
403 ! -----------------------------------------------------------------------
404 
405 
406 ! -----------------------------------------------------------------------
407 ! --------------------------- FUNCTION glt_avg ------------------------------
408 
409 ! Returns the global average of a 2D array over the entire domain
410 ! ktot=1 : integral
411 ! ktot=0 : average
412 
413 FUNCTION glt_avg(tpdom,pfield,ktot)
414 !
415  USE modd_types_glt
416  USE modd_glt_param
417  USE lib_mpp
418 !
419  IMPLICIT NONE
420 !
421  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
422  tpdom
423  REAL, DIMENSION(nx,ny), INTENT(in) :: &
424  pfield
425  INTEGER, INTENT(in) :: &
426  ktot
427  REAL :: &
428  glt_avg
429 !
430  REAL :: &
431  zsrf
432 !
433  glt_avg = &
434  sum( pfield(:,:)*tpdom(:,:)%srf, mask=(tpdom(:,:)%tmk==1) )
435 !
436  CALL mpp_sum( glt_avg )
437 !
438  IF ( ktot==0 ) THEN
439  glt_avg = glt_avg / xdomsrf_g
440  ENDIF
441 !
442 END FUNCTION glt_avg
443 
444 ! ------------------------- END FUNCTION glt_avg ----------------------------
445 ! -----------------------------------------------------------------------
446 
447 
448 ! -----------------------------------------------------------------------
449 ! -------------------------- FUNCTION glt_avhice ----------------------------
450 
451 ! Returns the average ice thickness on a specified grid cell.
452 
453 FUNCTION glt_avhice(kicell,kjcell,tpsit)
454 !
455  USE modd_types_glt
456  USE modd_glt_param
457 !
458  IMPLICIT NONE
459 
460  INTEGER, INTENT(in) :: &
461  kicell,kjcell
462  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
463  tpsit
464  REAL :: &
465  glt_avhice
466 
467  glt_avhice = &
468  sum( tpsit(:,kicell,kjcell)%fsi*tpsit(:,kicell,kjcell)%hsi )
469 !
470 END FUNCTION glt_avhice
471 
472 ! ------------------------ END FUNCTION glt_avhice --------------------------
473 ! -----------------------------------------------------------------------
474 
475 
476 ! -----------------------------------------------------------------------
477 ! ------------------------- FUNCTION glt_avhicem ----------------------------
478 
479 ! Returns the array of average ice thickness on all the cells of
480 ! the domain.
481 
482 FUNCTION glt_avhicem(tpdom,tpsit)
483 !
484  USE modd_types_glt
485  USE modd_glt_param
486 !
487  IMPLICIT NONE
488 
489  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
490  tpdom
491  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
492  tpsit
493  REAL, DIMENSION(nx,ny) :: &
495 
496  glt_avhicem(:,:) = sum( tpsit(:,:,:)%fsi*tpsit(:,:,:)%hsi,dim=1 )
497  WHERE ( tpdom(:,:)%tmk==0 )
498  glt_avhicem(:,:) = 0.
499  ENDWHERE
500 !
501 END FUNCTION glt_avhicem
502 
503 ! ------------------------ END FUNCTION glt_avhicem -------------------------
504 ! -----------------------------------------------------------------------
505 
506 
507 ! -----------------------------------------------------------------------
508 ! -------------------------- FUNCTION glt_avhsnwm ---------------------------
509 
510 ! Returns the array of average snow thickness on all the cells of
511 ! the domain.
512 
513 FUNCTION glt_avhsnwm(tpdom,tpsit)
514  USE modd_types_glt
515  USE modd_glt_param
516 !
517  IMPLICIT NONE
518 
519  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
520  tpdom
521  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
522  tpsit
523  REAL, DIMENSION(nx,ny) :: &
525 
526  glt_avhsnwm(:,:) = sum(tpsit(:,:,:)%fsi*tpsit(:,:,:)%hsn,dim=1)
527  WHERE (tpdom(:,:)%tmk == 0)
528  glt_avhsnwm(:,:) = 0.
529  ENDWHERE
530 !
531 END FUNCTION glt_avhsnwm
532 
533 ! ------------------------ END FUNCTION glt_avhsnwm -------------------------
534 ! -----------------------------------------------------------------------
535 
536 
537 ! -----------------------------------------------------------------------
538 ! -------------------------- FUNCTION glt_avmsnwm ---------------------------
539 
540 ! Returns the array of average snow mass on all the cells of
541 ! the domain (kg/m2)
542 
543 FUNCTION glt_avmsnwm(tpdom,tpsit)
544  USE modd_types_glt
545  USE modd_glt_param
547 !
548  IMPLICIT NONE
549 
550  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
551  tpdom
552  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
553  tpsit
554  REAL, DIMENSION(nx,ny) :: &
556 
557  glt_avmsnwm(:,:) = sum( &
558  tpsit(:,:,:)%fsi*tpsit(:,:,:)%rsn*tpsit(:,:,:)%hsn, dim=1 )
559 !
560 END FUNCTION glt_avmsnwm
561 
562 ! ------------------------ END FUNCTION glt_avmsnwm -------------------------
563 ! -----------------------------------------------------------------------
564 
565 
566 ! -----------------------------------------------------------------------
567 ! -------------------------- FUNCTION glt_avhiceg ---------------------------
568 
569 ! Returns the average ice thickness on the whole domain
570 
571 FUNCTION glt_avhiceg(tpdom,tpsit)
572 !
573  USE modd_types_glt
574  USE modd_glt_param
575  USE lib_mpp
576 !
577  IMPLICIT NONE
578 
579  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
580  tpdom
581  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
582  tpsit
583  REAL :: &
585  REAL, DIMENSION(nx,ny) :: &
586  z2_avhsi
587 
588  z2_avhsi(:,:) = &
589  sum( tpsit(:,:,:)%fsi*tpsit(:,:,:)%hsi,dim=1 )
590  WHERE (tpdom(:,:)%tmk==0)
591  z2_avhsi(:,:) = 0.
592  ENDWHERE
593  glt_avhiceg = &
594  sum(z2_avhsi(:,:)*tpdom(:,:)%srf, mask=(tpdom(:,:)%tmk==1))
595 !
596  CALL mpp_sum( glt_avhiceg )
597  glt_avhiceg = glt_avhiceg / xdomsrf
598 !
599 END FUNCTION glt_avhiceg
600 
601 ! ------------------------ END FUNCTION glt_avhiceg -------------------------
602 ! -----------------------------------------------------------------------
603 
604 
605 ! -----------------------------------------------------------------------
606 ! -------------------------- FUNCTION glt_voliceg ---------------------------
607 
608 ! Returns the total volume of ice on the whole region of study, in
609 ! cubic m.
610 
611 FUNCTION glt_voliceg(tpdom,tpsit)
612 !
613  USE modd_types_glt
614  USE modd_glt_param
615  USE lib_mpp
616 !
617  IMPLICIT NONE
618 
619  TYPE(t_dom), DIMENSION(nx,ny), INTENT(in) :: &
620  tpdom
621  TYPE(t_sit), DIMENSION(nt,nx,ny), INTENT(in) :: &
622  tpsit
623  REAL :: &
625  REAL, DIMENSION(nx,ny) :: &
626  z2_avhsi
627 
628  z2_avhsi(:,:) = sum( tpsit(:,:,:)%fsi*tpsit(:,:,:)%hsi,dim=1 )
629  WHERE (tpdom(:,:)%tmk==0)
630  z2_avhsi(:,:) = 0.
631  ENDWHERE
632  glt_voliceg = sum(z2_avhsi(:,:)*tpdom(:,:)%srf, mask=(tpdom(:,:)%tmk==1))
633 !
634  CALL mpp_sum( glt_voliceg )
635 !
636 END FUNCTION glt_voliceg
637 !
638 ! ------------------------ END FUNCTION glt_voliceg -------------------------
639 ! -----------------------------------------------------------------------
640 !
641 !
642 ! -----------------------------------------------------------------------
643 ! --------------------------- FUNCTION glt_vtpint ---------------------------
644 !
645 ! * If pvtpo (old vertical tracer profile) has dimension (n),
646 ! plevo (old, normalized levels: bottom=0, top=1) should have
647 ! dimension (n+1)
648 ! * Output: integral between z=0 and z=pz of vertical tracer.
649 !
650 FUNCTION glt_vtpint(pz,pvtpo,plevo)
651 !
652  IMPLICIT NONE
653 !
654  REAL, INTENT(in) :: &
655  pz
656  REAL, DIMENSION(:), INTENT(in) :: &
657  pvtpo
658  REAL, DIMENSION(:), INTENT(in) :: &
659  plevo
660  REAL :: &
661  glt_vtpint
662 !
663  INTEGER :: jl
664 !
665  glt_vtpint = 0.
666 !
667  DO jl=1,SIZE(pvtpo)
668  glt_vtpint = glt_vtpint + &
669  pvtpo(jl)* &
670  ( ( amin1(pz,plevo(jl+1))-plevo(jl)) * &
671  ( 1.+sign(1.,pz-plevo(jl)) )/2. )
672  END DO
673 !
674 END FUNCTION glt_vtpint
675 !
676 ! ------------------------- END FUNCTION glt_vtpint -------------------------
677 ! -----------------------------------------------------------------------
real function glt_avhiceg(tpdom, tpsit)
real function glt_voliceg(tpdom, tpsit)
real function glt_avg(tpdom, pfield, ktot)
real function glt_vtpint(pz, pvtpo, plevo)
real function, dimension(nx, ny) glt_thickice_concm(tpdom, tpsit)
real function, dimension(nx, ny) glt_avhicem(tpdom, tpsit)
real function, dimension(nx, ny) glt_thinice_concm(tpdom, tpsit)
integer function glt_get_class(phsi)
real function glt_iceconc(kicell, kjcell, tpsit)
real function, dimension(nx, ny) glt_avmsnwm(tpdom, tpsit)
real function, dimension(nx, ny) glt_avhsnwm(tpdom, tpsit)
real function glt_icesurfg(tpdom, tpsit)
real function, dimension(nx, ny) glt_iceconcm(tpdom, tpsit)
real function glt_avhice(kicell, kjcell, tpsit)