# temperature derivations

1. temperature from pressure and number density

   symbol | description | unit | variable name
   --- | --- | --- | ---
   \(k\) | Boltzmann constant | \(\frac{kg m^2}{K s^2}\) |
   \(n\) | number density | \(\frac{molec}{m^3}\) | number_density {:}
   \(p\) | pressure | \(Pa\) | pressure {:}
   \(T\) | temperature | \(K\) | temperature {:}

   The pattern : for the dimensions can represent {vertical}, {latitude,longitude}, {latitude,longitude,vertical}, {time}, {time,vertical}, {time,latitude,longitude}, {time,latitude,longitude,vertical}, or no dimensions at all.

   \[T = \frac{p}{kn}\]

2. temperature from virtual temperature

   symbol | description | unit | variable name
   --- | --- | --- | ---
   \(M_{air}\) | molar mass of total air | \(\frac{g}{mol}\) | molar_mass {:}
   \(M_{dry\_air}\) | molar mass of dry air | \(\frac{g}{mol}\) |
   \(T\) | temperature | \(K\) | temperature {:}
   \(T_{v}\) | virtual temperature | \(K\) | virtual_temperature {:}

   The pattern : for the dimensions can represent {vertical}, {latitude,longitude}, {latitude,longitude,vertical}, {time}, {time,vertical}, {time,latitude,longitude}, {time,latitude,longitude,vertical}, or no dimensions at all.

   \[T = \frac{M_{air}}{M_{dry\_air}}T_{v}\]

3. surface temperature from surface pressure and surface number density

   symbol | description | unit | variable name
   --- | --- | --- | ---
   \(k\) | Boltzmann constant | \(\frac{kg m^2}{K s^2}\) |
   \(n_{surf}\) | surface number density | \(\frac{molec}{m^3}\) | surface_number_density {:}
   \(p_{surf}\) | surface pressure | \(Pa\) | surface_pressure {:}
   \(T_{surf}\) | surface temperature | \(K\) | surface_temperature {:}

   The pattern : for the dimensions can represent {vertical}, {latitude,longitude}, {latitude,longitude,vertical}, {time}, {time,vertical}, {time,latitude,longitude}, {time,latitude,longitude,vertical}, or no dimensions at all.

   \[T_{surf} = \frac{p_{surf}}{kn_{surf}}\]