NW_prepare function

Prepare data for SFHNV trees and forests