The Atacama Large Millimeter/Submillimeter Array (ALMA) in the sub-millimeter
and the James Webb Space Telescope (JWST) in the infrared have achieved robust
spectroscopic detections of emission lines from the interstellar medium (ISM)
in some of the first galaxies. These unprecedented measurements provide
valuable information regarding the ISM properties, stellar populations, galaxy
morphologies, and kinematics in these high-redshift galaxies and, in principle,
offer powerful tests of state-of-the-art galaxy formation models, as
implemented in hydrodynamical simulations. To facilitate direct comparisons
between simulations and observations, we develop a fast post-processing
pipeline for predicting the line emission from the HII regions around simulated
star particles, accounting for spatial variations in the surrounding gas
density, metallicity, temperature, and incident radiation spectrum. Our ISM
line emission model currently captures Hα, Hβ, and all of the
[OIII] and [OII] lines targeted by ALMA and the JWST at z>6. We illustrate
the power of this approach by applying our line emission model to the publicly
available FIRE high-z simulation suite and perform a detailed comparison with
current observations. We show that the FIRE mass--metallicity relation is in
1σ agreement with ALMA/JWST measurements after accounting for the
inhomogeneities in ISM properties. We also quantitatively validate the one-zone
model description, which is widely used for interpreting [OIII] and Hβ
line luminosity measurements. This model is publicly available and can be
implemented on top of a broad range of galaxy formation simulations for
comparison with JWST and ALMA measurements.Comment: 15 pages, 13 figure