1. A method for operating an engine compartment fan for an engine compartment of a motor vehicle, in which at least one component is situated, the method comprising: ascertaining a present engine compartment temperature as a function of a thermal energy input into the engine compartment and a thermal energy discharge out of the engine compartment; and activating the engine compartment fan as a function of the ascertained present engine compartment temperature.