Closed thaitrinh closed 6 years ago
AACGM is known to have problems in certain regions, specifically near the equator. Try https://github.com/cmeeren/apexpy instead.
@cmeeren: Thank you very much!
I think I understood what the problem is. For the low magnetic latitudes (near equator) both AACGM and Apexpy have problem when the altitude is so high. For example, for lat=-11, the maximum altitude can only be 241 km, for lat=-5, the maximum altitude can be only 48.8 km. Do you know why? Thank you!
If I remember correctly, apexpy doesn't have these limitations since it uses the APEX model which AFAIK is defined everywhere. I don't remember the details of why; @klaundal might be able to explain more.
You are trying to convert magnetic to geographic coordinates. In aacgm and modified apex, the magnetic coordinates (mlon, mlat) essentially label the IGRF field lines (they are constant along these lines, except for a sign change between hemispheres). The height tells you where on the field line your point is. Since the field lines do not extend infinitely far out in space, there will be a limit to this height. That limit is lower at lower latitudes, since the field lines don't extend very far. When you exceed the height limit you get an error.
OS: MacOS Sierra 10.12.5 AACGMV2 1.0.13
convert(lat=-10.,lon=60., alt=250, date=date(2010, 6, 15), a2g=True)
Error: RuntimeError: AACGM_v2_Convert returned error code -1