00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 program UsesCase_MEDmesh_5
00023
00024 implicit none
00025 include 'med.hf'
00026
00027 integer cret
00028 integer fid, nmesh, it, naxis
00029 character(64) :: mname = "2D unstructured mesh"
00030 character(200) :: desc
00031 character(16) :: dtunit
00032 integer nstep, mdim, sdim, stype, mtype, atype
00033 character(16), dimension(:), allocatable :: aname
00034 character(16), dimension (:), allocatable :: aunit
00035 integer gtype
00036
00037
00038 call mfiope(fid,'UsesCase_MEDmesh_4.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
00048
00049
00050 call mmhnan(fid,mname,naxis,cret)
00051 print *,cret
00052 if (cret .ne. 0 ) then
00053 print *,'Read number of axis in the mesh'
00054 call efexit(-1)
00055 endif
00056 print *,'Number of axis in the mesh = ',naxis
00057
00058 allocate ( aname(naxis), aunit(naxis) ,STAT=cret )
00059 if (cret > 0) then
00060 print *,'Memory allocation'
00061 call efexit(-1)
00062 endif
00063
00064 call mmhmin(fid, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
00065 print *,cret
00066 if (cret .ne. 0 ) then
00067 print *,'Read mesh informations'
00068 call efexit(-1)
00069 endif
00070 print *,"mesh name =", mname
00071 print *,"space dim =", sdim
00072 print *,"mesh dim =", mdim
00073 print *,"mesh type =", mtype
00074 print *,"mesh description =", desc
00075 print *,"dt unit = ", dtunit
00076 print *,"sorting type =", stype
00077 print *,"number of computing step =", nstep
00078 print *,"coordinates axis type =", atype
00079 print *,"coordinates axis name =", aname
00080 print *,"coordinates axis units =", aunit
00081 deallocate(aname, aunit)
00082
00083
00084 call mmhgtr(fid,mname,gtype,cret)
00085 print *,cret
00086 if (cret .ne. 0 ) then
00087 print *,'Read grid type'
00088 call efexit(-1)
00089 endif
00090 print *,"grid type =", gtype
00091
00092
00093 call mficlo(fid,cret)
00094 print *,cret
00095 if (cret .ne. 0 ) then
00096 print *,'ERROR : close file'
00097 call efexit(-1)
00098 endif
00099
00100 end program UsesCase_MEDmesh_5
00101
00102