Unittest_MEDstructElement_11.f
Aller à la documentation de ce fichier.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 program MEDstructElement11
00023
00024 implicit none
00025 include 'med.hf'
00026
00027
00028 integer cret
00029 integer fid
00030 character*64 fname
00031 parameter (fname = "Unittest_MEDstructElement_9.med")
00032 character*64 mname2
00033 parameter (mname2 = "model name 2")
00034 integer mtype2
00035 character*64 aname1, aname2, aname3
00036 parameter (aname1="integer attribute name")
00037 parameter (aname2="real attribute name")
00038 parameter (aname3="string attribute name")
00039 integer atype1,atype2,atype3
00040 parameter (atype1=MED_ATT_INT)
00041 parameter (atype2=MED_ATT_FLOAT64)
00042 parameter (atype3=MED_ATT_NAME)
00043 integer anc1,anc2,anc3
00044 parameter (anc1=2)
00045 parameter (anc2=1)
00046 parameter (anc3=2)
00047
00048 integer atype,anc
00049 character*64 aname
00050 integer it,natt
00051 parameter (natt=3)
00052
00053
00054
00055 call mfiope(fid,fname,MED_ACC_RDONLY,cret)
00056 print *,'Open file',cret
00057 if (cret .ne. 0 ) then
00058 print *,'ERROR : file creation'
00059 call efexit(-1)
00060 endif
00061
00062
00063
00064 do it=1,natt
00065 call msevai(fid,mname2,it,aname,atype,anc,cret)
00066 print *,'Read informations about attribute : ',aname,cret
00067 if (cret .ne. 0) then
00068 print *,'ERROR : attribute information'
00069 call efexit(-1)
00070 endif
00071
00072 if (it .eq. 1) then
00073 if ( (atype .ne. atype1) .or.
00074 & (anc .ne. anc1)
00075 & ) then
00076 print *,'ERROR : attribute information'
00077 call efexit(-1)
00078 endif
00079 endif
00080
00081 if (it .eq. 2) then
00082 if ( (atype .ne. atype2) .or.
00083 & (anc .ne. anc2)
00084 & ) then
00085 print *,'ERROR : attribute information'
00086 call efexit(-1)
00087 endif
00088 endif
00089
00090 if (it .eq. 3) then
00091 if ( (atype .ne. atype3) .or.
00092 & (anc .ne. anc3)
00093 & ) then
00094 print *,'ERROR : attribute information'
00095 call efexit(-1)
00096 endif
00097 endif
00098
00099 enddo
00100
00101
00102
00103 call mficlo(fid,cret)
00104 print *,'Close file',cret
00105 if (cret .ne. 0 ) then
00106 print *,'ERROR : close file'
00107 call efexit(-1)
00108 endif
00109
00110
00111
00112 end
00113