tar(1) -zxf /path/to/archive.tar.gz dir/subdir --directory $SLURM_TMPDIR
The GNU version of the tar archiving utility
-z, --gzip, --gunzip --ungzip
-x, --extract, --get
      extract files from an archive
-f, --file ARCHIVE
      use archive file or device ARCHIVE
tar [-] A --catenate --concatenate | c --create | d --diff --compare | --delete | r --append | t --list |
    --test-label | u --update | x --extract --get [options] [pathname ...]
-C, --directory DIR
      change to directory DIR
source manpages: tar