GEOS-ESM / GMAOpyobs

GMAO pyobs
Apache License 2.0
4 stars 1 forks source link

Nan in lat from sgp4_mod.F90 #30

Open metdyn opened 1 year ago

metdyn commented 1 year ago

Hi @amdasilva,

I find on Apr 10, 2023, in the develop branch the fortran source code src/f2py/sgp4_mod.F90 generate nan for lat, such that sgp4.py with AeroApps/src/Components/misc/orbits/TLE generates the following lines:

-82.757049,nan,00:00 -83.358382,nan,00:00 -83.935476,nan,00:01 -84.490897,nan,00:01 -85.026898,nan,00:02 -85.545471,nan,00:02

98.850605,nan,23:47 98.329339,nan,23:47 97.823986,nan,23:48 97.332944,nan,23:48 96.854779,nan,23:49 96.388200,nan,23:49 95.932041,nan,23:50 95.485239,nan,23:50

I had ported the src/f2py/sgp4_mod.F90 and TLE_mod.F90 into MAPL, after build and run, I got the message: Fortran runtime error: Index '7' of dimension 1 of array 'lats' above upper bound of 6

As of now, both sgp4_mod.F90 and TLE_mod.F90 are dated 14-May-2022, so I think the bug is still there.

amdasilva commented 8 months ago

Recent versions of pyobs/tle.py uses module ephem for orbit propagation alleviating the need for sgp4. However, we still need to debug this.