30 integer nmesh, it, naxis, axis
31 integer coocha, geotra
32 character(64) :: mname =
"2D structured mesh"
33 character(200) :: desc
34 character(16) :: dtunit
35 integer nstep, mdim, sdim, stype, mtype, atype, asize
37 character(16),
dimension(:),
allocatable :: aname
38 character(16),
dimension (:),
allocatable :: aunit
39 real*8,
dimension (:),
allocatable :: cooxaxis
40 real*8,
dimension (:),
allocatable :: cooyaxis
41 character*16,
dimension (:),
allocatable :: cnames
44 call mfiope(fid,
'UsesCase_MEDmesh_4.med',med_acc_rdonly, cret)
45 if (cret .ne. 0 )
then
46 print *,
'ERROR : open file'
54 call mmhnan(fid,mname,naxis,cret)
55 if (cret .ne. 0 )
then
56 print *,
'Read number of axis in the mesh'
59 print *,
'Number of axis in the mesh = ',naxis
62 allocate ( aname(naxis), aunit(naxis) ,stat=cret )
64 print *,
'Memory allocation'
68 call mmhmin(fid, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
69 if (cret .ne. 0 )
then
70 print *,
'Read mesh informations'
73 print *,
"mesh name =", mname
74 print *,
"space dim =", sdim
75 print *,
"mesh dim =", mdim
76 print *,
"mesh type =", mtype
77 print *,
"mesh description =", desc
78 print *,
"dt unit = ", dtunit
79 print *,
"sorting type =", stype
80 print *,
"number of computing step =", nstep
81 print *,
"coordinates axis type =", atype
82 print *,
"coordinates axis name =", aname
83 print *,
"coordinates axis units =", aunit
84 deallocate(aname, aunit)
87 call mmhgtr(fid,mname,gtype,cret)
88 if (cret .ne. 0 )
then
89 print *,
'Read grid type'
92 print *,
"grid type =", gtype
100 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_none,med_coordinate_axis1,med_no_cmode,coocha,geotra,asize,cret)
101 if (cret .ne. 0 )
then
102 print *,
'Read number of coordinates on X axis '
105 print *,
"Number of coordinates on X axis =", asize
108 allocate ( cooxaxis(asize),stat=cret )
110 print *,
'Memory allocation'
114 call mmhgcr(fid,mname,med_no_dt,med_no_it,axis,cooxaxis,cret)
115 if (cret .ne. 0 )
then
116 print *,
'Read axis X coordinates'
119 print *,
"Axis X coordinates =", cooxaxis
124 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_none,med_coordinate_axis2,med_no_cmode,coocha,geotra,asize,cret)
125 if (cret .ne. 0 )
then
126 print *,
'Read number of coordinates on Y axis '
129 print *,
"Number of coordinates on Y axis =", asize
130 ncell = ncell * (asize-1)
132 allocate ( cooyaxis(asize),stat=cret )
134 print *,
'Memory allocation'
138 call mmhgcr(fid,mname,med_no_dt,med_no_it,axis,cooyaxis,cret)
139 if (cret .ne. 0 )
then
140 print *,
'Read axis Y coordinates'
143 print *,
"Axis Y coordinates =", cooyaxis
147 print *,
'ncell :', ncell
148 allocate ( cnames(ncell),stat=cret )
150 print *,
'Memory allocation'
154 call mmhear(fid,mname,med_no_dt,med_no_it,med_cell,med_quad4,cnames,cret)
155 if (cret .ne. 0 )
then
156 print *,
'Read names for elements'
159 print *,
'Cells names =', cnames
164 if (cret .ne. 0 )
then
165 print *,
'ERROR : close file'