30 character(64) :: mname
32 character(64) :: finame =
'TEMPERATURE_FIELD' 34 integer nstep, nvals, lcmesh, fitype
38 integer,
dimension(MED_N_CELL_FIXED_GEO) :: geotps
40 integer mnumdt, mnumit
41 integer csit, numit, numdt, it
43 character(16) :: dtunit
45 character(16) :: cpname
47 character(16) :: cpunit
48 real*8,
dimension(:),
allocatable :: values
50 geotps = med_get_cell_geometry_type
53 call mfiope(fid,
'UsesCase_MEDfield_4.med',med_acc_rdonly, cret)
54 if (cret .ne. 0 )
then 55 print *,
'ERROR : open file' 63 call mfdfin(fid,finame,mname,lcmesh,fitype,cpname,cpunit,dtunit,nstep,cret)
64 if (cret .ne. 0 )
then 65 print *,
'ERROR : Field info by name ...' 68 print *,
'Mesh name :', mname
69 print *,
'Local mesh :', lcmesh
70 print *,
'Field type :', fitype
71 print *,
'Component name :', cpname
72 print *,
'Component unit :', cpunit
73 print *,
'Dtunit :', dtunit
74 print *,
'Nstep :', nstep
78 call mfdcmi(fid,finame,csit,numdt,numit,dt,mnumdt,mnumit,cret)
79 if (cret .ne. 0 )
then 80 print *,
'ERROR : Computing step info ...' 83 print *,
'csit :', csit
84 print *,
'numdt :', numdt
85 print *,
'numit :', numit
87 print *,
'mnumdt :', mnumdt
88 print *,
'mnumit :', mnumit
92 do it=1,(med_n_cell_fixed_geo)
96 call mfdnva(fid,finame,numdt,numit,med_cell,geotp,nvals,cret)
97 if (cret .ne. 0 )
then 98 print *,
'ERROR : Read number of values ...' 101 print *,
'Number of values of type :', geotp,
' :', nvals
103 if (nvals .gt. 0)
then 104 allocate(values(nvals),stat=cret )
106 print *,
'Memory allocation' 110 call mfdrvr(fid,finame,numdt,numit,med_cell,geotp,&
111 med_full_interlace, med_all_constituent,values,cret)
112 if (cret .ne. 0 )
then 113 print *,
'ERROR : Read fields values for cells ...' 116 print *,
'Fields values for cells :', values
126 if (cret .ne. 0 )
then 127 print *,
'ERROR : close file' subroutine mficlo(fid, cret)
subroutine mfdnva(fid, fname, numdt, numit, etype, gtype, n, cret)
subroutine mfdfin(fid, fname, mname, lmesh, type, cname, cunit, dtunit, nc, cret)
program usescase_medfield_5
subroutine mfdrvr(fid, fname, numdt, numit, etype, gtype, swm, cs, val, cret)
subroutine mfiope(fid, name, access, cret)
subroutine mfdcmi(fid, fname, it, numdt, numit, dt, mnumdt, mnumit, cret)