jsv5D.,
'ATM_COMP
'Written 20DEC06 by HEW
'Sets up graphs of composition of the Earths atmosphere

'Calculate % trace gasses including Argon
cell("VMR",3) = 1.0 - (cell("VMR",1)+cell("VMR",2))

'Amount of dry air gasses at saturation at 15C
cell("VMM",1) = 0.99248*cell("VMR",1)
cell("VMM",2) = 0.99248*cell("VMR",2)
cell("VMM",3) = 0.99248*cell("VMR",3)+0.00762

'Be sure percents ate OK
cell("TEST",1) = cell("VMM",1)+cell("VMM",2)+cell("VMM",3)

'Move and scale dry air volume mixing ratios for moist air
for i = 1 to size(col("TRMR_D")) do
  cell("TRMR_M",i+1) = 0.99248*cell("TRMR_D",i)
end for

'Current and pre-indutrial CO2
cell("TRMR_M",3)= 0.99248*0.000190
cell("TRMR_2",3)= 0.99248*0.000370

'H2O mixing ratios for saturation at 0 & 27C
cell("TRMR_M",1)= 0.622*6.11/(1013.6-6.11)
cell("TRMR_2",1)= 0.622*35.65/(1013.6-35.65)

'Pre industria and current methane by swithichg & scaling
cell("TRMR_2",9)=cell("TRMR_M",9)
cell("TRMR_M",9)=0.5*cell("TRMR_2",9)

'Calculate differences for stacked bars
cell("TRMR_V",1)= cell("TRMR_2",1)-cell("TRMR_M",1)
cell("TRMR_V",3)= cell("TRMR_2",3)-cell("TRMR_M",3)
cell("TRMR_V",9)= cell("TRMR_2",9)-cell("TRMR_M",9)
