  The temperature profile of a planetary atmosphere is a key diagnostic of
radiative and dynamical processes governing the absorption, redistribution, and
emission of energy. Observations have revealed dayside stratospheres that
either cool or warm with altitude for a small number of gas giant exoplanets,
while other dayside stratospheres are consistent with constant temperatures.
Here we report spectroscopic phase curve measurements for the gas giant
WASP-121b, which constrain stratospheric temperatures throughout the diurnal
cycle. Variations measured for a water vapour spectral feature reveal a
temperature profile that transitions from warming with altitude on the dayside
hemisphere to cooling with altitude on the nightside hemisphere. The data are
well explained by models assuming chemical equilibrium, with water molecules
thermally dissociating at low pressures on the dayside and recombining on the
nightside. Nightside temperatures are low enough for perovskite (CaTiO3) to
condense, which could deplete titanium from the gas phase and explain recent
non-detections at the day-night terminator. Nightside temperatures are also
consistent with the condensation of refractory species such as magnesium, iron,
and vanadium. Detections of these metals at the day-night terminator suggest,
however, that if they do form nightside clouds, cold trapping does not
efficiently remove them from the upper atmosphere. Horizontal winds and
vertical mixing could keep these refractory condensates aloft in the upper
atmosphere of the nightside hemisphere until they are recirculated to the
hotter dayside hemisphere and vaporised.
