MED fichier
Documentation MED
Guides d'utilisation
Guides de référence
f/2.3.6/test18.f
1
C* This file is part of MED.
2
C*
3
C* COPYRIGHT (C) 1999 - 2017 EDF R&D, CEA/DEN
4
C* MED is free software: you can redistribute it and/or modify
5
C* it under the terms of the GNU Lesser General Public License as published by
6
C* the Free Software Foundation, either version 3 of the License, or
7
C* (at your option) any later version.
8
C*
9
C* MED is distributed in the hope that it will be useful,
10
C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
C* GNU Lesser General Public License for more details.
13
C*
14
C* You should have received a copy of the GNU Lesser General Public License
15
C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16
C*
17
18
19
C ******************************************************************************
20
C * - Nom du fichier : test18.f
21
C *
22
C * - Description : routines de test de la conformite d'une fichier MED.
23
C *
24
C ******************************************************************************
25
program
test18
26
C
27
implicit none
28
include
'med.hf'
29
C
30
C
31
integer
fid
32
integer
cret
33
integer
maj,min,rel
34
35
C ** Creation du fichier test18.med
36
call
efouvr(fid,
'test18.med'
,med_lecture_ecriture, cret)
37
print *,cret
38
if
(cret .ne. 0 )
then
39
print *,
'Erreur creation du fichier'
40
call
efexit(-1)
41
endif
42
print *,
'- Creation du fichier'
43
44
C ** Fermeture du fichier
45
call
efferm (fid,cret)
46
print *,cret
47
if
(cret .ne. 0 )
then
48
print *,
'Erreur fermeture du fichier'
49
call
efexit(-1)
50
endif
51
print *,
'- Fermeture du fichier'
52
53
C ** Quelle version de la bibliotheque est utilisee ? **
54
call
efvedo(maj,min,rel,cret)
55
print *,cret
56
if
(cret .ne. 0 )
then
57
print *,
'Erreur lecture version med'
58
call
efexit(-1)
59
endif
60
print *,
'- Version MED utilisee : '
,maj,
'.'
,min,
'.'
,rel
61
62
C ** Conformite du format HDF **
63
call
effoco(
'test18.med'
,cret)
64
print *,cret
65
if
(cret .eq. 0)
then
66
print *,
'- Format HDF conforme'
67
else
68
print *,
'- Format HDF non conforme'
69
call
efexit(-1)
70
endif
71
72
C ** Conformite de la bibliotheque MED
73
call
efveco(
'test18.med'
,cret)
74
print *,cret
75
if
(cret .eq. 0)
then
76
print *,
'- Version MED du fichier conforme'
77
else
78
print *,
'- Version MED du fichier non conforme'
79
call
efexit(-1)
80
endif
81
82
C ** Ouverture du fichier test18.med en lecture seule
83
call
efouvr(fid,
'test18.med'
,med_lecture, cret)
84
if
(cret .ne. 0 )
then
85
print *,
'Erreur ouverture du fichier'
86
call
efexit(-1)
87
endif
88
print *,
'- Ouverture du fichier'
89
90
C ** Lecture de la version de MED utilisee pour creer le fichier ? **
91
call
efveli(fid,maj,min,rel,cret)
92
if
(cret .ne. 0 )
then
93
print *,
'Erreur lecture version med du fichier'
94
call
efexit(-1)
95
endif
96
print *,cret
97
print *,
'- Fichier cree avec MED V'
,maj,
'.'
,min,
'.'
,rel
98
99
C ** Fermeture du fichier
100
call
efferm (fid,cret)
101
print *,cret
102
if
(cret .ne. 0 )
then
103
print *,
'Erreur fermeture du fichier'
104
call
efexit(-1)
105
endif
106
print *,
'- Fermeture du fichier'
107
C
108
end
109
110
Généré le Mardi 31 Octobre 2017 17:15:26 pour MED fichier par
1.8.9.1