preview_run is a script in CIMEROOT/CIME/Tools.

$ ./preview_run --help
usage: preview_run [-h] [-d] [-v] [-s] [-j JOB] [caseroot]

Queries key CIME shell commands (mpirun and batch submission).

To force a certain mpirun command, use:
   ./xmlchange MPI_RUN_COMMAND=$your_cmd

   ./xmlchange MPI_RUN_COMMAND='mpiexec -np 16 --some-flag'

To force a certain qsub command, use:
   ./xmlchange BATCH_COMMAND_FLAGS=$your_flags

   ./xmlchange BATCH_COMMAND_FLAGS='--some-flag --other-flag'

positional arguments:
  caseroot           Case directory to query.
                     Default is current directory.

  -h, --help         show this help message and exit
  -d, --debug        Print debug information (very verbose) to file /home/runner/work/cime/cime/CIME/Tools/preview_run.log
  -v, --verbose      Add additional context (time and file) to log messages
  -s, --silent       Print only warnings and error messages
  -j JOB, --job JOB  The job you want to print.
                     Default is (or case.test if this is a test).