def pack_args(options):
    """Parse and format NERSC-specific command-line options.

    Parameters
    ----------
    :class:`argparse.Namespace`
        The parsed command-line options.

    Returns
    -------
    :class:`list`
        Command-line options that can be appended to an existing command.
    """
    optlist = ("nersc",
               "nersc_queue",
               "nersc_queue_redshifts",
               "nersc_maxtime",
               "nersc_maxnodes",
               "nersc_maxnodes_small",
               "nersc_maxnodes_redshifts",
               "nersc_shifter",
               "mpi_procs",
               "mpi_run",
               "procs_per_node")
    varg = vars(options)
    opts = list()
    for k, v in varg.items():
        if k in optlist:
            if v is not None:
                opts.append("--{0}".format(k))
                if not isinstance(v, bool):
                    opts.append(v)
    return opts