construct sem/fem/midpoint mesh for kwf output & preparing netcdf file