Updated: 18 October 2023
A variant of WRF must be compiled prior to WPS.
(WPS of the same major version as WRF is recommended.)
1. Load required modules and set environment variables
Paste the below lines into your terminal. Don’t forget to specify the path to your local WRF directory, i.e., WRF_DIR.
module purge module load cpeIntel/23.09 module load cray-hdf5-parallel/1.12.2.7 module load cray-netcdf-hdf5parallel/4.9.0.7 module load cray-parallel-netcdf/1.12.3.7 module load libpng/1.6.39-cpeIntel-23.09 module load JasPer/1.900.1-cpeIntel-23.09 export WRF_DIR=../WRF # Path to WRF directory *** {USER EDIT} *** export NETCDF=${CRAY_NETCDF_HDF5PARALLEL_PREFIX} export NETCDFPAR=${CRAY_NETCDF_HDF5PARALLEL_PREFIX} export PNETCDF=${CRAY_PARALLEL_NETCDF_PREFIX} export HDF5=${CRAY_HDF5_PARALLEL_PREFIX} export JASPERINC=${EBROOTJASPER}/include # (Optional) export JASPERLIB=${EBROOTJASPER}/lib # (Optional) ### Common mistake :: insert spaces before or after =
2. Download WPS source code
wget https://github.com/wrf-model/WPS/archive/refs/tags/v4.5.tar.gz tar xzf v4.5.tar.gz mv WPS-4.5 WPS
For older version, check the WPS stable branches and releases on the GitHub repository and its official website.
3. Run ./configure
cd WPS ./configure # Type 39, then press Enter <-- Cray XC CLE/Linux x86_64, Intel compiler (dmpar)
4.3 Edit configure.wps
Open ./configure.wps using a text editor such as vi
Add
-L$(EBROOTLIBPNG)/lib
between -ljasper and -lpngAppend
-Wno-implicit-function-declaration -Wno-implicit-int
tocc
.
vi configure.wps # Change COMPRESSION_LIBS = ... -ljasper -lpng -lz # to COMPRESSION_LIBS = ... -ljasper -L$(EBROOTLIBPNG)/lib -lpng -lz # Change SCC = cc # to SCC = cc -Wno-implicit-function-declaration -Wno-implicit-int
If WRF was compiled with sm+dm option, also append -qopenmp
to WRF_LIB
.
5. Compile WPS
./compile 2>&1 | tee compile.wps.log
6. Check
ls -ls ./*.exe # Check if geogrid.exe, metgrid.exe and ungrib.exe are present ls -ls ./util/*.exe # Check if avg_tsfc.exe, calc_ecmwf_p.exe, g1print.exe, g2print.exe, # height_ukmo.exe, int2nc.exe, mod_levs.exe and rd_intermediate.exe are present ls -ls ./util/*.ncl # Check if gfs.ncl, plotfmt.ncl, plotfmt_nc.ncl and plotgrids.ncl are present
7. Example Job submission script
#!/bin/bash #SBATCH -p compute # Partition #SBATCH -N 1 # Number of nodes #SBATCH --ntasks-per-node=16 # Number of MPI processes per node #SBATCH -t 5-00:00:00 # Job runtime limit #SBATCH -J WPS # Job name #SBATCH -A ltxxxxxx # Account *** {USER EDIT} *** module purge module load cpeIntel/23.09 module load cray-hdf5-parallel/1.12.2.7 module load cray-netcdf-hdf5parallel/4.9.0.7 module load cray-parallel-netcdf/1.12.3.7 module load libpng/1.6.39-cpeIntel-23.09 module load JasPer/1.900.1-cpeIntel-23.09 export OMP_NUM_THREADS=1 ulimit -s unlimited srun -n16 ./geogrid.exe srun -N1 -n1 ./ungrib.exe srun -n16 ./metgrid.exe #srun -n16 ./real.exe #srun ./wrf.exe
Contact Us
ThaiSC support service : thaisc-support@nstda.or.th