In regard of the mass of CO2 in the atmosphere in the year 2002:
rs1 = Solve[
Eliminate[{xCO2 == nCO2/nAir, mAir == nAir*MAir,
mCO2 == nCO2*MCO2}, {nCO2, nAir}], mCO2][[1]]
gives
{mCO2 -> (mAir MCO2 xCO2)/MAir}
With data from Wolfram Alpha and Mathematica:
UnitConvert[
mCO2 //.
Join[rs1, {mAir ->
WolframAlpha[
"mass of atmosphere", {{"Result", 1}, "ComputableData"}],
MCO2 -> ChemicalData["CO2", "MolarMass"],
MAir -> ChemicalData["Air", "MolarMass"],
xCO2 -> UnitConvert[
WolframAlpha[
"global carbon dioxide concentration 2002", {{"Result", 4},
"ComputableData"}][[2, 3]]]}], "MetricGigatons"]
gives
Quantity[2915.77, "MetricGigatons"]