00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025       program test3
00026 
00027       implicit none
00028       include 'med.hf'
00029 
00030 
00031       integer       cret,fid,cres,type,cnu
00032       character*64  maa
00033       character*80  nomu
00034       character*200 desc
00035       integer       nmaa,i,mdim,edim,nstep,stype,atype
00036       character*16 nomcoo(2)
00037       character*16 unicoo(2)
00038       character*16 dtunit
00039       
00040 
00041       call mfiope(fid,'test2.med',MED_ACC_RDONLY, cret)
00042       print *,cret
00043       if (cret .ne. 0 ) then
00044          print *,'Erreur ouverture du fichier en lecture'
00045          call efexit(-1)
00046       endif      
00047 
00048 
00049       call mmhnmh(fid,nmaa,cret)
00050       print *,cret
00051       if (cret .ne. 0 ) then
00052          print *,'Erreur lecture du nombre de maillage'
00053          call efexit(-1)
00054       endif      
00055       print *,'Nombre de maillages = ',nmaa
00056 
00057 
00058 
00059 
00060       do i=1,nmaa  
00061          call mmhmii(fid,i,maa,edim,mdim,type,desc,
00062      &               dtunit,stype,nstep,atype,
00063      &               nomcoo,unicoo,cret)
00064          call mmhunr(fid,maa,nomu,cnu)
00065          print *,cret
00066          if (cret .ne. 0 ) then
00067             print *,'Erreur acces au maillage'
00068             call efexit(-1)
00069          endif      
00070          print '(A,I1,A,A4,A,I1,A,A65,A65)','maillage '
00071      &        ,i,' de nom ',maa,' et de dimension ',mdim,
00072      &        ' de description ',desc
00073          if (type.eq.MED_UNSTRUCTURED_MESH) then
00074             print *,'Maillage non structure'
00075          else
00076             print *,'Maillage structure'
00077          endif
00078          print *,'Dimension espace ', edim
00079          print *,'Dimension espace ', mdim
00080          if (cnu.eq.0) then
00081             print *,'Nom universel : ',nomu
00082          else
00083             print *,'Pas de nom universel'
00084          endif
00085          print *,'dt unit = ', dtunit
00086          print *,'sorting type =', stype
00087          print *,'number of computing step =', nstep
00088          print *,'coordinates axis type =', atype
00089          print *,'coordinates axis name =', nomcoo
00090          print *,'coordinates axis units =', unicoo
00091       enddo         
00092          
00093 
00094       call mficlo(fid,cret)
00095       print *,cret
00096       if (cret .ne. 0 ) then
00097          print *,'Erreur fermeture du fichier'
00098          call efexit(-1)
00099       endif      
00100 
00101       end 
00102