Skip to content

Nonsensical units for wavelength #28

@aeropung

Description

@aeropung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions