Here I am going to explain the very simple steps to install The Weather Research & Forecasting Model (WRF) model in Ubuntu or any Linux Distributions.
$ sudo apt-get install m4 csh netcdf-bin hdf4-tools hdf5-tools zlib* jasper libpng-dev build-essential ncl-ncarg gcc gfortran libnetcdf-dev mpich
$ sudo updatedb
$ locate netcdf.inc
Here we got path where netcdf.inc file present and then we need export the path (till before include directory) to NETCDF environment variable in home .bashrc .
In some machines, it may be /usr/local/include/netcdf.inc, in which case export NETCDF directory path upto /usr/local/ .
Add the following lines in your home .bashrc
$ vim ~/.bashrc
# WRF SETTINGS
Save it !
$ source ~/.bashrc
Download latest WRF model sources from http://www2.mmm.ucar.edu/wrf/users/download/get_sources.html
I downloaded v3.6.1 WRF-ARW and WPS and extracted.
$ cd WRFV3
Select option relevant to your system linux configuration (like i386 or x64_86), fortran type (like gfortran or ifort or pgfortran) and processors (like parallel or serial).
Select GNU GCC option if you want to use GNU GCC compiler!
select model support option (like 1 for basic which I chosed)
$ ./compile em_real
Read the README file of WRFV3 to know more options to compile model.
$ cd ..
$ cd WPS
Select option relevant to your system linux configuration (like i386 or x64_86), fortran type (like gfortran or ifort or pgfortran) and Grib type (like 1 or 2).
Read the README files of WPS to compile further with plotting tools (like NCL).
PS: This compilation progress need atleast 2 GB RAM without swap, or maybe 512 MB RAM + SWAP 2 GB
Centre for Atmospheric Sciences
Indian Institute of Technology Delhi
My Experiments In Gnu/Linux ! : https://tuxcoder.wordpress.com