Add gridcond in nc funs