FIG. 9 depicts a flowchart of an example of a cooling method according to some embodiments. For example, FIG. 9 illustrates a specific application of the cooling method of FIG. 8. In step 902, a sensor system (e.g., sensor system 180) housed in an enclosure (e.g., enclosure 200, 300, 400, 500) determines a speed of a vehicle, an internal temperature of an enclosure, an external temperature, and a wind speed. The sensor system provides the determined inputs to a controller (e.g., controller 196, 252, 352, 452, 552). In step 904, the controller selects between an inactive mode and an active mode for a deflector (e.g., deflector 116, 126, 136, 146, 156, 166, 176). In the inactive mode, the deflector is fully embedded in the groove. In the active mode, the deflector extends above the groove (e.g., above a plane of a roof of the vehicle). The controller selects between the active mode and the inactive mode based on the speed of the vehicle, the internal temperature of the enclosure, the external temperature, a difference between the internal temperature of the enclosure and the external temperature, or the wind speed. In step 906, the controller may adjust a rotation speed of a fan (e.g., fan 244, 344, 444, 544) based on the height of the deflector.