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

Last modified: Wed Nov 5 03:16:59 2025.

# Directory Listing of Routines

# external/IDL_GEOPACK/ta15

- GET_TA15_PARAMS
- OMNI2BINDEX
- OMNI2NINDEX
- TA15_SUPPORTED
- TA15B
- TA15B_TEST
- TA15N
- TA15N_TEST
- TOMNI2BINDEX
- TOMNI2NINDEX
- TTA15B
- TTA15N

# Routine Descriptions

## GET_TA15_PARAMS

[Next Routine] [List of Routines]

     PROCEDURE: get_ta15_params

     PURPOSE: this procedure will interpolate inputs, generate
              tsyganenko model parameters and store them in a tplot
              variable that can be passed directly to the model
              procedure

     KEYWORDS:
               imf_tvar: tplot variable name with IMF data.  Can be just the Y and Z components as a composite tplot variable,
                         or 3-vectors.

               /imf_yz:  Set this keyword if using just the T abd Z components, otherwise 3-vectors assumed

               Np_tvar: tplot variable name storing the solar wind
                       ion density(rho) cm^-3

               Vp_tvar: tplot variable name storing the proton velocity.  Can be a scalar (speed only), or 3-vectors

               /speed: Set this keyword if Vp_tvar contains scalar speeds

               model: a string, should be 'ta15n' or 'ta15b'

               newname(optional): the name of the output tplot variable
                   (default: ta15n_par or ta15b_par depending on
                   selected model)

               trange(optional): the time range over which the parameters
                   should range, if not set, this program will check the
                   timespan variable or prompt the user for a range

               speed(optional): set this if Vp_tvar is stored as a speed

     $LastChangedBy: jwl $
     $LastChangedDate: 2022-02-03 13:03:01 -0800 (Thu, 03 Feb 2022) $
     $LastChangedRevision: 30557 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/get_ta15_params.pro $

(See external/IDL_GEOPACK/ta15/get_ta15_params.pro)

## OMNI2BINDEX

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: omni2bindex

    Purpose: Generate and return the B-index parameter for the TA15B field model.  Input parameters are assumed to be smoothed on 30 minute intervals
             preceding each sample, and interpolated to a common time base.  The index is defined as

             B = (N_p/5.0)^(1/2) * (V_p/400.0)^(5.0/2.0) * (b_t/5.0) * sin(theta_c/2.0)^6

             where b_t is the tangential component of the IMF, and theta_c is the IMF clock angle (0 deg = due north, 90 deg = dawnward)

             Input values should have a cadence of 5 minutes/sample.   Output values will be averaged from the current sample and six
             previous samples, therefore the solar wind data should be loaded for at least 30 minutes preceding the times being modeled.

    Input:

    Keywords:
             yimf:  (input) Array giving the IMF Y component in GSM coordinates, e.g, from OMNI_HRO_5min_Y_GSM

             zimf:  (input) Array giving the IMF Z component in GSM coordinates, e.g. from OMNI_HRO_5min_Z_GSM

             V_p:   (input) Solar wind (proton) speed, expressed as a scalar, in km/sec, e.g from OMNI_HRO_5min_flow_speed

             N_p:   (input) Solar wind (proton) density, units cm^-3.  e.g. from OMNI_HRO_5min_proton_density

    Example:
             b_index = omni2bindex(yimf=yimf, zimf=zimf, N_p=np, V_p=vp)

    Notes:
      See Boynton 2011 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2010JA015505
    ;
      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

     $LastChangedBy: jwl $
     $LastChangedDate: 2022-01-31 22:30:46 -0800 (Mon, 31 Jan 2022) $
     $LastChangedRevision: 30550 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/omni2bindex.pro $

(See external/IDL_GEOPACK/ta15/omni2bindex.pro)

## OMNI2NINDEX

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: omni2nindex

    Purpose: Generate and return the N-index parameter for the TA15N field model.  Input parameters are assumed to be smoothed on 30 minute intervals
             preceding each sample, and interpolated to a common time base.  The index is defined as

             N = 0.86 * (V_p/400.0)^(4.0/3.0) * (b_t/5.0)^(2.0/3.0) * sin(theta_c/2.0)^(8.0/3.0)

             where b_t is the magnitude of the tangential component of the IMF, and theta_c is the IMF clock angle (0 deg = due north, 90 deg = dawnward)

             Input values should have a cadence of 5 minutes/sample.   Output values will be averaged from the current sample and six
             previous samples, therefore the solar wind data should be loaded for at least 30 minutes preceding the times being modeled.

    Input:

    Keywords:
             yimf:  (input) Array giving the IMF Y component in GSM coordinates, e.g, from OMNI_HRO_5min_Y_GSM

             zimf:  (input) Array giving the IMF Z component in GSM coordinates, e.g. from OMNI_HRO_5min_Z_GSM

             V_p:   (input) Solar wind (proton) speed, expressed as a scalar, in km/sec, e.g from OMNI_HRO_5min_flow_speed

    Example:
             n_index = omni2nindex(yimf=yimf, zimf=zimf, V_p=vp)

    Notes:
      See Newell 2007 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2006JA012015

      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

     $LastChangedBy: jwl $
     $LastChangedDate: 2022-01-31 22:30:46 -0800 (Mon, 31 Jan 2022) $
     $LastChangedRevision: 30550 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/omni2nindex.pro $

(See external/IDL_GEOPACK/ta15/omni2nindex.pro)

## TA15B

[Previous Routine] [Next Routine] [List of Routines]

    Function: ta15b

    Purpose:  generates an array of model magnetic field vectors from
              a monotonic time series and an array of 3-d position
              vectors

    Input:
             tarray: N array representing the time series in seconds utc since 1970
             rgsm_array: Nx3 array representing the position series in
                 earth radii (required to be in GSM coordinates)
             The following arguments can either be N length arrays or
             single values
             pdyn_array: Solar wind pressure (nanoPascals)
             yimf_array: y component of the interplanetary magnetic field
             zimf_array: z component of the interplanetary magnetic field
             xind_array: B-index parameter (see Boynton et al., 2011)

    Keywords:
             period(optional): the amount of time between recalculations of
                 geodipole tilt in seconds(default: 60)
                 increase this value to decrease run time
                 By default, the center (not the start) of the first period is now aligned with the start time.

             add_tilt:  Increment the default dipole tilt used by the model with
                        a user provided tilt in degrees.  Result will be produced with TSY_DEFAULT_TILT+ADD_TILT
                        Value can be set to an N length array an M length array or a single element array.
                        N is the number of time elements for the data.  M is the number of periods in the time interval.(determined by the period keyword)
                        If single element is provided the same correction will be applied to all periods.
                        If an N length array is provided, the data will be re-sampled to an M length array. Consequently, if
                        the values change quickly, the period may need to be shortened.

             get_tilt: Returns the dipole_tilt parameter used for each period.
                       Returned value has a number of elements equal to the value returned by get_nperiod

             set_tilt: Alternative dipole_tilt value rather than the geopack tilt.
                       This input can be an M length array, and N length array or a single elemnt.
                       Value can be set to an N length array an M length array or a single element array.
                       N is the number of time elements for the data.  M is the number of periods in the time interval.(determined by the period keyword)
                       If an N length array is provided, the data will be re-sampled to an M length array. Consequently, if
                       the values change quickly, the period may need to be shortened.
                       Notes:
                           1) set_tilt will cause add_tilt to be ignored
                           2) Due to this routine adding IGRF to the returned field, you cannot use set_tilt = 0 and give input
                               position values in SM coordinates; input position values are required to be in GSM coordinates due to the
                               IGRF calculation

             exact_tilt_times (optional):  Set this keyword to avoid grouping similar times (default 10 minutes) and instead
                  recalculate the dipole tilt at each input time

             get_nperiod: Returns the number of periods used for the time interval=  ceil((end_time-start_time)/period)

             geopack_2008 (optional): Set this keyword to use the latest version (2008) of the Geopack
                  library. Version 9.2 of the IDL Geopack DLM is required for this keyword to work.

    Returns: an Nx3 length array of field model data (TS07 + IGRF) or -1L on failure

    Example:
       mag_array = ts07(time_array,pos_array,pdyn_array,dsti_array,yimf_array,zimf_array,w1_array,w2_array,w3_array,w4_array,w5_array,w6_array)
       mag_array = ts07(time_array,pos_array,pdyn_array,dsti_array,yimf_array,zimf_array,w1_array,w2_array,w3_array,w4_array,w5_array,w6_array,period=10)

    Notes:
      1. Relies on the IDL/Geopack Module provided by Haje Korth JHU/APL
          and N.A. Tsyganenko NASA/GSFC, if the module is not installed
          this function will fail.
      2. Sums the contribution from the internal field model and the
          external field model.
      3. Has a loop with number of iterations = (tarray[n_elements(t_array)]-tarray[0])/period
          This means that as period becomes smaller the amount time of this
          function should take will grow quickly.
      4. Position units are in earth radii, be sure to divide your normal
          units by 6371.2 km to convert them.
          6371.2 = the value used in the GEOPACK FORTRAN code for Re

      See Boynton 2011 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2010JA015505
    ;
      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The B-index calculation is implemented in omni2bindex.pro

     $LastChangedBy: jwl $
     $LastChangedDate: 2021-07-28 18:16:15 -0700 (Wed, 28 Jul 2021) $
     $LastChangedRevision: 30156 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/ta15b.pro $

(See external/IDL_GEOPACK/ta15/ta15b.pro)

## TA15B_TEST

[Previous Routine] [Next Routine] [List of Routines]

     ta15b_test

     Purpose: A few tests to verify that the model and the wrapper
     procedures work correctly

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-06-24 09:00:47 -0700 (Fri, 24 Jun 2022) $
     $LastChangedRevision: 30878 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/ta15b_test.pro $

(See external/IDL_GEOPACK/ta15/ta15b_test.pro)

## TA15N

[Previous Routine] [Next Routine] [List of Routines]

    Function: ta15n

    Purpose:  generates an array of model magnetic field vectors from
              a monotonic time series and an array of 3-d position
              vectors

    Input:
             tarray: N array representing the time series in seconds utc since 1970
             rgsm_array: Nx3 array representing the position series in
                 earth radii (required to be in GSM coordinates)
             The following arguments can either be N length arrays or
             single values
             pdyn_array: Solar wind pressure (nanoPascals)
             yimf_array: y component of the interplanetary magnetic field
             zimf_array: z component of the interplanetary magnetic field
             xind_array: N-index parameter (see Newell et al., 2007)

    Keywords:
             period(optional): the amount of time between recalculations of
                 geodipole tilt in seconds(default: 60)
                 increase this value to decrease run time
                 By default, the center (not the start) of the first period is now aligned with the start time.

             add_tilt:  Increment the default dipole tilt used by the model with
                        a user provided tilt in degrees.  Result will be produced with TSY_DEFAULT_TILT+ADD_TILT
                        Value can be set to an N length array an M length array or a single element array.
                        N is the number of time elements for the data.  M is the number of periods in the time interval.(determined by the period keyword)
                        If single element is provided the same correction will be applied to all periods.
                        If an N length array is provided, the data will be re-sampled to an M length array. Consequently, if
                        the values change quickly, the period may need to be shortened.

             get_tilt: Returns the dipole_tilt parameter used for each period.
                       Returned value has a number of elements equal to the value returned by get_nperiod

             set_tilt: Alternative dipole_tilt value rather than the geopack tilt.
                       This input can be an M length array, and N length array or a single elemnt.
                       Value can be set to an N length array an M length array or a single element array.
                       N is the number of time elements for the data.  M is the number of periods in the time interval.(determined by the period keyword)
                       If an N length array is provided, the data will be re-sampled to an M length array. Consequently, if
                       the values change quickly, the period may need to be shortened.
                       Notes:
                           1) set_tilt will cause add_tilt to be ignored
                           2) Due to this routine adding IGRF to the returned field, you cannot use set_tilt = 0 and give input
                               position values in SM coordinates; input position values are required to be in GSM coordinates due to the
                               IGRF calculation

             exact_tilt_times (optional):  Set this keyword to avoid grouping similar times (default 10 minutes) and instead
                  recalculate the dipole tilt at each input time

             get_nperiod: Returns the number of periods used for the time interval=  ceil((end_time-start_time)/period)

             geopack_2008 (optional): Set this keyword to use the latest version (2008) of the Geopack
                  library. Version 9.2 of the IDL Geopack DLM is required for this keyword to work.

    Returns: an Nx3 length array of field model data (TS07 + IGRF) or -1L on failure

    Example:
       mag_array = ts07(time_array,pos_array,pdyn_array,dsti_array,yimf_array,zimf_array,w1_array,w2_array,w3_array,w4_array,w5_array,w6_array)
       mag_array = ts07(time_array,pos_array,pdyn_array,dsti_array,yimf_array,zimf_array,w1_array,w2_array,w3_array,w4_array,w5_array,w6_array,period=10)

    Notes:
      1. Relies on the IDL/Geopack Module provided by Haje Korth JHU/APL
          and N.A. Tsyganenko NASA/GSFC, if the module is not installed
          this function will fail.
      2. Sums the contribution from the internal field model and the
          external field model.
      3. Has a loop with number of iterations = (tarray[n_elements(t_array)]-tarray[0])/period
          This means that as period becomes smaller the amount time of this
          function should take will grow quickly.
      4. Position units are in earth radii, be sure to divide your normal
          units by 6371.2 km to convert them.
          6371.2 = the value used in the GEOPACK FORTRAN code for Re

      See Newell 2007 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2006JA012015

      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The N-index calculation is implemented in omni2nindex.pro

     $LastChangedBy: jwl $
     $LastChangedDate: 2021-07-28 18:16:15 -0700 (Wed, 28 Jul 2021) $
     $LastChangedRevision: 30156 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/ta15n.pro $

(See external/IDL_GEOPACK/ta15/ta15n.pro)

## TA15N_TEST

[Previous Routine] [Next Routine] [List of Routines]

     ta15n_test

     Purpose: A few tests to verify that the model and the wrapper
     procedures work correctly

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-06-24 09:00:47 -0700 (Fri, 24 Jun 2022) $
     $LastChangedRevision: 30878 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/ta15n_test.pro $

(See external/IDL_GEOPACK/ta15/ta15n_test.pro)

## TA15_SUPPORTED

[Previous Routine] [Next Routine] [List of Routines]

     ta15_supported

     Purpose: returns 1 if ta15 is supported (geopack version is 10.0 or higher)

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-05-29 14:11:42 -0700 (Sun, 29 May 2022) $
     $LastChangedRevision: 30836 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/ta15_supported.pro $

(See external/IDL_GEOPACK/ta15/ta15_supported.pro)

## TOMNI2BINDEX

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: tomni2bindex

    Purpose: Generate the B-index parameter for the TA15B field model and store the result in a tplot variable.  Input parameters
        will be smoothed on 30 minute intervals preceding each sample, and interpolated to a common time base before performing the calculation,

    Input:

    Keywords:
             yimf_tvar:  (input) Name of a tplot variable giving the IMF Y component in GSM coordinates, e.g, OMNI_HRO_5min_Y_GSM

             zimf_tvar:  (input) Name of a tplot variable giving the IMF Z component in GSM coordinates, e.g. OMNI_HRO_5min_Z_GSM

             V_p_tvar:   (input) Solar wind (proton) speed, expressed as a scalar, in km/sec, e.g OMNI_HRO_5min_flow_speed

             N_p_tvar:   (input) Solar wind (proton) density, units cm^-3.  e.g. OMNI_HRO_5min_proton_density

             times: (optional input) Array of timestamps at which the index will be calculated.   If not provided, the yimf times will be used.

             newname: (optional) Name of the tplot variable to use for the output.  If not provided, 'b_index' will be used.

    Example:
              tomni2bindex,yimf_tvar='OMNI_HRO_5min_BY_GSM',zimf_tvar='OMNI_HRO_5min_BZ_GSM',V_p_tvar='OMNI_HRO_5min_flow_speed', $
                        N_p_tvar='OMNI_HRO_5min_proton_density',newname='b_index', times=times

    Notes:
      See Boynton 2011 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2010JA015505
    ;
      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The B-index calculation is implemented in omni2bindex.pro

     $LastChangedBy: jwl $
     $LastChangedDate: 2022-01-31 22:37:47 -0800 (Mon, 31 Jan 2022) $
     $LastChangedRevision: 30552 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/tomni2bindex.pro $

(See external/IDL_GEOPACK/ta15/tomni2bindex.pro)

## TOMNI2NINDEX

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: tomni2nindex

    Purpose: Generate the N-index parameter for the TA15N field model and store the result in a tplot variable.  Input parameters
        will be smoothed on 30 minute intervals preceding each sample, and interpolated to a common time base before performing the calculation,

    Input:

    Keywords:
             yimf_tvar:  (input) Name of a tplot variable giving the IMF Y component in GSM coordinates, e.g, OMNI_HRO_5min_Y_GSM

             zimf_tvar:  (input) Name of a tplot variable giving the IMF Z component in GSM coordinates, e.g. OMNI_HRO_5min_Z_GSM

             V_p_tvar:   (input) Solar wind (proton) speed, expressed as a scalar, in km/sec, e.g OMNI_HRO_5min_proton_speed

             times: (optional input) Array of timestamps at which the index will be calculated.   If not provided, the yimf times will be used.

             newname: (optional) Name of the tplot variable to use for the output.  If not provided, 'n_index' will be used.

    Example:
            tomni2nindex,yimf='OMNI_HRO_5min_BY_GSM',zimf='OMNI_HRO_5min_BZ_GSM',V_p='OMNI_HRO_5min_flow_speed',newname='n_index',times=times

    Notes:
      See Newell 2007 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2006JA012015

      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The N-index calculation is implemented in omni2nindex.pro

     $LastChangedBy: jwl $
     $LastChangedDate: 2022-02-03 22:14:10 -0800 (Thu, 03 Feb 2022) $
     $LastChangedRevision: 30558 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/tomni2nindex.pro $

(See external/IDL_GEOPACK/ta15/tomni2nindex.pro)

## TTA15B

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: tt15b

    Purpose:  tplot wrapper for the functional interface to the IDL Geopack
              implementation of the TA15B field model.

    Input:
              pos_gsm_tvar: the tplot variable storing the position in
                  gsm coordinates

    Keywords:
              pdyn(optional): Solar wind pressure(nanoPascals) should either be a
                  string naming a tplot variable or an array or a single
                  value. If a tplot input is used it will be interpolated to
                  match the time inputs from the position var. Non-tplot array values
                  must match the number of times in the tplot input for pos_gsm_tvar

            yimf(optional): y component of the interplanetary magnetic field
                 should either be a string naming a tplot variable or an
                 array or a single value.  If a tplot input is used it will
                 be interpolated to match the time inputs from the position
                 var. Non-tplot array values must match the number of times in the
                 tplot input for pos_gsm_tvar

             zimf(optional): z component of the interplanetary magnetic field
                 should either be a string naming a tplot variable or an
                 array or a single value.  If a tplot input is used it will
                 be interpolated to match the time inputs from the position
                 var. Non-tplot array values must match the number of times in the
                 tplot input for pos_gsm_tvar

             xind(optional)

             parmod(optional): can input the Nx10 parmod array used by the
                 fortran Tsyganenko model instead of inputing parameters as
                 separate arrays. If passed as a raw array it will not be
                 modified or interpolated so be sure its has the correct
                 number of entries. It can also be passed as a tplot variable
                 name in which case it will be interpolated. If values are
                 passed individually and as par, the par values will be overwritten.

             period(optional): the amount of time between recalculations of
                 geodipole tilt in seconds(default: 60)  increase this
                 value to decrease run time

             get_nperiod(optional): Return the number of periods used in the time interval

             newname(optional):the name of the output variable.
                  (default: pos_gsm_tvar+'_bts07') This option is ignored if
                  globbing is used.

             error(optional): named variable in which to return the
                  error state of this procedure call. 1 = success, 0 = failure

             get_tilt(optional):  Set this value to a tplot variable name in which the geodipole tilt for each period will be returned
                  One sample will be returned for each period with time at the center of the period.

             set_tilt(optional): Set this to a tplot variable name or an array of values containing the dipole tilt that should be used.
                  If a tplot input is used it will be interpolated to match the time inputs from the position
                  var. Non-tplot array values must match the number of times in the tplot input for pos_gsm_tvar
                  Notes:
                      1) set_tilt will cause add_tilt to be ignored
                      2) Due to this routine adding IGRF to the returned field, you cannot use set_tilt = 0 and give input
                          position values in SM coordinates; input position values are required to be in GSM coordinates due to the
                          IGRF calculation

             add_tilt(optional): Set this to a tplot variable name or an array of values containing the values to be added to the dipole tilt
                  that should be used for each period. If a tplot input is used it will be interpolated to match the time inputs from the position
                  var. Non-tplot array values must match the number of times in the tplot input for pos_gsm_tvar

             exact_tilt_times (optional):  Set this keyword to avoid grouping similar times (default 10 minutes) and instead
                  recalculate the dipole tilt at each input time

             geopack_2008 (optional): Set this keyword to use the latest version (2008) of the Geopack
                  library. Version 9.2 of the IDL Geopack DLM is required for this keyword to work.

     Output: Stores the result of the field model calculations in tplot variables

     Notes:
            1. converts from normal gsm to rgsm by dividing vectors by earth's
                radius(6371.2 km) ie inputs should be in km
                6371.2 = the value used in the GEOPACK FORTRAN code for Re
            2. Input must be in GSM coordinates
            3. Haje Korth's IDL/Geopack DLM must be installed for this
                procedure to work
            4. either the variables setting parmod or the variables
                setting the individual parameter arrays should be set because
                the defaults aren't scientifically accurate
            5. model parameters that are input as tplot variables they
                will be interpolated to match the time values on the input
                position

      See Boynton 2011 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2010JA015505

      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The B-index calculation is implemented in omni2bindex.pro

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-08-15 09:50:54 -0700 (Mon, 15 Aug 2022) $
     $LastChangedRevision: 31014 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/tta15b.pro $

(See external/IDL_GEOPACK/ta15/tta15b.pro)

## TTA15N

[Previous Routine] [List of Routines]

    Procedure: tt15n

    Purpose:  tplot wrapper for the functional interface to the IDL Geopack
              implementation of the TA15B field model.

    Input:
              pos_gsm_tvar: the tplot variable storing the position in
                  gsm coordinates

    Keywords:
              pdyn(optional): Solar wind pressure(nanoPascals) should either be a
                  string naming a tplot variable or an array or a single
                  value. If a tplot input is used it will be interpolated to
                  match the time inputs from the position var. Non-tplot array values
                  must match the number of times in the tplot input for pos_gsm_tvar

            yimf(optional): y component of the interplanetary magnetic field
                 should either be a string naming a tplot variable or an
                 array or a single value.  If a tplot input is used it will
                 be interpolated to match the time inputs from the position
                 var. Non-tplot array values must match the number of times in the
                 tplot input for pos_gsm_tvar

             zimf(optional): z component of the interplanetary magnetic field
                 should either be a string naming a tplot variable or an
                 array or a single value.  If a tplot input is used it will
                 be interpolated to match the time inputs from the position
                 var. Non-tplot array values must match the number of times in the
                 tplot input for pos_gsm_tvar

             xind(optional)

             parmod(optional): can input the Nx10 parmod array used by the
                 fortran Tsyganenko model instead of inputing parameters as
                 separate arrays. If passed as a raw array it will not be
                 modified or interpolated so be sure its has the correct
                 number of entries. It can also be passed as a tplot variable
                 name in which case it will be interpolated. If values are
                 passed individually and as par, the par values will be overwritten.

             period(optional): the amount of time between recalculations of
                 geodipole tilt in seconds(default: 60)  increase this
                 value to decrease run time

             get_nperiod(optional): Return the number of periods used in the time interval

             newname(optional):the name of the output variable.
                  (default: pos_gsm_tvar+'_bts07') This option is ignored if
                  globbing is used.

             error(optional): named variable in which to return the
                  error state of this procedure call. 1 = success, 0 = failure

             get_tilt(optional):  Set this value to a tplot variable name in which the geodipole tilt for each period will be returned
                  One sample will be returned for each period with time at the center of the period.

             set_tilt(optional): Set this to a tplot variable name or an array of values containing the dipole tilt that should be used.
                  If a tplot input is used it will be interpolated to match the time inputs from the position
                  var. Non-tplot array values must match the number of times in the tplot input for pos_gsm_tvar
                  Notes:
                      1) set_tilt will cause add_tilt to be ignored
                      2) Due to this routine adding IGRF to the returned field, you cannot use set_tilt = 0 and give input
                          position values in SM coordinates; input position values are required to be in GSM coordinates due to the
                          IGRF calculation

             add_tilt(optional): Set this to a tplot variable name or an array of values containing the values to be added to the dipole tilt
                  that should be used for each period. If a tplot input is used it will be interpolated to match the time inputs from the position
                  var. Non-tplot array values must match the number of times in the tplot input for pos_gsm_tvar

             exact_tilt_times (optional):  Set this keyword to avoid grouping similar times (default 10 minutes) and instead
                  recalculate the dipole tilt at each input time

             geopack_2008 (optional): Set this keyword to use the latest version (2008) of the Geopack
                  library. Version 9.2 of the IDL Geopack DLM is required for this keyword to work.

     Output: Stores the result of the field model calculations in tplot variables

     Notes:
            1. converts from normal gsm to rgsm by dividing vectors by earth's
                radius(6371.2 km) ie inputs should be in km
                6371.2 = the value used in the GEOPACK FORTRAN code for Re
            2. Input must be in GSM coordinates
            3. Haje Korth's IDL/Geopack DLM must be installed for this
                procedure to work
            4. either the variables setting parmod or the variables
                setting the individual parameter arrays should be set because
                the defaults aren't scientifically accurate
            5. model parameters that are input as tplot variables they
                will be interpolated to match the time values on the input
                position

      See Newell 2007 for details:
      https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2006JA012015

      TA15B and TA15N model description:
      https://geo.phys.spbu.ru/~tsyganenko/TA15_Model_description.pdf

      The N-index calculation is implemented in omni2nindex.pro

     $LastChangedBy: nikos $
     $LastChangedDate: 2022-08-15 09:50:54 -0700 (Mon, 15 Aug 2022) $
     $LastChangedRevision: 31014 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/IDL_GEOPACK/ta15/tta15n.pro $

(See external/IDL_GEOPACK/ta15/tta15n.pro)