subroutine histogram_reset(h) type(histogram) :: h h%range=0.d0 h%bin=0.d0 end subroutine histogram_reset