Daniel Koll
Daniel Koll
Ben Richards used climlab as a RRTMG radiation wrapper in this paper: [Richards, Koll, Cronin (2021), Seasonal Loops Between Local Outgoing Longwave Radiation and Surface Temperature, GRL](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2021GL092978) The climlab scripts...
While working on this, I noticed that p_H2O = RH * params.esat(temp) is not valid in the stratosphere. Assuming q_H2O is uniform in the stratosphere, p_H2O has to decrease with...
@AndrewWilliams3142 I think your suggestion might not be quite correct yet. 50000ppmv CO2 presumably means that we want the *dry* background gas to consist of 5% CO2, 95% rest by...
abs = S*gam/(math.pi*( dn**2 + gam**2)) evaluates the absorption crossection due a single line as a function of wavenumber, assuming Lorentz line shape. This should actually be a computationally more-complicated...
Here is a minimal script that reproduces the error: import numpy as np import pyrads from pyrads.Absorption_Crosssections_HITRAN2016 import getKappa_HITRAN from pyrads.Absorption_Crosssections_HITRAN2016_numba import getKappa_HITRAN_numba n0,n1,dn = 350.,400.,20. n = np.arange(n0,n1,dn) T...
Resulting output is: kappaCO2 (no numba)= [5.80495351e-05 3.91946490e-06 0.00000000e+00] kappaCO2 (numba)= [5.80495351e-05 3.91946490e-06 0.00000000e+00] kappaH2O (no numba)= [22725.4463143 7063.90460525 0. ] kappaH2O (numba)= [5.80495351e-05 3.91946490e-06 0.00000000e+00] The values produced by...
@AndrewWilliams3142: getKappa_HITRAN_numba seems to produce incorrect results when calling it for a second time with another gas species. Presumably an issue with numba's caching? Manually setting @jit(cache=False) doesn't fix things...
Interesting! Yes, the Absorption_Crosssections script is in urgent need of some rewriting and cleaning up. The code is essentially Ray Pierrehumbert's old PyTran script, and could probably be made much...
ClimateGraphics should go. These are all pre-numpy/matplotlib legacy libraries.
In terms of rewriting Absorption_Crosssections: the important parts are loadSpectralLines() and computeAbsorption(). loadSpectralLines() reads in all the individual spectral lines from a hitran file, using a big for-loop. computeAbsorption() then...