tar -zxvf WPS-3.9.tar.gz
cd WPS-3.9
export WRFIO_NCD_LARGE_FILE_SUPPORT=1 export NETCDF=/path/to/install/NETCDF export HDF5=/path/to/install/HDF5 export PNETCDF=/path/to/install/PNETCDF export CPPFLAGS="-I$HDF5/include -I$PNETCDF/include -I$NETCDF/include" export LDFLAGS="-L$HDF5/lib -L$PNETCDF/lib -L$NETCDF/lib -lnetcdf -lnetcdff -lpnetcdf -lhdf5_hl -lhdf5 -lz" unset MPI MPI_DIR MPI_INC export WRF_DIR=/path/to/install/WRF
vi arch/configure.defaults
修改128-136行,修改后如下图,红色线条表示修改地方。
echo 3 | ./configure
vi configure.wps
修改WRF_DIR为WRF路径,在WRF_LIB末尾加“-lomp”。
./compile
结果回显如下,编译成功后会在当前目录下生成三个exe可执行文件。