SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_gltools_chkglo_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 modi_gltools_chkglo_r ====================
41 ! =======================================================================
42 !
43 ! Goal:
44 ! -----
45 ! This module contains a subroutine that prints sea ice surface,
46 ! extent and volume separately in both hemispheres. Note these results
47 ! are printed only if nprinto flag is greater or equal to 2.
48 ! Note that mpp_sum (invoke all procs) cannot be used e.g. under
49 ! condition lp2==.TRUE. Hence we use nprinto.
50 !
51 ! Created : 1999 (D. Salas y Melia)
52 ! Repeated code doing that throughout the model is written in
53 ! a more standard form and only once in the present routine.
54 ! Modified: 2009/06 (D. Salas y Melia) reduced grid
55 ! Modified: 2012/07 (D. Salas y Melia) parallelism
56 !
57 ! ------------------ BEGIN MODULE modi_gltools_chkglo_r -----------------
58 
59 !THXS_SFX!MODULE modi_gltools_chkglo_r
60 !THXS_SFX!INTERFACE
61 !THXS_SFX!
62 !THXS_SFX!SUBROUTINE gltools_chkglo_r(omsg,tpdom,tpsit)
63 !THXS_SFX! USE modd_types_glt
64 !THXS_SFX! USE modd_glt_param
65 !THXS_SFX! CHARACTER(*), INTENT(in) :: &
66 !THXS_SFX! omsg
67 !THXS_SFX! TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
68 !THXS_SFX! tpdom
69 !THXS_SFX! TYPE(t_sit), DIMENSION(nt,np), INTENT(in) :: &
70 !THXS_SFX! tpsit
71 !THXS_SFX!END SUBROUTINE gltools_chkglo_r
72 !THXS_SFX!
73 !THXS_SFX!END INTERFACE
74 !THXS_SFX!END MODULE modi_gltools_chkglo_r
75 
76 ! ------------------- END MODULE modi_gltools_chkglo_r ------------------
77 
78 
79 ! -----------------------------------------------------------------------
80 ! -------------------- SUBROUTINE gltools_chkglo_r ----------------------
81 
82 ! * Subroutine used to check global sea ice extent, area and volume in
83 ! both hemispheres.
84 
85 SUBROUTINE gltools_chkglo_r(omsg,tpdom,tpsit)
86 !
88  USE modd_types_glt
89  USE modd_glt_param
90 #if ! defined in_arpege
91  USE lib_mpp
92 #endif
93  IMPLICIT NONE
94 !
95  CHARACTER(*), INTENT(in) :: &
96  omsg
97  TYPE(t_dom), DIMENSION(np), INTENT(in) :: &
98  tpdom
99  TYPE(t_sit), DIMENSION(nt,np), INTENT(in) :: &
100  tpsit
101 !
102  LOGICAL, DIMENSION(np) :: &
103  ghnorth,ghsouth
104  REAL :: &
105  zlatn0,zlats0,zehn,zehs,zshn,zshs,zvhn,zvhs
106  REAL, DIMENSION(np) :: &
107  zfsit,zhsiw
108 !
109 !
110 !
111 ! 1. Initializations
112 ! ==================
113 !
114  IF ( nprinto>=2 ) THEN
115 !
116 ! .. Print message
117 !
118  IF (lwg) THEN
119  WRITE(noutlu,*) ' '
120  WRITE(noutlu,*) ' **** gltools_chkglo_r ****'
121  WRITE(noutlu,*) omsg
122  ENDIF
123 !
124 ! .. Northern and southern boundaries (latitude)
125 !
126  zlatn0 = 0. ! 40.*pi/180.
127  zlats0 = 0. ! -40.*pi/180.
128 !
129 ! .. Compute the total concentration of sea ice and its average thickness
130 ! field.
131 !
132  zfsit(:) = sum( tpsit(:,:)%fsi, dim=1 )
133 !
134  zhsiw(:) = sum( tpsit(:,:)%fsi*tpsit(:,:)%hsi, dim=1 )
135 !
136 ! .. Define the northern and southern domains
137 !
138  ghnorth(:) = .false.
139  ghsouth(:) = .false.
140 !
141  WHERE( tpdom(:)%lat>zlatn0 )
142  ghnorth(:) = .true.
143  ENDWHERE
144 !
145  WHERE( tpdom(:)%lat<zlats0 )
146  ghsouth(:) = .true.
147  ENDWHERE
148 !
149 !
150 !
151 ! 2. Compute global quantities (north and south)
152 ! ==============================================
153 !
154 ! 2.1. Sea ice extent (in millions of km2)
155 ! ----------------------------------------
156 !
157  zehn = sum( tpdom(:)%srf, mask=(ghnorth(:).AND.zfsit(:)>xfsic) ) / 1.e+12
158  zehs = sum( tpdom(:)%srf, mask=(ghsouth(:).AND.zfsit(:)>xfsic) ) / 1.e+12
159 !
160 !
161 ! 2.2. Sea ice area (in millions of km2)
162 ! --------------------------------------
163 !
164  zshn = sum( tpdom(:)%srf*zfsit(:), mask=ghnorth(:) ) / 1.e+12
165  zshs = sum( tpdom(:)%srf*zfsit(:), mask=ghsouth(:) ) / 1.e+12
166 !
167 !
168 ! 2.3. Sea ice volume
169 ! -------------------
170 !
171  zvhn = sum( tpdom(:)%srf*zhsiw(:), mask=ghnorth(:) ) / 1.e+12
172  zvhs = sum( tpdom(:)%srf*zhsiw(:), mask=ghsouth(:) ) / 1.e+12
173 !
174 !
175 !
176 ! 3. Write totals to output file
177 ! ==============================
178 !
179 #if ! defined in_arpege
180  CALL mpp_sum( zshn )
181  CALL mpp_sum( zshs )
182  CALL mpp_sum( zehn )
183  CALL mpp_sum( zehs )
184  CALL mpp_sum( zvhn )
185  CALL mpp_sum( zvhs )
186 !
187  IF (lwg) THEN
188  WRITE(noutlu,*) ' North South'
189  WRITE(noutlu,1000) zshn,zshs
190  WRITE(noutlu,1100) zehn,zehs
191  WRITE(noutlu,1200) zvhn,zvhs
192  ENDIF
193 #endif
194 !
195  ENDIF
196 !
197 !
198 !
199 ! 4. Formats
200 ! ==========
201 !
202 1000 FORMAT( 5x,"Ice surface (SISH.SIG)",2(4x,f9.5) )
203 1100 FORMAT( 5x,"Ice extent (SIEH.SIG)",2(4x,f9.5) )
204 1200 FORMAT( 5x,"Ice volume (SIVH.SIG)",2(4x,f9.5) )
205 !
206 END SUBROUTINE gltools_chkglo_r
207 
208 ! ---------------------- END SUBROUTINE gltools_chkglo_r ------------------------
209 ! -----------------------------------------------------------------------
subroutine gltools_chkglo_r(omsg, tpdom, tpsit)