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
00037
00038
00039
00040
00041
00042 character*16 nomcoo(3)
00043 character*16 unicoo(3)
00044 character*16 dtunit
00045
00046
00047 call mfiope(fid,'test2.med',MED_ACC_RDONLY, cret)
00048 print *,cret
00049 if (cret .ne. 0 ) then
00050 print *,'Erreur ouverture du fichier en lecture'
00051 call efexit(-1)
00052 endif
00053
00054
00055 call mmhnmh(fid,nmaa,cret)
00056 print *,cret
00057 if (cret .ne. 0 ) then
00058 print *,'Erreur lecture du nombre de maillage'
00059 call efexit(-1)
00060 endif
00061 print *,'Nombre de maillages = ',nmaa
00062
00063
00064
00065
00066 do i=1,nmaa
00067 call mmhmii(fid,i,maa,edim,mdim,type,desc,
00068 & dtunit,stype,nstep,atype,
00069 & nomcoo,unicoo,cret)
00070 call mmhunr(fid,maa,nomu,cnu)
00071 print *,cret
00072 if (cret .ne. 0 ) then
00073 print *,'Erreur acces au maillage'
00074 call efexit(-1)
00075 endif
00076 print '(A,I1,A,A4,A,I1,A,A65,A65)','maillage '
00077 & ,i,' de nom ',maa,' et de dimension ',mdim,
00078 & ' de description ',desc
00079 if (type.eq.MED_UNSTRUCTURED_MESH) then
00080 print *,'Maillage non structure'
00081 else
00082 print *,'Maillage structure'
00083 endif
00084 print *,'Dimension espace ', edim
00085 print *,'Dimension maillage ', mdim
00086 if (cnu.eq.0) then
00087 print *,'Nom universel : ',nomu
00088 else
00089 print *,'Pas de nom universel'
00090 endif
00091 print *,'dt unit = ', dtunit
00092 print *,'sorting type =', stype
00093 print *,'number of computing step =', nstep
00094 print *,'coordinates axis type =', atype
00095 print *,'coordinates axis name =', nomcoo(1:2)
00096 print *,'coordinates axis units =', unicoo(1:2)
00097 enddo
00098
00099
00100 call mficlo(fid,cret)
00101 print *,cret
00102 if (cret .ne. 0 ) then
00103 print *,'Erreur fermeture du fichier'
00104 call efexit(-1)
00105 endif
00106
00107 end
00108