Machine learning of hidden variables in multiscale fluid simulation