MED fichier
tests
unittests
f
Unittest_MEDparameter_2.f
Aller à la documentation de ce fichier.
1
C* This file is part of MED.
2
C*
3
C* COPYRIGHT (C) 1999 - 2021 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 * Tests for parameter module
20
C *
21
C *****************************************************************************
22
program
medparameter2
23
C
24
implicit none
25
include
'med.hf'
26
C
27
C
28
integer
cret
29
integer*8
fid
30
31
character*64
fname
32
parameter(fname =
"Unittest_MEDparameter_1.med"
)
33
character*64
pname1,pname2,pname
34
parameter(pname1=
"first parameter name"
)
35
parameter(pname2=
"second parameter name"
)
36
integer
type1,type2,type
37
parameter(type1=
med_float64
, type2=
med_int
)
38
character*200
desc1,desc2,desc
39
parameter(desc1=
"First parameter description"
)
40
parameter(desc2=
"Second parameter description"
)
41
character*16
dtunit1,dtunit2,dtunit
42
parameter(dtunit1=
"unit1"
)
43
parameter(dtunit2=
"unit2"
)
44
integer
nstep1,nstep2,nstep
45
parameter(nstep1=2,nstep2=2)
46
C
47
C
48
C open file
49
call
mfiope
(fid,fname,med_acc_rdonly,cret)
50
print *,
'Open file'
,cret
51
if
(cret .ne. 0 )
then
52
print *,
'ERROR : open file'
53
call
efexit(-1)
54
endif
55
C
56
C
57
C read information
58
call
mprpin
(fid,pname1,
type
,desc,dtunit,
59
& nstep,cret)
60
print *,
'read information'
,cret
61
if
(cret .ne. 0 )
then
62
print *,
'ERROR : read information'
63
call
efexit(-1)
64
endif
65
c
66
c if ( (type .ne. type1) .or.
67
c & (desc .ne. desc1) .or.
68
c & (dtunit .ne. dtunit1) .or.
69
c & (nstep .ne. nstep1) ) then
70
c print *,'ERROR : read information'
71
c call efexit(-1)
72
c endif
73
C
74
C read information
75
C
76
call
mprpin
(fid,pname2,
type
,desc,dtunit,
77
& nstep,cret)
78
print *,
'read information'
,cret
79
if
(cret .ne. 0 )
then
80
print *,
'ERROR : read information'
81
call
efexit(-1)
82
endif
83
c
84
c if ((type .ne. type2) .or.
85
c & (desc .ne. desc2) .or.
86
c & (dtunit .ne. dtunit2) .or.
87
c & (nstep .ne. nstep2)) then
88
c print *,'ERROR : read information'
89
c call efexit(-1)
90
c endif
91
C
92
C
93
C close file
94
call
mficlo
(fid,cret)
95
print *,
'Close file'
,cret
96
if
(cret .ne. 0 )
then
97
print *,
'ERROR : close file'
98
call
efexit(-1)
99
endif
100
C
101
C
102
C
103
end
mficlo
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition:
medfile.f:82
med_int
int med_int
Definition:
med.h:342
mfiope
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition:
medfile.f:42
medparameter2
program medparameter2
Definition:
Unittest_MEDparameter_2.f:22
med_float64
double med_float64
Definition:
med.h:337
mprpin
subroutine mprpin(fid, name, type, desc, dtunit, nstep, cret)
Cette routine permet la lecture des informations relatives à un paramètre scalaire.
Definition:
medparameter.f:154
Généré le Vendredi 8 Octobre 2021 13:44:06 pour MED fichier par
1.8.16