Three-dimensional wake transition of a heated square cylinder in the presence of cross-buoyancy