MED fichier
f/2.3.1v3.0/test2.f
1
C* This file is part of MED.
2
C*
3
C* COPYRIGHT (C) 1999 - 2019 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
33
character*200
des
34
integer
hdfok, medok
35
character*16
nomcoo(2)
36
character*16
unicoo(2)
37
data
nomcoo /
"x"
,
"y"
/, unicoo /
"cm"
,
"cm"
/
38
39
C ** verifie que le fichier test1.med est au bon format **
40
call
mficom
(
'test1.med'
,hdfok,medok,cret)
41
print *,hdfok, medok, cret
42
if
(cret .ne. 0 )
then
43
print *,
'Erreur à la vérification du format'
44
call
efexit(-1)
45
endif
46
47
C ** Ouverture en mode de lecture du fichier test1.med
48
call
mfiope
(fid,
'test1.med'
,med_acc_rdonly, cret)
49
print *,cret
50
if
(cret .ne. 0 )
then
51
print *,
'Erreur ouverture du fichier en lecture'
52
call
efexit(-1)
53
endif
54
55
C ** Lecture de l'en-tete du fichier
56
call
mficor
(fid,des,cret)
57
print *,cret
58
if
(cret .ne. 0 )
then
59
print *,
'Erreur lecture en-tete du fichier'
60
call
efexit(-1)
61
endif
62
print *,
"DESCRIPTEUR DE FICHIER : "
,des
63
64
65
C ** Fermeture du fichier test1.med
66
call
mficlo
(fid,cret)
67
print *,cret
68
if
(cret .ne. 0 )
then
69
print *,
'Erreur fermeture du fichier'
70
call
efexit(-1)
71
endif
72
C
73
end
74
75
76
77
78
test2
program test2
Definition:
test2.f:24
mficor
subroutine mficor(fid, cmt, cret)
Definition:
medfile.f:116
mficom
subroutine mficom(fname, hdfok, medok, cret)
Vérification de la compatibilité d'un fichier avec HDF et MED.
Definition:
medfile.f:170
mfiope
subroutine mfiope(fid, name, access, cret)
Definition:
medfile.f:42
mficlo
subroutine mficlo(fid, cret)
Definition:
medfile.f:82
Généré par
1.8.17