31 character(64) :: mname
33 character(64) :: finame
35 integer nstep, nvals, lcmesh, fitype
39 integer,
dimension(MED_N_CELL_FIXED_GEO):: geotps
40 character(16) :: dtunit
42 character(16),
dimension(:),
allocatable :: cpname
44 character(16),
dimension(:),
allocatable :: cpunit
45 real*8,
dimension(:),
allocatable :: values
47 geotps = med_get_cell_geometry_type
50 call mfiope(fid,
'UsesCase_MEDfield_1.med',med_acc_rdonly, cret)
51 if (cret .ne. 0 )
then
52 print *,
'ERROR : opening file'
58 call mfdnfd(fid,nfield,cret)
59 if (cret .ne. 0 )
then
60 print *,
'ERROR : How many fields in the file ...'
63 print *,
'Number of field(s) in the file :', nfield
69 call mfdnfc(fid,i,ncompo,cret)
70 if (cret .ne. 0 )
then
71 print *,
'ERROR : number of field components ...'
74 print *,
'Number of field(s) component(s) in the file :', ncompo
76 allocate(cpname(ncompo),stat=cret )
78 print *,
'Memory allocation'
82 allocate(cpunit(ncompo),stat=cret )
84 print *,
'Memory allocation'
88 call mfdfdi(fid,i,finame,mname,lcmesh,fitype,cpname,cpunit,dtunit,nstep,cret)
89 if (cret .ne. 0 )
then
90 print *,
'ERROR : Reading field infos ...'
93 print *,
'Field name :', finame
94 print *,
'Mesh name :', mname
95 print *,
'Local mesh :', lcmesh
96 print *,
'Field type :', fitype
97 print *,
'Component name :', cpname
98 print *,
'Component unit :', cpunit
99 print *,
'Dtunit :', dtunit
100 print *,
'Nstep :', nstep
101 deallocate(cpname,cpunit)
106 call mfdnva(fid,finame,med_no_dt,med_no_it,med_node,med_none,nvals,cret)
107 if (cret .ne. 0 )
then
108 print *,
'ERROR : Read number of values ...'
111 print *,
'Number of values :', nvals
113 if (nvals .gt. 0)
then
115 allocate(values(nvals),stat=cret )
117 print *,
'Memory allocation'
121 call mfdrvr(fid,finame,med_no_dt, med_no_it, med_node, med_none,&
122 med_full_interlace, med_all_constituent,values,cret)
123 if (cret .ne. 0 )
then
124 print *,
'ERROR : Read fields values defined on vertices ...'
127 print *,
'Fields values defined on vertices :', values
135 do j=1,(med_n_cell_fixed_geo)
139 call mfdnva(fid,finame,med_no_dt,med_no_it,med_cell,geotp,nvals,cret)
140 if (cret .ne. 0 )
then
141 print *,
'ERROR : Read number of values ...'
144 print *,
'Number of values of type :', geotp,
' :', nvals
146 if (nvals .gt. 0)
then
147 allocate(values(nvals),stat=cret )
149 print *,
'Memory allocation'
153 call mfdrvr(fid,finame,med_no_dt,med_no_it,med_cell,geotp,&
154 med_full_interlace, med_all_constituent,values,cret)
155 if (cret .ne. 0 )
then
156 print *,
'ERROR : Read fields values for cells ...'
159 print *,
'Fields values for cells :', values
169 if (cret .ne. 0 )
then
170 print *,
'ERROR : close file'