my_code_base.core.units¶
Module Contents¶
- my_code_base.core.units.pressure2atm(p)[source]¶
Convert pressure given in hPa, Pa or atm into atm.
Examples
>>> pressure2atm(1013.25) 1.0 >>> pressure2atm(101325) 1.0 >>> pressure2atm(2) 2 >>> pressure2atm(pd.Series([1013.25, 1024.0])) 0 1.000000 1 1.010609 dtype: float64
- my_code_base.core.units.pressure2mbar(p)[source]¶
Convert pressure given in hPa, Pa or atm into mbar (or hPa).
Examples
>>> pressure2mbar(1013) 1013 >>> pressure2mbar(101300) 1013.0 >>> pressure2mbar(1.0) 1013.25 >>> pressure2mbar(pd.Series([1.013, 2.034])) 0 1026.42225 1 2060.95050 dtype: float64
- my_code_base.core.units.temperature2C(T)[source]¶
Convert temperatures given in Kelvin into °C. If T is a
pandas.Seriesobject, only values less than 200 are converted. All others are expected to be already in °C.Examples
>>> temperature2C(283.15) 10.0
- my_code_base.core.units.temperature2K(T)[source]¶
Convert temperatures given in °C into Kelvin. If T is a
pandas.Seriesobject, only values larger than 200 are converted. All others are assumed to be already in Kelvin.Examples
>>> temperature2K(10) 283.15