Evolution of magnetization behaviour of cobalt film on nano patterned silicon substrate, with film thickness, has been studied. In situ magneto-optical Kerr effect measurements during film deposition allowed us to study genuine thickness dependence of magnetization behaviour, all other parameters like surface topology, deposition conditions remaining invariant. The film exhibits uniaxial magnetic anisotropy, with its magnitude decreasing with increasing film thickness. Analysis shows that anisotropy has contributions from both, i) exchange energy which is volume dependent and, ii) stray dipolar fields at the surface/interface. This suggests that local magnetization follows only partially the topology of the rippled surface. As expected from energy considerations, for small film thickness, the local magnetization closely follows the surface contour of the ripples making the volume term as the dominant contribution. With increasing film thickness, the local magnetization gradually deviates from the local slope and approaches towards a uniform magnetization along the macroscopic film plane making the surface term as the dominant contribution. Significant deviation from the anisotropy energy expected on the basis of theoretical considerations can be attributed to several factors like, deviation of surface topology from an ideal sinusoidal wave, breaks of continuity along the ripple direction, defects like pattern dislocations, and possible decrease in surface modulation depth with increasing film thickness.