I installed the up-to-date ROMS from GitHub.
Below are three sections that should be included only under the SOLVE3D flag.
Yan
Utility/wrt_his.F
#ifdef SOLVE3D
USE extract_slice_mod, ONLY : extract_slice
#endif
Utility/wrt_quick.F
#ifdef SOLVE3D
USE extract_slice_mod, ONLY : extract_slice
#endif
Nonlinear/ini_fields.F
#ifdef SOLVE3D
..........
!
! Compute 3D momentum (ua, va) at RHO-points (A-Grid) for output
! purposes and data assimilation where the observations and state
! vector is located at the cell-center.
!
CALL uv_C2A_grid (ng, tile, iNLM, nstp)
# endif