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

Nonsensical units for wavelength #28

Open
aeropung opened this issue Jul 6, 2023 · 0 comments
Open

Nonsensical units for wavelength #28

aeropung opened this issue Jul 6, 2023 · 0 comments

Comments

@aeropung
Copy link

aeropung commented Jul 6, 2023

I'm using the example posted here, and it occurred to me that --short, --long, and -step arguments are nonsensical. In the example, the short wavelength is listed in nanometers, but the longest wavelength is in cm^-1; similarly, the wavelength step is also cm^-1. But cm^-1 is wavenumber, so it makes a big difference what the units are. The x-axis title on the output plot is Wavelength [nm], so which is it? Wavelength (nm)? or Wavenumber (cm^-1)?

p = ArgumentParser(description="Lowtran 7 interface")
p.add_argument("-z", "--obsalt", help="altitude of observer [km]", type=float, default=0.0)
p.add_argument(
    "-a",
    "--zenang",
    help="observer zenith angle [deg]",
    type=float,
    nargs="+",
    default=[0, 60, 80],
)
p.add_argument("-s", "--short", help="shortest wavelength nm ", type=float, default=1000)
p.add_argument("-l", "--long", help="longest wavelength cm^-1 ", type=float, default=1500)
p.add_argument("-step", help="wavelength step size cm^-1", type=float, default=20)
p.add_argument(
    "--model",
    help='0-6, see Card1 "model" reference. 5=subarctic winter',
    type=int,
    default=2,
)
P = p.parse_args()

c1 = {
    "model": P.model,
    "h1": P.obsalt,
    "angle": P.zenang,
    "wlshort": P.short,
    "wllong": P.long,
    "wlstep": P.step,
}

TR = lowtran.transmittance(c1)

transmission(TR, c1)

show()
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