#Converts Courtin Titan binary #collision absorption coefficients into #standard "mass path" absorption coefficients. # #The first gas is considered the "collider" and #the second the "absorber," though the distinction #is not physical. # #The absorption coefficients are standardized #to a 100 mbar collider pressure, but the temperature #is not standardized. Results are given as a function #of actual temperature. # import string import phys from ClimateUtilities import * Mol1 = 'CH4' Mol2 = 'CH4' gas2 = phys.CH4 #Do a trick to do this automatically c = readTable(Mol1+Mol2+'AbsOrig.txt') headers = c.listVariables()[1:] #Temperature column headers T = [string.atof(h) for h in headers] rhoB = 1.013e5/(gas2.R*273.15) i = 0 #There's got to be some better way to do this sort of thing! for h in headers: c[h] = 1.e-5*c[h]*(273.15/T[i])/rhoB i = i+1 c.dump(Mol1+Mol2+'100mb.data')