hitranonline / hapi

HITRAN Application Programming Interface (HAPI)
Other
80 stars 35 forks source link

Bug in data selection? #5

Closed gpetty closed 5 years ago

gpetty commented 6 years ago

As a new user of HAPI, I'm very happy that there's finally a convenient API for working with HITRAN data. Also as a new user, it's possible I'm not yet using it correctly, as I'm experiencing the following strange behavior: despite selecting CH4 as the constituent I want to plot and seeing that that data was successfully downloaded via 'fetch()', I think I am getting a spectrum for O3 instead. See the attached screen capture.

I had indeed selected O3 in an earlier test, but I continue to get the same spectrum when I try to get absorption for CO2 or CH4, even after I delete the data folders and restart the Jupyter kernel. Please let me know whether I'm overlooking something obvious.

hapi_spectrum
hitranonline commented 5 years ago

Hi, It looks like you have both O3 and CH4 in one single table. Also, you have specified the O3 as a radiatively active species in the Components input parameter. To obtain the CH4 spectra, try to change the ((3,1),) to ((6,x),) where x is the number of methane isotopologue you want to calculate the absorption for. Cheers, Roman

gpetty commented 5 years ago

Thank you. I misunderstood the example given on page 35 of the manual, thinking the character string 'CH4' or 'O3' alone selected the constituent to calculate absorption for.

I still don't know how I wound up with O3 data in a table called 'CH4', but probably by making a similar mistake in my fetch() command.