30 character(64) :: mname
32 character(64) :: finame
34 integer nstep, nvals, lcmesh, fitype
38 integer,
dimension(MED_N_CELL_FIXED_GEO):: geotps
39 character(16) :: dtunit
41 character(16),
dimension(:),
allocatable :: cpname
43 character(16),
dimension(:),
allocatable :: cpunit
44 real*8,
dimension(:),
allocatable :: values
46 geotps = med_get_cell_geometry_type
49 call mfiope(fid,
'UsesCase_MEDfield_1.med',med_acc_rdonly, cret)
50 if (cret .ne. 0 )
then
51 print *,
'ERROR : opening file'
57 call mfdnfd(fid,nfield,cret)
58 if (cret .ne. 0 )
then
59 print *,
'ERROR : How many fields in the file ...'
62 print *,
'Number of field(s) in the file :', nfield
68 call mfdnfc(fid,i,ncompo,cret)
69 if (cret .ne. 0 )
then
70 print *,
'ERROR : number of field components ...'
73 print *,
'Number of field(s) component(s) in the file :', ncompo
75 allocate(cpname(ncompo),stat=cret )
77 print *,
'Memory allocation'
81 allocate(cpunit(ncompo),stat=cret )
83 print *,
'Memory allocation'
87 call mfdfdi(fid,i,finame,mname,lcmesh,fitype,cpname,cpunit,dtunit,nstep,cret)
88 if (cret .ne. 0 )
then
89 print *,
'ERROR : Reading field infos ...'
92 print *,
'Field name :', finame
93 print *,
'Mesh name :', mname
94 print *,
'Local mesh :', lcmesh
95 print *,
'Field type :', fitype
96 print *,
'Component name :', cpname
97 print *,
'Component unit :', cpunit
98 print *,
'Dtunit :', dtunit
99 print *,
'Nstep :', nstep
100 deallocate(cpname,cpunit)
105 call mfdnva(fid,finame,med_no_dt,med_no_it,med_node,med_none,nvals,cret)
106 if (cret .ne. 0 )
then
107 print *,
'ERROR : Read number of values ...'
110 print *,
'Number of values :', nvals
112 if (nvals .gt. 0)
then
114 allocate(values(nvals),stat=cret )
116 print *,
'Memory allocation'
120 call mfdrvr(fid,finame,med_no_dt, med_no_it, med_node, med_none,&
121 med_full_interlace, med_all_constituent,values,cret)
122 if (cret .ne. 0 )
then
123 print *,
'ERROR : Read fields values defined on vertices ...'
126 print *,
'Fields values defined on vertices :', values
134 do j=1,(med_n_cell_fixed_geo)
138 call mfdnva(fid,finame,med_no_dt,med_no_it,med_cell,geotp,nvals,cret)
139 if (cret .ne. 0 )
then
140 print *,
'ERROR : Read number of values ...'
143 print *,
'Number of values of type :', geotp,
' :', nvals
145 if (nvals .gt. 0)
then
146 allocate(values(nvals),stat=cret )
148 print *,
'Memory allocation'
152 call mfdrvr(fid,finame,med_no_dt,med_no_it,med_cell,geotp,&
153 med_full_interlace, med_all_constituent,values,cret)
154 if (cret .ne. 0 )
then
155 print *,
'ERROR : Read fields values for cells ...'
158 print *,
'Fields values for cells :', values
168 if (cret .ne. 0 )
then
169 print *,
'ERROR : close file'
subroutine mfdnfd(fid, n, cret)
Cette fonction permet de lire le nombre de champs dans un fichier.
subroutine mfdrvr(fid, fname, numdt, numit, etype, gtype, swm, cs, val, cret)
Cette fonction permet de lire les valeurs d'un champ définies sur des entités d'un maillage pour une ...
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mfdnfc(fid, ind, n, cret)
Cette fonction lit le nombre de composantes d'un champ.
subroutine mfdnva(fid, fname, numdt, numit, etype, gtype, n, cret)
Cette fonction permet de lire le nombre de valeurs dans un champ pour une séquence de calcul...
subroutine mfdfdi(fid, it, fname, mname, lmesh, type, cname, cunit, dtunit, nc, cret)
Cette fonction permet de lire les informations concernant le champ d'indice ind . ...
program usescase_medfield_3
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.