Thanks for the reply. I choose to use disable-netcdf4 option is due to a failure to compile WRFV4.0 when enable-netcdf option is used.
NETCDF C library with enable-netcdf option can be successfully installed in my UBUNTU desktop. If serial GNU option is used to compile WRFV4.0, then errors prompted:
/usr/bin/ld: /home/user/Library/netcdf/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `hdf5free':
nc4file.c

.text+0x1b): undefined reference to `H5free_memory'
/usr/bin/ld: /home/user/Library/netcdf/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `get_netcdf_type':
nc4file.c

.text+0x72): undefined reference to `H5Tget_class'
/usr/bin/ld: nc4file.c

.text+0x97): undefined reference to `H5Tis_variable_str'
/usr/bin/ld: nc4file.c

.text+0xe5): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0xec): undefined reference to `H5T_NATIVE_SCHAR_g'
/usr/bin/ld: nc4file.c

.text+0xfb): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x12d): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x134): undefined reference to `H5T_NATIVE_SHORT_g'
/usr/bin/ld: nc4file.c

.text+0x143): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x175): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x17c): undefined reference to `H5T_NATIVE_INT_g'
/usr/bin/ld: nc4file.c

.text+0x18b): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x1bd): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x1c4): undefined reference to `H5T_NATIVE_FLOAT_g'
/usr/bin/ld: nc4file.c

.text+0x1d3): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x205): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x20c): undefined reference to `H5T_NATIVE_DOUBLE_g'
/usr/bin/ld: nc4file.c

.text+0x21b): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x24d): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x254): undefined reference to `H5T_NATIVE_UCHAR_g'
/usr/bin/ld: nc4file.c

.text+0x263): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x295): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x29c): undefined reference to `H5T_NATIVE_USHORT_g'
/usr/bin/ld: nc4file.c

.text+0x2ab): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x2dd): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x2e4): undefined reference to `H5T_NATIVE_UINT_g'
/usr/bin/ld: nc4file.c

.text+0x2f3): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x325): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x32c): undefined reference to `H5T_NATIVE_LLONG_g'
/usr/bin/ld: nc4file.c

.text+0x33b): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c

.text+0x36d): undefined reference to `H5open'
/usr/bin/ld: nc4file.c

.text+0x374): undefined reference to `H5T_NATIVE_ULLONG_g'
/usr/bin/ld: nc4file.c

.text+0x383): undefined reference to `H5Tequal'
/usr/bin/ld: /home/user/Library/netcdf/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `read_hdf5_att':
nc4file.c

.text+0x48a): undefined reference to `H5Aget_type'
/usr/bin/ld: nc4file.c

.text+0x4b0): undefined reference to `H5Tget_native_type'
The compile.log file is attached. What should I do?