Skip to content

[enhancement] Correction of the H2O cross-section for use with MT-CKD continuum #58

@tannoudji

Description

@tannoudji

The MT-CKD continuum has been added to HITRAN, but HAPI does not yet have a direct way of calculating the H2O cross-section without the baseline at 25cm-1, which is necessary to then add the continuum.

I have implemented this in the code with 3 sadditional lines, and would suggest that add it to HAPI official code. Simply add an option in the absorption Coefficient_Generic(..., do_remove_baseline=False)

and within the code, you can replace:

            # calculate profile on a grid            
            BoundIndexLower = bisect(Omegas,TRANS['nu']-OmegaWingF)
            BoundIndexUpper = bisect(Omegas,TRANS['nu']+OmegaWingF)
            PARAMETERS['WnGrid'] = Omegas[BoundIndexLower:BoundIndexUpper]
            lineshape_vals = profile(**PARAMETERS)
            Xsect[BoundIndexLower:BoundIndexUpper] += factor * lineshape_vals

by:

            # calculate profile on a grid            
            BoundIndexLower = bisect(Omegas,TRANS['nu']-OmegaWingF)
            BoundIndexUpper = bisect(Omegas,TRANS['nu']+OmegaWingF)
            PARAMETERS['WnGrid'] = Omegas[BoundIndexLower:BoundIndexUpper]
            lineshape_vals = profile(**PARAMETERS)

            if do_remove_baseline and len(lineshape_vals) > 0:
                baseline = min(lineshape_vals[0], lineshape_vals[-1])
                lineshape_vals = lineshape_vals - baseline
            Xsect[BoundIndexLower:BoundIndexUpper] += factor * lineshape_vals

I do not test that the OmegaWingF is 25cm-1 to keep this function as general as possible. The user should be aware of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions