Machine Learning for Nonorographic Gravity Waves in a Climate Model