  Aims. We use advanced 3D NLTE radiative magnetohydrodynamic simulations of
the solar atmosphere to carry out detailed tests of chromospheric diagnostics
at millimeter and submillimeter wavelengths. Methods. We focused on the
diagnostics of the thermal structure of the chromosphere in the wavelength
bands from 0.4 mm up to 9.6 mm that can be accessed with the Atacama Large
Millimeter/Submillimeter Array (ALMA) and investigated how these diagnostics
are affected by the instrumental resolution. Results. We find that the
formation height range of the millimeter radiation depends on the location in
the simulation domain and is related to the underlying magnetic structure.
Nonetheless, the brightness temperature is a reasonable measure of the gas
temperature at the effective formation height at a given location on the solar
surface. There is considerable scatter in this relationship, but this is
significantly reduced when very weak magnetic fields are avoided. Our results
indicate that although instrumental smearing reduces the correlation between
brightness and temperature, millimeter brightness can still be used to reliably
diagnose electron temperature up to a resolution of 1". If the resolution is
more degraded, then the value of the diagnostic diminishes rapidly.
Conclusions. We conclude that millimeter brightness can image the chromospheric
thermal structure at the height at which the radiation is formed. Thus
multiwavelength observations with ALMA with a narrow step in wavelength should
provide sufficient information for a tomographic imaging of the chromosphere.
