  We present numerical simulations of molecular clouds (MCs) with
self-consistent CO gas-phase and isotope chemistry in various environments. The
simulations are post-processed with a line radiative transfer code to obtain
$^{12}$CO and $^{13}$CO emission maps for the $J=1\rightarrow0$ rotational
transition. The emission maps are analysed with commonly used observational
methods, i.e. the $^{13}$CO column density measurement, the virial mass
estimate and the so-called $X_{\textrm{CO}}$ (also CO-to-H$_2$) conversion
factor, and then the inferred quantities (i.e. mass and column density) are
compared to the physical values. We generally find that most methods examined
here recover the CO-emitting H$_{2}$ gas mass of MCs within a factor of two
uncertainty if the metallicity is not too low. The exception is the $^{13}$CO
column density method. It is affected by chemical and optical depth issues, and
it measures both the true H$_{2}$ column density distribution and the molecular
mass poorly. The virial mass estimate seems to work the best in the considered
metallicity and radiation field strength range, even when the overall virial
parameter of the cloud is above the equilibrium value. This is explained by a
systematically lower virial parameter (i.e. closer to equilibrium) in the
CO-emitting regions; in CO emission, clouds might seem (sub-)virial, even when,
in fact, they are expanding or being dispersed. A single CO-to-H$_{2}$
conversion factor appears to be a robust choice over relatively wide ranges of
cloud conditions, unless the metallicity is low. The methods which try to take
the metallicity dependence of the conversion factor into account tend to
systematically overestimate the true cloud masses.
