On a generating mechanism for Yanai waves and the 25-day oscillation