### initialise variables:
WaterVapour = 0.049300
DescentRate = 1.5
Compartments = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
TissueN2 = [0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053,0.751053]
TissueHe = [0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000]
HalftimesN2 = [4.000000,8.000000,12.500000,18.500000,27.000000,38.300000,54.300000,77.000000,109.000000,146.000000,187.000000,239.000000,305.000000,390.000000,498.000000,635.000000]
HalftimesHe = [1.510000,3.020000,4.720000,6.990000,10.210000,14.480000,20.530000,29.110000,41.200000,55.190000,70.690000,90.340000,115.290000,147.420000,188.240000,240.030000]
AValN2 = [1.259921,1.000000,0.861773,0.756204,0.666666,0.560000,0.494700,0.450000,0.418685,0.379821,0.349743,0.322278,0.297118,0.273742,0.252321,0.232686]
BValN2 = [0.505000,0.651446,0.722157,0.772504,0.812549,0.843415,0.869293,0.891039,0.909217,0.922239,0.931872,0.940315,0.947740,0.954363,0.960188,0.965316]
AValHe = [1.742400,1.383000,1.191900,1.045800,0.922000,0.820500,0.730500,0.650200,0.595000,0.554500,0.533300,0.518900,0.518100,0.517600,0.517200,0.511900]
BValHe = [0.424500,0.574700,0.652700,0.722300,0.758200,0.795700,0.827900,0.855300,0.875700,0.890300,0.899700,0.907300,0.912200,0.917100,0.921700,0.926700]
ACombined = []
BCombined = []
Ceiling = []
GFs = []
for cntr in Compartments:
ACombined.append(((AValHe[cntr]*TissueHe[cntr])+(AValN2[cntr]*TissueN2[cntr]))/(TissueHe[cntr]+TissueN2[cntr]))
BCombined.append(((BValN2[cntr]*TissueN2[cntr])+(BValHe[cntr]*TissueHe[cntr]))/(TissueHe[cntr]+TissueN2[cntr]))
Ceiling.append((((TissueN2[cntr]+TissueHe[cntr]-ACombined[cntr])/(1/BCombined[cntr]))-1)*10)
GFs.append((BCombined[cntr]*(TissueN2[cntr]+TissueHe[cntr])-(BCombined[cntr]*CurrentPressure))/(CurrentPressure-(BCombined[cntr]*CurrentPressure)+(BCombined[cntr]*ACombined[cntr])))