moved grid-setting functions from lc_funcs.c to lc_setup.c