-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The SPEDAS interfaces to the various field model routines (t89,. t96, t01, etc) do not behave correctly when the /geopack_2008 option is specified.
For example, for t89, we have this:
;recalculate geomagnetic dipole
if geopack_2008 then begin
geopack_recalc_08, ts[id].year,ts[id].doy, ts[id].hour, ts[id].min, ts[id].sec, tilt = tilt
endif else begin
geopack_recalc, ts[id].year,ts[id].doy, ts[id].hour, ts[id].min, ts[id].sec, tilt = tilt
endelse
rgsm_x = rgsm_array[idx, 0]
rgsm_y = rgsm_array[idx, 1]
rgsm_z = rgsm_array[idx, 2]
;calculate internal contribution
if geopack_2008 then begin
geopack_igrf_gsw_08,rgsm_x, rgsm_y, rgsm_z, igrf_bx, igrf_by,igrf_bz
endif else begin
geopack_igrf_gsm,rgsm_x, rgsm_y, rgsm_z, igrf_bx, igrf_by,igrf_bz
endelse
; tilt handling code omitted
;calculate external contribution
;iopt = kp+1
geopack_t89, iopt[id], rgsm_x, rgsm_y, rgsm_z, t89_bx, t89_by, t89_bz, tilt = tilt
Note: We call geopack_igrf_gsw_08 if /geopack_2008 is specified, but no conversion from GSM positions to GSW positions was performed.
If we do use GSW coordinates internally, for the /geopack_2008 case. there should probably be a conversion back to GSE or GSM for the model field vectors.
In order to do the conversion to/from GSW coordinates, a solar wind velocity should be supplied to geopack_recalc_08.
The way we do it, no vgse argument is passed, and gepack_recalc_08 appears to assume a value of [-400, 0, 0]. Since the default VY component is 0, there's no aberration to correct, so converting from GSM->GSE->GSW doesn't actually do anything!
The same problems exist for the rest of the models.
At least in the field line tracing routines, we make a token effort to convert from GSE to GSW if /geopack_2008 is specified. But again, this turns out to be a no-op, since we're not passing a solar wind velocity to geopack_recalc_08. We do call geopack_trace_08 rather than geopack_trace, but since we're not changing any of the new parameters (step size, error limits), it's not clear whether that's making any difference at all.
Related issue: It's inconvenient to switch between GSM and GSW. One would have to call geopack_recalc, then geopack_conv_coord, /from_gsm, /to_gse . Then call geopack_recalc_08, so we can call geopack_conv_coord_08, /from_gse. /to_gsw. Calling geopack_recalc_08 gets undone if you then call geopack_recalc, and vice versa. See: #367