Development of a numerical tool for random field discretization