Closed victoriyaforsythe closed 2 years ago
From @victoriyaforsythe through email:
#degree to radians convertion
DR=np.pi/180. #degree to radian conversion factor
RD=1./DR #radian to dergree conversion factor
# Modified dip angle
modip = np.arctan((inc/np.sqrt(np.cos(alat*DR)))*DR)*RD
#where inc is the inclination of the magnetic field from IGRF in degrees, and alat is latitude in geographic coordinates.
I am not sure how you can include these outputs, and it is totally up to you, but the ideal option for me would look like this, so that the inclination is calculated only once and used for the conversion and for the modip calculation under the same routine to save the computational time:
A = Apex(dtime) alat, alon, modip, slon, slat = A.convert(aQDlat, aMLT, 'mlt', 'geo', height=aalt, datetime=dtime)
Ok, so you can get the subsolar point this way:
import apexpy
import datetime as dt
dtime = dt.datetime(2001, 1, 1)
slat, slon = apexpy.helpers.subsol(dtime)
I looked in the guts of Apex.convert
and it's not straightforward to add that as an output option. It'd be the same computational time as just calling the helper function.
It also looks like there are currently no routines to get the IGRF inclination from the files. This is not surprising, since this is a tool to calculate a subset of magnetic coordinates. There are tools to get sin(inc) and cos(inc) from the apex latitude, though that's not a very robust way of calculating the data.
Previously, we decided that providing IGRF output was out of scope for this package. I think that to add the modified dip angle it may be necessary to go into the Fortran code and add a new function there.
Closing this, as apexpy is limited to providing the coordinates available in the apex Fortran code.
Many ionospheric models (such as IRI and NeQuick) require the information about the modified magnetic dip angle, as a function of geographic latitude. Apex users, like me, will benefit from this output and it will reduce the steps in modeling. Please consider adding this parameter to the Apex outputs.