Commits

Gautam Bisht committed 8b51d0f

Added 'time' in XDMF output format

Comments (0)

Files changed (3)

src/pflotran/output_common.F90

 !!
 !! date: 10/29/12
 ! ************************************************************************** !
-subroutine OutputXMFHeader(fid,nmax,xmf_vert_len,ngvert,filename)
+subroutine OutputXMFHeader(fid,time,nmax,xmf_vert_len,ngvert,filename)
 
   implicit none
 
   PetscInt :: fid, vert_count
+  PetscReal :: time
   PetscInt :: nmax,xmf_vert_len,ngvert
   character(len=MAXSTRINGLENGTH) :: filename
 
   string="    <Grid Name=""Mesh"">"
   write(fid,'(a)') trim(string)
 
+  write(string2,'(es13.5)') time
+  string="      <Time Value = """ // trim(adjustl(string2)) // """ />"
+  write(fid,'(a)') trim(string)
+
   write(string2,*) nmax
   string="      <Topology Type=""Mixed"" NumberOfElements=""" // &
     trim(adjustl(string2)) // """ >"

src/pflotran/output_hdf5.F90

     open(unit=OUTPUT_UNIT,file=xmf_filename,action="write")
     !call OutputXMFHeader(OUTPUT_UNIT,realization_base,filename)
     call OutputXMFHeader(OUTPUT_UNIT, &
+                         option%time/output_option%tconv, &
                          grid%nmax, &
                          realization_base%output_option%xmf_vert_len, &
                          grid%unstructured_grid%num_vertices_global,filename)

src/pflotran/output_surface.F90

     call printMsg(option)
     open(unit=OUTPUT_UNIT,file=xmf_filename,action="write")
     call OutputXMFHeader(OUTPUT_UNIT, &
+                         option%time/output_option%tconv, &
                          surf_grid%nmax, &
                          surf_realization%output_option%surf_xmf_vert_len, &
                          subsurf_grid%unstructured_grid%num_vertices_global,filename)