00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 program test9
00025
00026 implicit none
00027 include 'med.hf90'
00028
00029 integer ret,cret,fid
00030 character*64 maa
00031 integer mdim,sdim
00032 integer nfam
00033 integer i,j
00034 integer ngro,natt
00035 character*80, allocatable, dimension (:) :: gro
00036 integer, allocatable, dimension (:) :: attid
00037 integer, allocatable, dimension (:) :: attval
00038 character*200, allocatable, dimension (:) :: attdes
00039 character*200 desc
00040 character*64 nomfam
00041 integer numfam
00042 integer type
00043 character(16) :: dtunit
00044 integer nstep, stype, atype
00045 character*16 nomcoo(2)
00046 character*16 unicoo(2)
00047
00048
00049
00050 call mfiope(fid,'test8.med',MED_ACC_RDONLY, cret)
00051 print *,cret
00052
00053
00054 if (cret.eq.0) then
00055 call mmhmii(fid,1,maa,sdim,mdim,type,desc,dtunit,stype,nstep,atype,nomcoo,unicoo,cret)
00056 print *,"Maillage de nom : ",maa," et de dimension : ", mdim
00057 endif
00058 print *,cret
00059
00060
00061 if (cret .eq. 0) then
00062 call mfanfa(fid,maa,nfam,cret)
00063 print *,' Nombre de familles a lire : ',nfam
00064 endif
00065 print *,cret
00066
00067
00068 if (cret .eq. 0) then
00069 do i=1,nfam
00070
00071
00072 if (cret .eq. 0) then
00073 call mfanfg(fid,maa,i,ngro,cret)
00074 endif
00075 print *,cret
00076
00077
00078
00079 if (cret .eq. 0) then
00080 call mfaona(fid,maa,i,natt,cret)
00081 endif
00082 print *,cret
00083
00084 print *,"Famille ",i," a ",ngro," groupes et ", natt, " attributs"
00085
00086
00087 if (cret .eq. 0) then
00088 allocate(gro(ngro), attid(natt), attval(natt), attdes(natt),STAT=ret)
00089 print *,ret
00090
00091 call mfaofi(fid,maa,i,nomfam,attid,attval,attdes,numfam,gro,cret)
00092 print *,cret
00093 print *,"Famille de nom ",nomfam," et de numero ",numfam
00094 do j=1,natt
00095 print *,"attid = ", attid(j)
00096 print *,"attval = ", attval(j)
00097 print *,"attdes =", attdes(j)
00098 enddo
00099 do j=1,ngro
00100 print *,"gro = ",gro(j)
00101 enddo
00102
00103 deallocate(gro, attval, attid, attdes)
00104 endif
00105 enddo
00106 endif
00107
00108
00109
00110 call mficlo(fid,cret)
00111 print *,cret
00112
00113
00114 call efexit(cret)
00115
00116 end program test9
00117
00118