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 UsesCase_MEDmesh_2
00025
00026 implicit none
00027 include 'med.hf'
00028
00029 integer cret
00030 integer fid, nmesh, it, naxis, totu
00031 character(64) :: mname = "2D unstructured mesh"
00032 character(200) :: desc
00033 character(16) :: dtunit
00034 integer nstep, mdim, sdim, stype, mtype, atype
00035 character(16), dimension(:), allocatable :: aname
00036 character(16), dimension (:), allocatable :: aunit
00037
00038
00039 call mfiope(fid,'UsesCase_MEDmesh_1.med',MED_ACC_RDONLY, cret)
00040 print *,cret
00041 print *,fid
00042 if (cret .ne. 0 ) then
00043 print *,'ERROR : open file'
00044 call efexit(-1)
00045 endif
00046
00047
00048
00049
00050
00051 call mmhnan(fid,mname,naxis,cret)
00052 print *,cret
00053 if (cret .ne. 0 ) then
00054 print *,'Read number of axis in the mesh'
00055 call efexit(-1)
00056 endif
00057 print *,'Number of axis in the mesh = ',naxis
00058
00059 allocate ( aname(naxis), aunit(naxis) ,STAT=cret )
00060 if (cret > 0) then
00061 print *,'Memory allocation'
00062 call efexit(-1)
00063 endif
00064
00065 call mmhmin(fid, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
00066 print *,cret
00067 if (cret .ne. 0 ) then
00068 print *,'Read mesh informations'
00069 call efexit(-1)
00070 endif
00071 print *,"mesh name =", mname
00072 print *,"space dim =", sdim
00073 print *,"mesh dim =", mdim
00074 print *,"mesh type =", mtype
00075 print *,"mesh description =", desc
00076 print *,"dt unit = ", dtunit
00077 print *,"sorting type =", stype
00078 print *,"number of computing step =", nstep
00079 print *,"coordinates axis type =", atype
00080 print *,"coordinates axis name =", aname
00081 print *,"coordinates axis units =", aunit
00082 deallocate(aname, aunit)
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 call mficlo(fid,cret)
00122 print *,cret
00123 if (cret .ne. 0 ) then
00124 print *,'ERROR : close file'
00125 call efexit(-1)
00126 endif
00127
00128 end program UsesCase_MEDmesh_2
00129
00130