Closed 1030ahmad1030 closed 4 years ago
I'm not sure what that means -- it looks like it's expecting command line parameters. Were you doing from within Ipython:
%run AltitudeProfile.py 2003-11-21T12 -11.95 -76.77
That should generate altitude profile plot as in the Readme.md
This was what I got
usage: ipykernel_launcher.py [-h] [-alt_km ALT_KM ALT_KM ALT_KM] time latlon latlon ipykernel_launcher.py: error: the following arguments are required: latlon An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
C:\Users\ahmad\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3333: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)
I would try running with just python AltitudeProfile.py --help
to see what the command line parameters are. That works for most command line programs, Python or others.
Please confirm if the following code is what you refer as altitude profile.py .......
""" Height Profile Example """ import iri2016 as iri from argparse import ArgumentParser from matplotlib.pyplot import show import iri2016.plots as piri
def main():
p = ArgumentParser()
p.add_argument("time", help="time of simulation")
p.add_argument("latlon", help="geodetic latitude, longitude (degrees)",
type=float, nargs=2) p.add_argument("-alt_km", help="altitude START STOP STEP (km)", type=float, nargs=3, default=(80, 1000, 10)) P = p.parse_args()
iono = iri.IRI(P.time, P.alt_km, *P.latlon)
piri.altprofile(iono)
show()
if name == "main": main()
On Mon, Nov 18, 2019 at 4:44 PM Michael Hirsch, Ph.D. < notifications@github.com> wrote:
I would try running with just python AltitudeProfile.py --help to see what the command line parameters are. That works for most command line programs, Python or others.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/space-physics/IRI2016/issues/11?email_source=notifications&email_token=AJCFMSCIMT77RR6TJT5CKH3QUKL27A5CNFSM4JNBGL4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEKPEKY#issuecomment-555020843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCFMSDEGOHGQ72YKWRKUPLQUKL27ANCNFSM4JNBGL4A .
if yes, then the code gives this error every time i run
usage: ipykernel_launcher.py [-h] [-alt_km ALT_KM ALT_KM ALT_KM] time latlon latlon ipykernel_launcher.py: error: the following arguments are required: latlon
An exception has occurred, use %tb to see the full traceback. SystemExit: 2
On Wed, Nov 20, 2019 at 7:15 AM Ahmad Muhammad ahmadmuhammad325@gmail.com wrote:
Please confirm if the following code is what you refer as altitude profile.py .......
!/usr/bin/env python
""" Height Profile Example """ import iri2016 as iri from argparse import ArgumentParser from matplotlib.pyplot import show import iri2016.plots as piri
def main():
p = ArgumentParser() p.add_argument("time", help="time of simulation") p.add_argument("latlon", help="geodetic latitude, longitude
(degrees)", type=float, nargs=2) p.add_argument("-alt_km", help="altitude START STOP STEP (km)", type=float, nargs=3, default=(80, 1000, 10)) P = p.parse_args()
iono = iri.IRI(P.time, P.alt_km, *P.latlon) piri.altprofile(iono) show()
if name == "main": main()
On Mon, Nov 18, 2019 at 4:44 PM Michael Hirsch, Ph.D. < notifications@github.com> wrote:
I would try running with just python AltitudeProfile.py --help to see what the command line parameters are. That works for most command line programs, Python or others.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/space-physics/IRI2016/issues/11?email_source=notifications&email_token=AJCFMSCIMT77RR6TJT5CKH3QUKL27A5CNFSM4JNBGL4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEKPEKY#issuecomment-555020843, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCFMSDEGOHGQ72YKWRKUPLQUKL27ANCNFSM4JNBGL4A .
Thank you, it worked..........I am pleased with your patience and humbleness.
I tried running altitude.py and got the following error
usage: ipykernel_launcher.py [-h] [-glat GLAT GLAT GLAT] [-alt_km ALT_KM] [-o OUTFN] glon ipykernel_launcher.py: error: argument glon: invalid float value: 'C:\Users\ahmad\AppData\Roaming\jupyter\runtime\kernel-f20abfce-44ef-4ecc-8b45-3814c4be8a0f.json' An exception has occurred, use %tb to see the full traceback.
SystemExit: 2