00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 program UsesCase_MEDmesh_3
00024
00025 implicit none
00026 include 'med.hf'
00027
00028 integer cret
00029 integer fid, nmesh, it, naxis
00030 character(64) :: mname
00031 character(200) :: desc
00032 character(16) :: dtunit
00033 integer nstep, mdim, sdim, stype, mtype, atype
00034 character(16), dimension(:), allocatable :: aname
00035 character(16), dimension (:), allocatable :: aunit
00036
00037
00038 call mfiope(fid,'UsesCase_MEDmesh_1.med',MED_ACC_RDONLY, cret)
00039 print *,cret
00040 print *,fid
00041 if (cret .ne. 0 ) then
00042 print *,'ERROR : open file'
00043 call efexit(-1)
00044 endif
00045
00046
00047 call mmhnmh(fid,nmesh,cret)
00048 print *,cret
00049 if (cret .ne. 0 ) then
00050 print *,'Read how many mesh'
00051 call efexit(-1)
00052 endif
00053 print *,'Number of mesh = ',nmesh
00054
00055 do it=1,nmesh
00056
00057 print *,'mesh iterator =',it
00058
00059
00060 call mmhnax(fid,it,naxis,cret)
00061 print *,cret
00062 if (cret .ne. 0 ) then
00063 print *,'Read number of axis in the mesh'
00064 call efexit(-1)
00065 endif
00066 print *,'Number of axis in the mesh = ',naxis
00067
00068 allocate ( aname(naxis), aunit(naxis) ,STAT=cret )
00069 if (cret > 0) then
00070 print *,'Memory allocation'
00071 call efexit(-1)
00072 endif
00073
00074 call mmhmii(fid, it, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
00075 print *,cret
00076 if (cret .ne. 0 ) then
00077 print *,'Read mesh informations'
00078 call efexit(-1)
00079 endif
00080 print *,"mesh name =", mname
00081 print *,"space dim =", sdim
00082 print *,"mesh dim =", mdim
00083 print *,"mesh type =", mtype
00084 print *,"mesh description =", desc
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 =", aname
00090 print *,"coordinates axis units =", aunit
00091 deallocate(aname, aunit)
00092
00093 enddo
00094
00095
00096
00097 call mficlo(fid,cret)
00098 print *,cret
00099 if (cret .ne. 0 ) then
00100 print *,'ERROR : close file'
00101 call efexit(-1)
00102 endif
00103
00104 end program UsesCase_MEDmesh_3
00105
00106