Closed ericthewizard closed 11 months ago
The user found a working method that uses the SuperDARN AACGM library:
year=2016
t0=3600.*24*31.+3600.*6.
glat=56.4
glon=265.4
hgt=110.
aacgmconvcoord, glat,glon,hgt, mlat,mlon,err,/TO_AACGM
mlt = aacgmmlt(year, t0, mlon )
But it appears to be using old coefficients (see #81)
I've seen this before! There is a non-obvious bit of initialization that needs to happen before certain aacgm_v2 calls are made. I dug this out of my email archives:
I was able to reproduce the error you reported -- it only happens if I run your example commands in a fresh IDL session. If I've already run the AACGM crib sheet, the error doesn't occur. It turns out that some of the common block variables are initialized in the routines that set the date and time, and if you just call aacgmidl_v2 and then aacgm_v2_convertgeocoord, the common block isn't completely initialized. So I would suggest adding a call like
ret = AACGM_v2_SetDateTime(year,month,day)
with suitable values for year, month, and day, and I believe that you'll then be able to call aacgm_v2_convertgeocoord without getting the error.
Thanks! I let her know
We should see if it's possible to update the coefficient files for the older version of AACGM.
Update: this does not appear to be possible -- the latest IGRF13 coefficient file does not appear to be compatible with the AACGM version 1 model. See final comment on related issue https://github.com/spedas/bleeding_edge/issues/81
I received a question from a user attempting to convert from magnetic longitude to MLT:
I tried using calc_mlt from aacgmidl.pro, but got a crash there as well: