Tip 2 for installing WRF on WestGrid at UBC.
Created Jan 2013 by Jesse Mason, for ATSC 507 NWP course at UBC.
The unix commands we use are:
- cd = change directory
- wget = download into the current directory from a web page
- tar = unpack compressed files
- ls = list the contents of a directory
- make = automatically recompiles needed portions of a larger program
Check your unix/linux manual for details.
This assumes that you have previously followed Tip 1 to download the .tar.gz files.
(Hint: you can copy and paste these lines into your terminal window, with changes as indicated inside the { }.
[... WRF]$ cd packages/
[... packages]$ tar -xvzf libpng-1.2.12.tar.gz
[... packages]$ cd libpng-1.2.12
[... libpng-1.2.12]$ ./configure --prefix=/home/{put your own user name here}/WRF/packages/
[... libpng-1.2.12]$ make
[... libpng-1.2.12]$ make install
[... libpng-1.2.12]$ cd ../
[... packages]$ tar -xvzf zlib-1.2.3.tar.gz
[... packages]$ cd zlib-1.2.3
[... zlib-1.2.3]$ ./configure --prefix=/home/{put your own user name here}/WRF/packages/
[... zlib-1.2.3]$ make
[... zlib-1.2.3]$ make install
[... zlib-1.2.3]$ cd ..
[... packages]$ tar -xvzf jasper-1.701.0.tar.gz
[... packages]$ cd jasper-1.701.0
[... jasper-1.701.0]$ export LDFlags=-L~/WRF/packages/lib
[... jasper-1.701.0]$ export CFlags=-L~/WRF/packages/include
[... jasper-1.701.0]$ export CPPFlags=-L~/WRF/packages/include
[... jasper-1.701.0]$ ./configure --prefix=/home/{put your own user name here}/WRF/packages/
[... jasper-1.701.0]$ make
[... jasper-1.701.0]$ make install
[... jasper-1.701.0]$ cd ..
[... packages]$ tar -xvzf netcdf-3.6.3.tar.gz
[... packages]$ cd netcdf-3.6.3
[... netcdf-3.6.3]$ ./configure --prefix=/home/{put your own user name here}/WRF/packages/
[... netcdf-3.6.3]$ make
[... netcdf-3.6.3]$ make install
[... netcdf-3.6.3]$ cd ~
[... ~]$ vi .bashrc {or type "emacs .bashrc &" to add or edit the "module load" and "export" lines to look like this. Save your changes before exiting vi or emacs.}
[... ~]$ module load gcc/openmpi-1.4.3
[... ~]$ export NETCDF=$HOME/WRF/packages
[... ~]$ cd ~/WRF
[... WRF]$ tar -xvzf WRFV3.4.1.TAR.gz
[... ~]$ cd ~/WRF/WRFV3
[... WRFV3]$ export JASPERLIB=$HOME/WRF/packages/lib
[... WRFV3]$ export JASPERINC=$HOME/WRF/packages/include
[... WRFV3]$ ./configure
Choose selection 25
Choose selection 1
[... WRFV3]$ vi configure.wrf {or type "emacs configure.wrf &" to edit the file by adding "44" to 3 lines to look like this. Save your changes before exiting vi or emacs.}
[... WRFV3]$ ./clean
[... WRFV3]$ ./compile em_real {this might take 15 minutes or so}
[... WRFV3]$ cd ~/WRF
[... WRF]$ tar -xvzf WPSV3.4.1.TAR.gz
[... WRF]$ cd ~/WRF/WPS
[... WPS]$ ./configure
Choose selection 1
[... WPS]$ vi configure.wps {or type "emacs configure.wps &" to edit the file by adding "44" to 4 lines to look like this. Save your changes before exiting vi or emacs.}
[... WPS]$ ./clean
[... WPS]$ ./compile {this might take 5 minutes or so}
==================
That's it for now. When you are done, your directories should contain approximately the following, after you cd into the directory and to ls to list the contents:
in WRFV3:
arch configure dyn_em external main README README.NMM README_test_cases run tools
clean configure.wrf dyn_exp frame Makefile README.DA README.rsl_output README.windturbine share
compile configure.wrf~ dyn_nmm inc phys README.io_config README.SSIB Registry test
==================
and in WPS:
arch configure_old geog link_grib.csh namelist.wps~ namelist.wps.nmm ungrib.exe
clean configure.wps geogrid metgrid namelist.wps.all_options netcdf.inc util
compile configure.wps~ geogrid.exe metgrid.exe namelist.wps.fire README
configure fort_netcdf.f geogrid.log namelist.wps namelist.wps.global ungrib
=== end Tip 2 ===