Aller à la documentation de ce fichier.
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'
program usescase_medfield_6
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mfdnfd(fid, n, cret)
Cette fonction permet de lire le nombre de champs dans un fichier.
subroutine mfdcmi(fid, fname, it, numdt, numit, dt, mnumdt, mnumit, cret)
Cette fonction permet de lire les informations caractérisant une étape de calcul : numéro de pas de t...
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
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 .
subroutine mfdnva(fid, fname, numdt, numit, etype, gtype, n, cret)
Cette fonction permet de lire le nombre de valeurs dans un champ pour une étape de calcul,...
subroutine mfdnfc(fid, ind, n, cret)
Cette fonction lit le nombre de composantes d'un champ.
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 ...