31 character*64 fname, pname1, pname2
32 parameter(fname=
"Unittest_MEDprofile_1.med")
33 parameter(pname1=
"Profile name1")
34 parameter(pname2=
"Profile name 2")
36 parameter(psize1=4, psize2=2)
37 integer profile1(4), profile2(2)
38 data profile1 /1,2, 3,4/
48 call mfiope(fid,fname,med_acc_rdonly,cret)
50 if (cret .ne. 0 )
then
51 print *,
'ERROR : open file'
60 if (cret .ne. 0 )
then
61 print *,
'ERROR : number of profile'
65 print *,
'ERROR : number of profile'
73 call mpfpfi(fid,it,pname,psize,cret)
75 if (cret .ne. 0 )
then
76 print *,
'ERROR : name and size of profile'
80 call mpfprr(fid,pname,profile,cret)
82 if (cret .ne. 0 )
then
83 print *,
'ERROR : read profile'
88 if ((pname .ne. pname2) .or.
89 & (psize .ne. psize2))
then
90 print *,
'ERROR : name and size of profile'
93 if ((profile(1) .ne. profile2(1)) .or.
94 & (profile(2) .ne. profile2(2)))
then
95 print *,
'ERROR : profile array'
101 if ((pname .ne. pname1) .or.
102 & (psize .ne. psize1))
then
103 print *,
'ERROR : name and size of profile'
106 if ((profile(1) .ne. profile1(1)) .or.
107 & (profile(2) .ne. profile1(2)) .or.
108 & (profile(3) .ne. profile1(3)) .or.
109 & (profile(4) .ne. profile1(4)) )
then
110 print *,
'ERROR : profile array'
118 call mpfpsn(fid,pname1,psize,cret)
120 if (cret .ne. 0 )
then
121 print *,
'ERROR : size of profile'
125 if (psize .ne. psize1)
then
126 print *,
'ERROR : size of profile'
130 call mpfpsn(fid,pname2,psize,cret)
132 if (cret .ne. 0 )
then
133 print *,
'ERROR : size of profile'
137 if (psize .ne. psize2)
then
138 print *,
'ERROR : size of profile'
146 if (cret .ne. 0 )
then
147 print *,
'ERROR : close file'