SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_glt_dia_lu.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
40 !INTERFACE
41 !
42 !SUBROUTINE opndia
43 !END SUBROUTINE opndia
44 !
45 !SUBROUTINE clsdia
46 !END SUBROUTINE clsdia
47 !!
48 !END INTERFACE
49 !END MODULE mode_glt_dia_lu
50 !
51  CONTAINS
52 !
53 !
54 !
55 ! -----------------------------------------------------------------------
56 ! -------------------------- SUBROUTINE OPNDIA --------------------------
57 !
58 SUBROUTINE opndia()
59 !
60  USE modd_glt_param
61  USE modd_types_glt
62  IMPLICIT NONE
63 !
64  CHARACTER(80) :: &
65  yfname
66 !
67 !
68 ! .. Welcome message
69 !
70  IF (lwg) THEN
71  WRITE(noutlu,*) ' '
72  WRITE(noutlu,*) ' *** LEVEL 3 - SUBROUTINE OPNDIA'
73  WRITE(noutlu,*) ' '
74  ENDIF
75 !
76 ! .. Open diagnostics files.
77 !
78  IF ( lwg ) THEN
79  SELECT CASE ( trim(cdiafmt) )
80  CASE( 'GELATO' )
81  IF ( ndiap1==1 .OR. ndiap2==1 ) THEN
82  IF ( ninsdia==1 ) THEN
83  yfname = '2d.ins.vairmer'
84  OPEN(unit=n2vilu,file=trim(yfname),form='UNFORMATTED')
85  ENDIF
86  IF ( navedia==1 ) THEN
87  yfname = '2d.ave.vairmer'
88  OPEN(unit=n2valu,file=trim(yfname),form='UNFORMATTED')
89  ENDIF
90  ENDIF
91  IF ( ndiap3==1 ) THEN
92  yfname = '0d.ins.vairmer'
93  OPEN(unit=n0vilu,file=trim(yfname),form='UNFORMATTED')
94  ENDIF
95  CASE( 'VMAR5' )
96  IF ( ndiap1==1 .OR. ndiap2==1 .OR. ndiap3==1 ) THEN
97  IF ( ninsdia==1 ) THEN
98  yfname = '2d.ins.ar5'
99  OPEN(unit=n2vilu,file=trim(yfname),form='UNFORMATTED')
100  ENDIF
101  IF ( navedia==1 ) THEN
102  yfname = '2d.ave.ar5'
103  OPEN(unit=n2valu,file=trim(yfname),form='UNFORMATTED')
104  ENDIF
105  ENDIF
106  IF ( ndiap1==1 ) THEN
107  IF ( ninsdia==1 ) THEN
108  yfname = '0d.ins.ar5'
109  OPEN(unit=n0vilu,file=trim(yfname),form='UNFORMATTED')
110  ENDIF
111  IF ( navedia==1 ) THEN
112  yfname = '0d.ave.ar5'
113  OPEN(unit=n0valu,file=trim(yfname),form='UNFORMATTED')
114  ENDIF
115  ENDIF
116  IF ( ndiapx==1 ) THEN
117  IF ( ninsdia==1 ) THEN
118  yfname = '2d.ins.x'
119  OPEN(unit=nxvilu,file=trim(yfname),form='UNFORMATTED')
120  ENDIF
121  IF ( navedia==1 ) THEN
122  yfname = '2d.ave.x'
123  OPEN(unit=nxvalu,file=trim(yfname),form='UNFORMATTED')
124  ENDIF
125  ENDIF
126  END SELECT
127  ENDIF
128 !
129 ! .. Farewell message
130 !
131  IF (lp1) THEN
132  WRITE(noutlu,*) ' '
133  WRITE(noutlu,*) ' *** LEVEL 3 - END SUBROUTINE OPNDIA'
134  WRITE(noutlu,*) ' '
135  ENDIF
136 !
137 END SUBROUTINE opndia
138 !
139 ! ------------------------ END SUBROUTINE OPNDIA ------------------------
140 ! -----------------------------------------------------------------------
141 !
142 !
143 ! -----------------------------------------------------------------------
144 ! -------------------------- SUBROUTINE CLSDIA --------------------------
145 !
146 SUBROUTINE clsdia()
147 !
148  USE modd_glt_param
149  IMPLICIT NONE
150 !
151 !
152 ! .. Welcome message
153 !
154  if (lp1) WRITE(noutlu,*) ' '
155  if (lp1) WRITE(noutlu,*) ' *** LEVEL 3 - SUBROUTINE CLSDIA'
156  if (lp1) WRITE(noutlu,*) ' '
157 !
158 ! ..Close diagnostic files.
159 !
160  IF ( lwg ) THEN
161  SELECT CASE ( trim(cdiafmt) )
162  CASE( 'GELATO' )
163  IF ( ndiap1==1 .OR. ndiap2==1 ) THEN
164  IF ( ninsdia==1 ) CLOSE(n2vilu)
165  IF ( navedia==1 ) CLOSE(n2valu)
166  ENDIF
167  IF ( ndiap3==1 ) CLOSE(n0vilu)
168  CASE( 'VMAR5' )
169  IF ( ndiap1==1 .OR. ndiap2==1 .OR. ndiap3==1 ) THEN
170  IF ( ninsdia==1 ) CLOSE(n2vilu)
171  IF ( navedia==1 ) CLOSE(n2valu)
172  ENDIF
173  IF ( ndiapx==1 ) THEN
174  IF ( ninsdia==1 ) CLOSE(nxvilu)
175  IF ( navedia==1 ) CLOSE(nxvalu)
176  ENDIF
177  END SELECT
178  ENDIF
179 !
180 ! .. Farewell message
181 !
182  if (lp1) WRITE(noutlu,*) ' '
183  if (lp1) WRITE(noutlu,*) ' *** LEVEL 3 - END SUBROUTINE CLSDIA'
184  if (lp1) WRITE(noutlu,*) ' '
185 !
186 END SUBROUTINE clsdia
187 !
188 ! ------------------------ END SUBROUTINE CLSDIA ------------------------
189 ! -----------------------------------------------------------------------
190 END MODULE mode_glt_dia_lu
191 ! ---------------------- END MODULE mode_glt_dia_lu -------------------------
subroutine clsdia()
subroutine opndia()