Redo reformat to remove header and avoid DOS chars awk -f reformat.awk petrel_grid.dat > points.dat Check the data file awk -f check.awk petrel_grid.dat Results: Total: 117450 Min Value = 9.000000 Max Value = 9.000000 Read points.dat into avs and gmv format files View points and check outx3dgen for reasonable values. lagrit < points.lgi cp outx3dgen points.out Results: ATTRIBUTE MIN MAX DIFFERENCE LENGTH xic 4.201000000E+05 4.299000000E+05 9.800000000E+03 117450 yic 4.307100000E+06 4.316900000E+06 9.800000000E+03 117450 zic -2.208199951E+03 1.081999969E+02 2.316399948E+03 117450 xval 1.000000000E+00 9.000000000E+00 8.000000000E+00 117450 nlayer 1 47 46 117450 Subset the points to area of interest. View to makes sure flat top and bottom are reasonable Check that imat and xval (material) values are reasonable Flat top and flat bottom are max mat +1 and +2 lagrit < subset.lgi cp outx3dgen subset.lgi lagrit < connect.lgi cp outx3dgen connect.out cp logx3dgen connect.log lagrit < write_fehm.lgi cp outx3dgen write_fehm.out cp logx3dgen write_fehm.log