Interaction between dynamics and thermodynamics during tropical cyclogenesis