This page was created by the IDL library routine `mk_html_help2`.

Last modified: Wed Sep 10 18:16:51 2025.

# Directory Listing of Routines

# projects/maven/acc

- MVN_ACC_LOAD_L3

# Routine Descriptions

## MVN_ACC_LOAD_L3

[List of Routines]

    Load in MAVEN acceleromater (ACC) L3 derived products to IDL tplot.

    Routine uses timespan command - set start date and number of days with timespan first, and then run this command, similar to the other PFP
    instruments.

    This routine requires SPICE software. ACC times are given as # seconds from periapsis; SPICE is required to find the UTC periapsis time. The user is
    not required to do anything extra (other than install SPICE) - everything is done by the routine.

    This routine is still under testing and may break. Please let CMF know if this happens!

    EGS:
    timespan, '2019-01-01', 2.
    mvn_acc_load

    KEYWORDS:
    loadspice: Set as a string, SPICE software is needed to convert orbit number to UNIX time. Set this variable to a string, '0' or '1':
             '0': don't load SPICE. Use this if you have already loaded in SPICE kernels for the set timespan period.
             '1': load SPICE. Use this to load SPICE kernels for the set timespan period.
             The default if not set is to load SPICE.
             Note: I haven't made this routine clever enough yet to know whether SPICE kernels are already loaded in for the set time range, so
             it will probably crash if you don't set this keyword correctly.

    clearspice: same as loadspice: set as string:
             '0' : don't clear (leave in IDL memory).
             '1' : clear from IDL memory.
             Default is '0'.

    OUTPUTS / NOTES:
    The ACC files contain the following quantities for each data point, which are stored in the output tplot variables 'ACC_density' and 'ACC_density_sm'.
    The full resolution (1s) densities are stored within 'ACC_density', under the '.y' field in the tplot data structure. The smoothed (99s) densities
    are stored within 'ACC_density_sm', under the .y field in the tplot data structure.

    The remaining variables are stored under the tags specified below.

    (.x) time from periapsis [s]
    (.y) density - either full (1s) resolution or smoothed (99s), in units of [kg km^-3]
    (.alt) altitude in the IAU (planetary) frame [km]
    (.lon) planetary longitude [degrees]
    (.lat) planetary latitude [degrees]
    (.sza) solar zenith angle [degrees]
    (.lst) local solar time [hours]
    (.sig) sigma of .y field [kg km^-3]

    They don't however contain the UNIX time for each point (just the offset in time from periapsis). Using the orbit number in the filename, this
    routine converts orbit number to a UNIX time at periapsis, which is then used to calculate the UNIX time at each point, based on the offset time.
    To check the accuracy of this, I have compared the altitudes provided in the ACC files, to the altitudes dervied from SPICE based on these derived
    UNIX time steps. At periapsis (~150 km), the SPICE derived altitudes are about 0.2 km larger than those provided in the ACC files. At 200 km
    (roughly where ACC data span up to), SPICE derived altitudes are roughly 0.5 km larger than those provided. Thus, I believe these errors are
    small enough for most uses that they are insignificant. All altitudes, longitudes and latitudes here are in planetary, ie IAU, coordinates.

    I haven't checked the accuracy of the other parameters provided in the ACC file. I assume they are of similar accuracy to altitude.

    success: set to a variable; on output, it will be: 0 : load unsuccessful - no ACC files found
                                                       1 : load successful - ACC files found and loaded (note, routine is not clever enough to say whether files were
                                                           found for each day in the requested time range)

    OTHER:
    Created by Chris Fowler (cmfowler@berkeley.edu) on 2018-07-31.

    .r /Users/cmfowler/IDL/Projects/2018/CME_sep12/mvn_acc_load_l3.pro

(See projects/maven/acc/mvn_acc_load_l3.pro)