Open nordam opened 1 year ago
Thanks Tor.
As it happens, I was just looking at this (oddly hadn't noticed the docstring error). But I did write a unit test. It seems we need another one that tests the fs_loc flag.
You can find it in #24, and in the (now miss-named) numpy_updates branch.
tamoc/test/test_ambient.py
If you add another test (even, or especially) if it fails, that would be great.
NOTE: I also added code to ambient.py that would convert to K before generating a pressure profile -- I got bitten by the same issue.
The function
ambient.compute_pressure
seems to have a mistake in the example in the docstring, and a bug. It returns negative pressure values when I call it with the example values given in the docstring:According to the docstring description of
T
, it should be in Kelvin, and if I convertT
to Kelvin by adding 273, it returns more reasonable values:Furthermore, the argument
fs_loc
doesn't appear to work as intended. If I reverse the order of thez
array, and changefs_loc
from -1 to 0, I get the following error: