0% found this document useful (0 votes)
24 views6 pages

How To Install The WRF Model

This document provides instructions for installing the WRF (Weather Research and Forecasting Model) version 3.7 on Ubuntu 14 or higher systems. It describes the requirements, how to configure the environment variables, and the steps to download, compile, and install WRF and its preprocessing system WPS. The process takes several hours and requires disk space to store the resulting binary files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views6 pages

How To Install The WRF Model

This document provides instructions for installing the WRF (Weather Research and Forecasting Model) version 3.7 on Ubuntu 14 or higher systems. It describes the requirements, how to configure the environment variables, and the steps to download, compile, and install WRF and its preprocessing system WPS. The process takes several hours and requires disk space to store the resulting binary files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

How to install the WRF (Weather Research and Forecasting Model)

version 3.7 on Ubuntu 14 (or higher) systems or similar

Document version 1. Thursday, May 14, 2015.


Queries [email protected]
Based on the blog post Tux Coder
(I cannot access external links.)

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

And this is the output

checking for perl5... no


checking for perl... found /usr/bin/perl (perl)
Will use NETCDF in dir: /usr
PHDF5 not set in environment. Will configure WRF for use without.
Will use 'time' to report timing information

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:

1. (serial) 2. (smpar) 3. (dpmark) 4. (dm+sm) PGI (pgf90/gcc)


5. (serial) 6. (smpar) 7. (dmpar) 8. (dm+sm) PGI (pgf90/pgcc): SGI MPT
9. (serial) 10. (smpar) 11. (dmpar) 12. (dm+sm) PGI (pgf90/gcc): PGI accelerator
(serial) INTEL (ifort/icc)
17. (dm+sm) INTEL (ifort/icc): Xeon Phi (MIC
architecture
(serial) INTEL (ifort/icc): Xeon (SNB with AVX
mods)
serial INTEL (ifort/icc): SGI MPT
serial INTEL (ifort/icc): IBM POE
30. (serial) 31. (dmpar) PATHSCALE (pathf90/pathcc)
(serial) GNU (gfortran/gcc)
(serial) IBM (xlf90_r/cc_r)
serial PGI (ftn/gcc): Cray XC CLE
(serial) CRAY CCE (ftn/gcc): Cray XE and XC
serial INTEL (ftn/icc): Cray XC
(serial) PGI (pgf90/pgcc)
serial PGI (pgf90/gcc): -f90=pgf90
(serial) PGI (pgf90/pgcc): -f90=pgf90

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]

(...)

At the end, it will show messages of correct configuration. To compile, we write

$./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

---> Executables successfully built <---

-rwxrwxr-x 1 david david 37724549 May 14 23:21 main/ndown.exe


-rwxrwxr-x 1 david david 37589367 May 14 23:21 main/real.exe
-rwxrwxr-x 1 david david 37172169 May 14 23:21 main/tc.exe
-rwxrwxr-x 1 david david 42145965 May 14 23:20 main/wrf.exe

==========================================================================

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

The output on the screen is similar:

Will use NETCDF in dir: /usr


Found Jasper environment variables for GRIB2 support...
/usr/lib/x86_64-linux-gnu/
$JASPERINC = /usr/include/jasper/
------------------------------------------------------------------------
Please select from among the following supported platforms.

1. Linux x86_64, gfortran (serial)


2. Linux x86_64, gfortran (serial_NO_GRIB2)
3. Linux x86_64, gfortran (dmpar)
4. Linux x86_64, gfortran (dmpar_NO_GRIB2)
5. Linux x86_64, PGI compiler (serial)
6. Linux x86_64, PGI compiler serial_NO_GRIB2
7. Linux x86_64, PGI compiler (dmpar)
8. Linux x86_64, PGI compiler (dmpar_NO_GRIB2)
9. Linux x86_64, PGI compiler, SGI(serial) MPT
10. Linux x86_64, PGI compiler, SGI(serial_NO_GRIB2)
MPT
11. Linux x86_64, PGI compiler, SGI(dmpar) MPT
12. Linux x86_64, PGI compiler, SGI(dmpar_NO_GRIB2)
MPT
13. Linux x86_64, IA64 and Opteron (serial)
14. Linux x86_64, IA64 and Opteron (serial_NO_GRIB2)
15. Linux x86_64, IA64 and Opteron (dmpar)
16. Linux x86_64, IA64 and Opteron (dmpar_NO_GRIB2)
17. Linux x86_64, Intel compiler(serial)
18. Linux x86_64, Intel compiler(serial_NO_GRIB2)
19. Linux x86_64, Intel compiler(dmpar)
20. Linux x86_64, Intel compiler(dmpar_NO_GRIB2)
21. Linux x86_64, Intel compiler, SGI serialMPT
22. Linux x86_64, Intel compiler, SGI (serial_NO_GRIB2)
MPT
23. Linux x86_64, Intel compiler, SGI (dmpar)
MPT
24. Linux x86_64, Intel compiler, SGI (dmpar_NO_GRIB2)
MPT
25. Linux x86_64, Intel compiler, IBM (serial)
POE
26. Linux x86_64, Intel compiler, IBM (serial_NO_GRIB2)
POE
27. Linux x86_64, Intel compiler, IBM (dmpar)
POE
28. Linux x86_64, Intel compiler, IBM (dmpar_NO_GRIB2)
POE
29. Linux x86_64 g95 compiler(serial)
30. Linux x86_64 g95 compiler(serial_NO_GRIB2)
31. Linux x86_64 g95 compiler(dmpar)
32. Linux x86_64 g95 compiler(dmpar_NO_GRIB2)
33. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial)
34. Cray XE/XC CLE/Linux x86_64, Cray compiler (serial_NO_GRIB2)
35. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar)
36. Cray XE/XC CLE/Linux x86_64, Cray compiler (dmpar_NO_GRIB2)
37. Cray XC CLE/Linux x86_64, Intel compiler (serial)
38. Cray XC CLE/Linux x86_64, Intel compiler (serial_NO_GRIB2)
39. Cray XC CLE/Linux x86_64, Intel compiler (dmpar)
40. Cray XC CLE/Linux x86_64, Intel compiler (dmpar_NO_GRIB2)

Enter selection [1-40] : 3[option I used]

Now, at the end, we must compile with the following command:

$./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.

Now we have compiled the program.

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

$tar -xjf ../geog_minimum.tar.bz2

Be patient as there are quite a few data for the decompression.

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.

Finally, we must create a folder Domains in /atmos/WRF, and configure the


run_DomainWizard2

Image 1: WRF Domain Wizard Setup

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

Image 3: WRF running on Elementary OS 0.3

You might also like