MED fichier
f/2.3v3.0/test2.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
C ******************************************************************************
19
C * - Nom du fichier : test2.f
20
C *
21
C * - Description : exemples de creations de maillage MED
22
C *
23
C ******************************************************************************
24
program
test2
25
C
26
implicit none
27
include
'med.hf'
28
C
29
C
30
integer
cret,ret
31
integer*8
fid
32
character*200
des
33
integer
hdfok, medok
34
character*16
nomcoo(2)
35
character*16
unicoo(2)
36
data
nomcoo /
"x"
,
"y"
/, unicoo /
"cm"
,
"cm"
/
37
38
C ** verifie que le fichier test1.med est au bon format **
39
call
mficom
(
'test1.med'
,hdfok,medok,cret)
40
print *,hdfok, medok, cret
41
if
(cret .ne. 0 )
then
42
print *,
'Erreur à la vérification du format'
43
call
efexit(-1)
44
endif
45
46
C ** Ouverture en mode de lecture du fichier test1.med
47
call
mfiope
(fid,
'test1.med'
,med_acc_rdonly, cret)
48
print *,cret
49
if
(cret .ne. 0 )
then
50
print *,
'Erreur ouverture du fichier en lecture'
51
call
efexit(-1)
52
endif
53
54
C ** Lecture de l'en-tete du fichier
55
call
mficor
(fid,des,cret)
56
print *,cret
57
if
(cret .ne. 0 )
then
58
print *,
'Erreur lecture en-tete du fichier'
59
call
efexit(-1)
60
endif
61
print *,
"DESCRIPTEUR DE FICHIER : "
,des
62
63
64
C ** Fermeture du fichier test1.med
65
call
mficlo
(fid,cret)
66
print *,cret
67
if
(cret .ne. 0 )
then
68
print *,
'Erreur fermeture du fichier'
69
call
efexit(-1)
70
endif
71
C
72
end
73
74
75
76
77
Généré par
1.8.13