32 character(64) :: mname
34 character(64) :: finame
36 integer nstep, nvals, lcmesh, fitype
40 integer,
dimension(MED_N_CELL_FIXED_GEO) :: geotps
42 integer mnumdt, mnumit
43 integer csit, numit, numdt, it
45 character(16) :: dtunit
47 character(16),
dimension(:),
allocatable :: cpname
49 character(16),
dimension(:),
allocatable :: cpunit
50 real*8,
dimension(:),
allocatable :: values
52 geotps = med_get_cell_geometry_type
55 call mfiope(fid,
'UsesCase_MEDfield_4.med',med_acc_rdonly, cret)
56 if (cret .ne. 0 )
then
57 print *,
'ERROR : open file'
63 call mfdnfd(fid,nfield,cret)
64 if (cret .ne. 0 )
then
65 print *,
'ERROR : How many fields in the file ...'
68 print *,
'Number of field(s) in the file :', nfield
72 call mfdnfc(fid,i,ncompo,cret)
73 if (cret .ne. 0 )
then
74 print *,
'ERROR : number of field components ...'
77 print *,
'Field number :', nfield
78 print *,
'Number of field(s) component(s) in the file :', ncompo
80 allocate(cpname(ncompo),stat=cret )
82 print *,
'Memory allocation'
86 allocate(cpunit(ncompo),stat=cret )
88 print *,
'Memory allocation'
92 call mfdfdi(fid,i,finame,mname,lcmesh,fitype,cpname,cpunit,dtunit,nstep,cret)
93 if (cret .ne. 0 )
then
94 print *,
'ERROR : Reading field infos ...'
97 print *,
'Field name :', finame
98 print *,
'Mesh name :', mname
99 print *,
'Local mesh :', lcmesh
100 print *,
'Field type :', fitype
101 print *,
'Component name :', cpname
102 print *,
'Component unit :', cpunit
103 print *,
'Dtunit :', dtunit
104 print *,
'Nstep :', nstep
105 deallocate(cpname,cpunit)
109 call mfdcmi(fid,finame,csit,numdt,numit,dt,mnumdt,mnumit,cret)
110 if (cret .ne. 0 )
then
111 print *,
'ERROR : Computing step info ...'
114 print *,
'Computing step :',csit
115 print *,
'Numdt :', numdt
116 print *,
'Numit :', numit
118 print *,
'mnumdt :', mnumdt
119 print *,
'mnumit :', mnumit
122 do it=1,(med_n_cell_fixed_geo)
126 call mfdnva(fid,finame,numdt,numit,med_cell,geotp,nvals,cret)
127 if (cret .ne. 0 )
then
128 print *,
'ERROR : Read number of values ...'
131 print *,
'Number of values of type :', geotp,
' :', nvals
133 if (nvals .gt. 0)
then
134 allocate(values(nvals),stat=cret )
136 print *,
'Memory allocation'
140 call mfdrvr(fid,finame,numdt,numit,med_cell,geotp,&
141 med_full_interlace, med_all_constituent,values,cret)
142 if (cret .ne. 0 )
then
143 print *,
'ERROR : Read fields values for cells ...'
146 print *,
'Fields values for cells :', values
156 if (cret .ne. 0 )
then
157 print *,
'ERROR : close file'