module wei_report_mod
  use wei_global_defi_mod
  
  implicit none

contains

  subroutine wei_grids_report(ish, nsh)
    integer  :: ish, nsh
    write(0,*) "--------------------------------------------------"
    write(0,*) "                Working Parameters                "
    write(0,*) "--------------------------------------------------"
    write(0,*) "         Shot Number:",ish, "out of",nsh
    write(0,*) "         shot location, sx=", dgrid%sx, "sy=", dgrid%sy
    write(0,*) "-------------------------------------------------"
    write(0,*) "         receiver, gxmin=", pgrid%gxmin
    write(0,*) "         receiver, gxmax=", pgrid%gxmax
    write(0,*) "         receiver, dgx  =", dgrid%agx%d
    write(0,*) "         receiver, gymin=", pgrid%gymin
    write(0,*) "         receiver, gymax=", pgrid%gymax
    write(0,*) "         receiver, dgy  =", dgrid%agy%d
    write(0,*) "         receiver, freq =", dgrid%aw%n
    write(0,*) "-------------------------------------------------"
    write(0,*) "       propagation grid, xmin=", pgrid%ax%o
    write(0,*) "       propagation grid, xmax=", pgrid%ax%o + (pgrid%ax%n-1)*pgrid%ax%d
    write(0,*) "       propagation grid, dx  =", pgrid%ax%d
    write(0,*) "       propagation grid, ymin=", pgrid%ay%o
    write(0,*) "       propagation grid, ymax=", pgrid%ay%o + (pgrid%ay%n-1)*pgrid%ay%d
    write(0,*) "       propagation grid, dy  =", pgrid%ay%d
    write(0,*) "-------------------------------------------------"
    write(0,*) "         image grid, xmin=", igrid%image_xmin
    write(0,*) "         image grid, xmax=", igrid%image_xmax
    write(0,*) "         image grid, dx  =", igrid%ax%d
    write(0,*) "         image grid, ymin=", igrid%image_ymin
    write(0,*) "         image grid, ymax=", igrid%image_ymax
    write(0,*) "         image grid, dy  =", igrid%ay%d
    write(0,*) "-------------------------------------------------"
    write(0,*) "    output image grid, xmin=", ogrid%ax%o
    write(0,*) "    output image grid, xmax=", ogrid%ax%o + (ogrid%ax%n-1)*ogrid%ax%d
    write(0,*) "    output image grid, dx  =", ogrid%ax%d
    write(0,*) "    output image grid, ymin=", ogrid%ay%o
    write(0,*) "    output image grid, ymax=", ogrid%ay%o + (ogrid%ay%n-1)*ogrid%ay%d
    write(0,*) "    output image grid, dy  =", ogrid%ay%d
    write(0,*) "-------------------------------------------------"
    write(0,*) "    velocity grid, xmin=", vgrid%ax%o
    write(0,*) "    velocity grid, xmax=", vgrid%ax%o + (vgrid%ax%n-1)*vgrid%ax%d
    write(0,*) "    velocity grid, dx  =", vgrid%ax%d
    write(0,*) "    velocity grid, ymin=", vgrid%ay%o
    write(0,*) "    velocity grid, ymax=", vgrid%ay%o + (vgrid%ay%n-1)*vgrid%ay%d
    write(0,*) "    velocity grid, dy  =", vgrid%ay%d
  end subroutine

  subroutine wei_memory_report()
    write(0,*) "-------------------------------------------------"
    write(0,*) "         Memory allocated:", memory/1024/1024,"Mb "
    write(0,*) "-------------------------------------------------"
  end subroutine
end module
