  The origin of close-in giant planets is a key open question in planet
formation theory. The two leading models are (i) formation at the outer disk
followed by migration and (ii) in situ formation. In this work we determine the
atmospheric composition of warm Jupiters for both formation scenarios. We
perform N-body simulations of planetesimal accretion interior and exterior to
the water ice-line for various planetary formation locations, planetary masses,
and planetesimal sizes to estimate the accreted heavy-element mass and final
planetary composition. We find that the two models differ significantly:
migrating giant planets have 2-14 times higher metallicities than planets that
form in situ. The ratio between refractories and volatiles is found to be above
one for migrating planets but below 0.4 for planets that form in situ. We also
identify very different trends between heavy-element enrichment and planetary
mass for these two formation mechanisms. While the metallicity of migrating
planets is found to increase with decreasing planetary mass, it is about
constant for in situ formation. Our study highlights the importance of
measuring the atmospheric composition of warm Jupiters and its connection to
their formation and evolutionary paths.
