-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Summary
If the surface pressure is set to be < 1e7 Baryes, but gas is still set as the planetary type option, then a cryptic ValueError is produced.
I've fixed this in my version by changing host_functions.py line 679 to:
i_white_light_radius = max([0] + [i for i in range(quant.nlayer) if quant.p_lay[i] >= 1e7])which ensures a while light radius is placed a the bottom of an atmosphere if there are no particularly high pressures. I'm not sure if this is the best way to solve it, but it seems to be working for me.
How to reproduce
python helios.py -boa_layer 1e6Output
Traceback (most recent call last):
File "/.../HELIOS_latest/helios.py", line 147, in <module>
main()
File "/.../HELIOS_latest/helios.py", line 145, in main
run_helios()
File "/.../HELIOS_latest/helios.py", line 85, in run_helios
computer.radiation_loop(keeper, writer, reader, plotter)
File "/.../HELIOS_latest/source/computation.py", line 877, in radiation_loop
hsfunc.calculate_height_z(quant)
File "/.../HELIOS_latest/source/host_functions.py", line 679, in calculate_height_z
i_white_light_radius = max([i for i in range(quant.nlayer) if quant.p_lay[i] >= 1e7])
ValueError: max() arg is an empty sequenceCode of interest
HELIOS/source/host_functions.py
Line 679 in d5e6237
| i_white_light_radius = max([i for i in range(quant.nlayer) if quant.p_lay[i] >= 1e7]) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels