atmos1D | index /users/schrei_f/src/py4CAtS/lite/src/atmos1D.py |
atmos1D
Read atmospheric data file(s) in xy tabular ascii format:
extract profiles (columns), convert to cgs units, optionally truncate top or bottom levels, save in xy format.
If several files are given, the profiles from the second, third, ... file are interpolated to the grid of the first file.
Usage:
atmos1D [options] file(s)
-h help
-c char comment character(s) used in input,output file (default '#')
-o string output file for saving of atmospheric data
-i string interpolation method (default: numpy's linear interp)
-r replace duplicate profile from preceeding file(s) with new data
(default: ignore duplicate profile(s) from second, third, ... file)
-w string the leading word identifying the header row specifying the columns (default: "what")
-u string the leading word identifying the header row specifying the units (default: "units")
-x string eXtract profiles from file(s) (a string with comma seperated entries (default: "z,p,T,H2O"))
--BoA float bottom-of-atmosphere altitude in km
--ToA float top-of-atmosphere altitude in km
--scale floats multiply molecular concentrations with scaleFactors
(either a comma separated list of floats (no blanks) in the same order as for the line data files,
or just a single float to scale the profile of the molecule corresponding to the first lineFile.)
-z floats regrid to (evtl. equidistant) altitude grid
Functions | ||
|
Data | ||
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' goodNames = ['height', 'heights', 'altitude', 'altitudes', 'Height', 'Heights', 'Altitude', 'Altitudes', 'press', 'pressure', 'pressures', 'Press', 'Pressure', 'Pressures', 'temp', 'temperature', 'temperatures', 'Temp', 'Temperature', 'Temperatures', ...] kBoltzmann = 1.3806504e-16 lengthUnits = {'A': 1e-08, 'cm': 1.0, 'dm': 10.0, 'inch': 2.54, 'km': 100000.0, 'm': 100.0, 'micrometer': 0.0001, 'mm': 0.1, 'mue': 0.0001, 'mum': 0.0001, ...} mixingRatioUnits = {'%': 0.01, 'pp1': 1.0, 'ppV': 1.0, 'ppb': 1e-09, 'ppm': 1e-06, 'ppt': 1e-12, 'ppv': 1.0, 'vmr': 1.0} molecNames = ['H2O', 'HDO', 'CO2', 'O3', 'N2O', 'CO', 'CH4', 'CH3D', 'O2', 'NO', 'SO2', 'NO2', 'NH3', 'HNO3', 'OH', 'HF', 'HCl', 'HBr', 'HI', 'ClO', ...] molecules = {'BrO': {'NumDeg': [1], 'TempExpGL': 0.5, 'TempExpQR': 1.0, 'VibFreq': [500.0], 'isotopes': ['69', '61'], 'mass': 95.0}, 'C2H2': {'NumDeg': [1, 1, 1, 2, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.0, 'VibFreq': [3374.0, 1974.0, 3289.0, 629.0, 730.0], 'geisa': 24, 'hitran': 26, 'isotopes': ['1221', '1231', '1222'], 'mass': 26.03, 'sao': 26}, 'C2H4': {'NumDeg': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 'TempExpGL': 0.5, 'TempExpQR': 1.5, 'VibFreq': [3026, 1625, 1342, 1023, 3103, 1236, 949, 943, 3106, 826, 2989, 1444], 'geisa': 25, 'hitran': 38, 'isotopes': ['221', '311'], 'mass': 28.0}, 'C2H6': {'NumDeg': [1, 1, 1, 1, 1, 1, 2, 1, 2], 'TempExpGL': 0.75, 'TempExpQR': 1.9, 'VibFreq': [2899.0, 1375.0, 993.0, 275.0, 2954.0, 1379.0, 2994.0, 1486.0, 822.0], 'geisa': 22, 'hitran': 27, 'isotopes': ['1221', '1231'], 'mass': 30.07, 'sao': 27}, 'C2HD': {'geisa': 48, 'isotopes': ['122'], 'mass': 17.0}, 'C2N2': {'VibFreq': [2330, 846, 2158, 503, 234], 'geisa': 29, 'hitran': 48, 'isotopes': ['4224'], 'mass': 52.0}, 'C3H4': {'geisa': 40, 'mass': 40.0}, 'C3H8': {'VibFreq': [2977, 2962, 2887, 1476, 1462, 1392, 1158, 869, 369, 2967, 1451, 1278, 940, 216, 2968, 2887, 1464, 1378, 1338, 1054, ...], 'geisa': 28, 'isotopes': ['221'], 'mass': 44.0}, 'C4H2': {'VibFreq': [3293, 2184, 874, 3329, 2020, 627, 482, 630, 231], 'geisa': 30, 'hitran': 43, 'isotopes': ['221'], 'mass': 50.0}, 'C6H6': {'VibFreq': [3062, 992, 1326, 673, 3068, 1010, 995, 703, 1310, 1150, 849, 3063, 1486, 1038, 3047, 1596, 1178, 606, 975, 410], 'geisa': 47, 'isotopes': ['266'], 'mass': 78.0}, ...} pressureUnits = {'N/m**2': 10.0, 'N/m^2': 10.0, 'Pa': 10.0, 'Torr': 1333.22, 'atm': 1013250.0, 'bar': 1000000.0, 'dyn/cm**2': 1.0, 'dyn/cm^2': 1.0, 'g/(cm*s**2)': 1.0, 'g/(cm*s^2)': 1.0, ...} simpleNames = {'Altitude': 'z', 'Altitudes': 'z', 'Density': 'air', 'HGT': 'z', 'Height': 'z', 'Heights': 'z', 'PRE': 'p', 'Press': 'p', 'Pressure': 'p', 'Pressures': 'p', ...} |