- Timestamp:
- Sep 26, 2019, 3:17:36 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2711 r2712 17133 17133 """ 17134 17134 fname = 'equal_units' 17135 availunits = ['$gkg^{-1}$', 'K'] 17136 17137 if units1 == '$gkg^{-1}$': 17135 availunits = ['$^{\circ}C$', '$gkg^{-1}$', '$K$', '$kt$'] 17136 17137 if units1 == '$^{\circ}C$': 17138 availunits1 = ['$K$'] 17139 if units2 == '$K$': factor = ['addc', -273.15] 17140 else: 17141 print errormsg 17142 print ' ' + fname + ": for ref. units '" + units1 + "' not available '"+\ 17143 units2 + "' !!" 17144 print ' available ones:', availunits1 17145 quit() 17146 elif units1 == '$gkg^{-1}$': 17138 17147 availunits1 = ['$kgkg^{-1}$'] 17139 17148 if units2 == '$kgkg^{-1}$': factor = ['mulc', 1000.] … … 17153 17162 print ' available ones:', availunits1 17154 17163 quit() 17164 elif units1 == '$kt$': 17165 availunits1 = ['$ms^{-1}$'] 17166 if units2 == '$ms^{-1}$': factor = ['mulc', 3600./1852.] 17167 else: 17168 print errormsg 17169 print ' ' + fname + ": for ref. units '" + units1 + "' not available '"+\ 17170 units2 + "' !!" 17171 print ' available ones:', availunits1 17172 quit() 17155 17173 else: 17156 17174 print errormsg
Note: See TracChangeset
for help on using the changeset viewer.