How To Install The WRF Model
How To Install The WRF Model
This installation was successfully tested on a machine with Elementary OS 0.3 (Freya), equivalent to
Ubuntu 14.04 LTS 64-bit almost clean (formatted yesterday). On the other hand, it's a bit of a way
a bit opaque to install it, since we will use precompiled software to carry out the
installation. For now, it works well like this, but it is suggested to try compiling everything
necessary dependencies. A reference is
The provided text is a URL and cannot be translated..
Requirements: An intensive Internet connection (a large amount of data will need to be downloaded),
access to a terminal. At least 5 GB of free disk space (for minimum installation) and 40 GB of
free space (for semi-installation with high-resolution data). The fully installation
complete requires a significant amount of 200 GB free in the system.
Previous: It is recommended to have the latest system updates. This can be done in a
terminal using the command sudo apt-get update && sudo apt-get upgrade. Next, they
I suggest doing the following command executions that should be done before installing/compiling.
1. Open the terminal. Next, type in (followed by Enter on each line). The $ sign at the beginning is
the terminal symbol, therefore DO NOT WRITE IT:
2. $ sudo apt-get install -y m4 csh netcdf-bin netcdf-dev hdf4-tools hdf5-tools zlib*
libjasper libpng-dev build-essential ncl-ncarg mpich cmake make gcc gfortran
libjasper-dev libjasper-runtime openjdk-7-jre
3. $ cd /
$ sudo mkdir /atmos
5. $ sudo chown my_user /atmos(my_user is the username or login of the PC)
6. $ sudo chgrp my_user /atmos
7. $ cd /atmos && mkdir WRF/ && cd WRF/
In this way, the /atmos folder (in the file system or root “/”) will have permissions of
Read-write for the user my_user, and it will not be necessary to use it every time we want.
do something in her.
Before starting the compilation, you need to write a few lines in the personal .bashrc file.
It is the program that controls the BASH command interpreter software). This is done by opening a
text editor like gedit1with the order in terminalgedit ~/.bashrc (pork tail point
bashrc), which will open the document. Put this in the last lines of the program:
## WRF
export NETCDF=/usr
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
export JASPERLIB=/usr/lib/x86_64-linux-gnu
export JASPERINC=/usr/include/jasper
export FC=gfortran
export CC=gcc
1 If you don't have gedit, you can use nano, vi, emacs, kate, etc.
Save the file and type in the terminal exec bash (or restart the terminal) to assimilate the variables
new environments.
Compilation: Download WRF (WRF-ARW, WRF-Chem) and WPS version 3.7 from the website
http://www2.mmm.ucar.edu/wrf/users/download/get_sources.html, and place the extractable ones in the
folder /atmos/WRF. Extract them using -xvzf file.TAR.gz (where file is each one of the
newly downloaded packages). WRF-Chem is a subfolder that should be moved inside the
folder /atmos/WRF/WRFV3/.
Now we must compile the WRF code, since this program comes in source code, and the
the computer only runs object code (executable binaries). Therefore, we open the terminal in the
folder /atmos/WRF/WRFV3 (cd /atmos/WRF/WRFV3) and we write
$./configure
If you REALLY want Grib2 output from WRF, modify the arch/Config_new.pl script.
Right now you are not getting the Jasper library, from the environment, compiled into WRF.
------------------------------------------------------------------------
Please select from among the following Linux x86_64 options:
Enter selection [1-63]: 33 [Comment: I compiled with 33, which is GFORTRAN 64 bit, with
primitive processor parallelization, this means using the 4 cores of my machine to execute
WRF. You can choose between 32 and 35 unless you download a proprietary compiler (like the ...
Intel Fortran Compiler
------------------------------------------------------------------------
Compile for nesting? (1=basic, 2=preset moves, 3=vortex following) [default 1]: 1[default]
(...)
$./compile em_real
And we wait a while for the compilation. When it finishes, a message similar to this will appear:
==========================================================================
build started: Thu May 14 23:07:41 CLT 2015
build completed: Thu May 14 23:21:16 CLT 2015
==========================================================================
With this, we can proceed to compile the WRF Preprocessing System (or WPS). To do this
let's go to the WPS folder (cd /atmos/WRF/WPS) and we type:
$ ./configure
$./compile
The output message from the build is somewhat confusing. I suggest listing the WPS folder with 'ls', and if
If geogrid.exe, ungrib.exe, and metgrid.exe are in it, your compiler did its job well.
After the compilation: Before running WPS you will need data from WPS geography, which is
download fromThe provided text is a URL and does not contain translatable content.If
the connection is slow, you must download Download Lowest Resolution of Each Mandatory Field, which
these are low-resolution data, in addition to Download New Static Data Released With v3.7, those that
they are high-resolution data. However, you can download Download Complete Dataset(a
very large file) to have all the data for WPS, in all resolutions. It must be created
a geog folder in /atmos/WRF (with mkdir geog/ && cd geog/) and go in there.
When downloading it, you must extract it with the command
Now we download and unzip the WRF Domain Wizard (WRF Domain Wizard) from the
websitehttp://esrl.noaa.gov/gsd/wrfportal/DomainWizard.html, which we unpacked in
/atmos/WRF.
And that's it! We have WRF 3.7 installed on our computer. The great joy you will have will be
because the performance of WRF will be dramatically increased, achieving simulations
extremely fast.
Incidents I report: the Geogrid, ungrib, and metgrid buttons were not working on my computer.
If you run ../../WPS/geogrid.exe.. up to metgrid.exe, it works quite well from the terminal.
2 If the run_DomainWizard does not run, you must change the execution permissions as follows:
/atmos/WRF/WRFDomainWizard must be executed chmod +x run_DomainWizard
Image 2: WRF Domain Wizard running on Elementary OS 0.3