Okay, so you tried to configure using the "configure --build-grid2-libs" option, and then recompiled and ungrib was still not created?
Regardless of which compiler you're using, you will still need a working gfortran since much of the code is written for that. I would also recommend NOT using a dmpar option for compiling WPS. Even if you compiled WRF with a dmpar option, you can compile WPS with a serial option, and that should work fine. You would only need a dmpar option if you planned to have very large domains (e.g., 1000s by 1000s of grid cells).
Yes, I tried . /configure --build-grid2-libs and still can't generate ungrib.exe. i think it's still a compiler mismatch problem, i use intel compiler but it always defaults to gnu compiler, so i choose 4 after . /configure , it generated ungrib.exe, but with the following error. But I still want to select intel compiler for compilation, how do I convert it?
module_date_pack.o: In function `date_pack_mp_split_date_char_':
module_date_pack.f90

.text+0x2406): undefined reference to `for_read_int_fmt'
module_date_pack.f90

.text+0x2441): undefined reference to `for_read_int_fmt'
module_date_pack.f90

.text+0x247c): undefined reference to `for_read_int_fmt'
module_date_pack.f90

.text+0x24ba): undefined reference to `for_read_int_fmt'
module_date_pack.f90

.text+0x24f8): undefined reference to `for_read_int_fmt'
module_date_pack.o:module_date_pack.f90

.text+0x2541): more undefined references to `for_read_int_fmt' follow
collect2: error: ld returned 1 exit status
make[1]: [Makefile:85: height_ukmo.exe] Error 1 (ignored)
make[1]: Leaving directory '/public/home/MS24/liuc/wrf/4.6/WPS-4.6.0/util/src'
if [ -h height_ukmo.exe ] ; then \
/bin/rm -f height_ukmo.exe ; \
fi ; \
if [ -h ../height_ukmo.exe ] ; then \
/bin/rm -f ../height_ukmo.exe ; \
fi ; \
if [ -e src/height_ukmo.exe ] ; then \
ln -sf src/height_ukmo.exe . ; \
fi
( cd src ; \
if [ "" = yes ] ; then \
WRF_DIR2=/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1 ; \
else \
WRF_DIR2=/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1 ; \
fi ; \
make -i -r int2nc.exe \
WRF_DIR="$WRF_DIR2" \
FC="mpif90 " \
CC="mpicc" \
CPP="/usr/bin/cpp -P -traditional" \
FFLAGS="-ffree-form -O -fconvert=big-endian -frecord-marker=4" \
CFLAGS="" \
LDFLAGS="" \
CPPFLAGS="-D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UTIL" )
make[1]: Entering directory '/public/home/MS24/liuc/wrf/4.6/WPS-4.6.0/util/src'
/bin/rm -f int2nc.f90
/usr/bin/cpp -P -traditional -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DBIT32 -DNO_SIGNAL -D_MPI -D_UTIL int2nc.F > int2nc.f90
gfortran -ffree-form -O -fconvert=big-endian -frecord-marker=4 -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_netcdf -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib_share -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib1 -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_int -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/inc -I/public/home/MS24/liuc/tools/netcdf-4.9.2/include -c int2nc.f90
int2nc.f90:15.7:
use module_debug
1
Fatal Error: File 'module_debug.mod' opened at (1) is not a GNU Fortran module file
make[1]: [Makefile:81: int2nc.o] Error 1 (ignored)
gfortran -o int2nc.exe -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_netcdf -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib_share -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib1 -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_int -I/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/inc -I/public/home/MS24/liuc/tools/netcdf-4.9.2/include int2nc.o module_debug.o misc_definitions_module.o read_met_module.o cio.o -L/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib1 -lio_grib1 -L/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_grib_share -lio_grib_share -L/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_int -lwrfio_int -L/public/home/MS24/liuc/wrf/4.6/WRF-4.6.1/external/io_netcdf -lwrfio_nf -L/public/home/MS24/liuc/tools/netcdf-4.9.2/lib -lnetcdff -lnetcdf
gfortran: error: int2nc.o: No such file or directory
make[1]: [Makefile:76: int2nc.exe] Error 1 (ignored)
make[1]: Leaving directory '/public/home/MS24/liuc/wrf/4.6/WPS-4.6.0/util/src'
if [ -h int2nc.exe ] ; then \
/bin/rm -f int2nc.exe ; \
fi ; \
if [ -h ../int2nc.exe ] ; then \
/bin/rm -f ../int2nc.exe ; \
fi ; \
if [ -e src/int2nc.exe ] ; then \
ln -sf src/int2nc.exe . ; \
fi