program sg_datum

  use wei_datum_standard_mod

  complex, allocatable :: wfld(:,:,:,:,:)
  type(wfile)   :: ifile,data
  type(wspace),pointer   :: space
  integer        :: nth

  allocate(space)
  call sep_init()
  call datum_init(space,ifile,data)

  call wei_nth(space%nth)

!!write(0,*)'number of threads=',space%nth
write(0,*)'space%npad(1)=',space%npad(1)
write(0,*)'space%npad(2)=',space%npad(2)
write(0,*)'space%npad(3)=',space%npad(3)
write(0,*)'space%npad(4)=',space%npad(4)
write(0,*)'space%nth=',space%nth

  allocate(wfld(space%npad(1),space%npad(2),space%npad(3),&
    space%npad(4),space%nth))

  call datum_of(space,ifile,data,wfld)

  call sep_end_prog()
  
end program

