Should I convert my quad mesh to triangles? If so, can I do it in this script?
Is there a magic way to convert to triangles with a simple python method?


Yes, there is a method.

Based on @gandolf3's suggestion in chat I've tested bpy.ops.mesh.quads_convert_to_tris() and indeed it shows an improvement.

Subdivisioning the quad mesh first can be explored as well, either everywhere, or in some optimized way because the final topographic map is pretty big.

# from https://blender.stackexchange.com/a/35437/5334
bpy.ops.object.select_all(action='DESELECT')
ob.select = True
bpy.context.scene.objects.active = ob

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.quads_convert_to_tris(quad_method='BEAUTY', ngon_method='BEAUTY')  # Convert to Triangles
bpy.ops.object.mode_set(mode='OBJECT')

bpy.ops.object.shade_smooth()




Initial quads, final triangles