The source code is usually independent of the batch system. What matters is the MPI library, and you just need to use whatever MPI library is typically used at your site (which will almost certainly be compatible with SLURM).
Once you have cloned HYCOM-src you need to either select one of the existing config/*relo_mpi files or create a new one for your local system. This depends on the Fortran compiler (e.g. gnu or GF in the filename is gfortran and intel is ifort). In most cases your MPI library will provide a "wrapper" script called mpif90 to take care of invoking the compiler and linking it the MPI library. For example, from config/generic-gnu-relo_mpi:
# common definitions for Generic Intel/AMD, MPI, small memory, real*8
# GNU Fortran: Assumes mpif90 is a wrapper to gfortran for MPI
FC = mpif90
FCFFLAGS = -fPIC -fno-second-underscore -O2 -march=native -mavx -m64 -fdefault-real-8 -fdefault-double-8 -fallow-argument-mismatch
Alan.