Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrealistic jump in computed absorption for main isotope of water near 2729.5 nm #28

Open
4 tasks done
jmmelko opened this issue Dec 8, 2021 · 1 comment
Open
4 tasks done

Comments

@jmmelko
Copy link

jmmelko commented Dec 8, 2021

Hi,

When computing the absorption spectrum of water in the 2725-2732 nm range, spectreatm.py displays a jump at 2729.5 nm

  • The problem does not occur with a custom-made Matlab program reading .par files and computing Voigt profiles
  • I have checked that the Hitran lines download with HAPI have a 100% match with the ones I am using in my other program
  • Increasing eps or the resolution does not solve the problem
  • This is not due to missing line data, because it works with my other program and hey, we're dealing with the main isotope of water here

I think it may have something to do with the Voigt code not taking into account enough neighboring lines, i.e. as if the default values for the 'OmegaWing' and/or 'IntensityThreshold' were incorrect.

We were on the verge of migrating our matlab code to Python but it gave m a cold chill.

Please tell me if you can reproduce the issue. Thanks.

My code is the following:

import spectreatm
spectres = spectreatm.Spectra([H2O], [2725,2732] , zenith_angle=0,
                   layers_nb=1, temperature=300, pressure=1.01325, target_dist=1, round_trip=False, eps=10)
spectres.compute_absorption()
spectres.plot_all()
spectres.save_all()

My colleague told me that the error happens within this piece of code:

nu, coef = hapi.absorptionCoefficient_Voigt(
self.components, self.name, Environment=environment,
WavenumberRange=self.wn_range,
WavenumberStep=wn_delta, HITRAN_units=True,
Diluent={'air': 1-vmr, 'self': vmr})

spectreatm / HAPI result:

HAPI

Matlab (in-house code) result:

Matlab

@jmmelko
Copy link
Author

jmmelko commented Dec 8, 2021

ok, so i cornered the problem:

this is because the default value for DefaultOmegaWingHW = 50 is too low

setting it at 100 fixes the problem

So here's what I suggest:

  • change 50 to 100 and update HAPI, OR
  • create a custom parameter in compute_absorption() that will be passed to absorptionCoefficient_Voigt, that will be passed to absorptionCoefficient_Generic, so that OmegaWingHW=DefaultOmegaWingHW is overriden by a user-provided value, or multiplied by a user-provided factor (no unit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant