Weather Forecast Can be Done by Anyone

Each of us complained about the forecasters, when finds to be in the rain without an umbrella. In this article, we will tell you how to make a forecast based on the model WRF (Weather Research & Forecasting Model) for the several days in advance.

A few words about WRF

WRF is a numerical weather prediction model, which is suitable to predict the condition of the atmosphere, as well for research. It has been developed by the community of scientific organizations the United States, including the National Center for Atmospheric and Ocean, the National Center for Atmospheric Research.
It is a system of modules: the preparation module of initial and interfacial data (WRF Preprocessing System), it is the actual determinant core (Advanced Research WRF), the post-processing module (WRF Postprocessing System).
Most part of the model is implemented in the language fortran, which is using the library MPI. Modules are written on C for working with data. The model is available in the source codes.
Naturally, the model consumes an enormous amount of CPU time, and it is designed to run on supercomputers, since the weather forecast is one of the toughest tasks.

How does a model actually work?

We need to download a set of input data (the current state of atmosphere). Then, the we run the preprocessing module, which consists of three programs:

1. geogrid.exe – it processes the static data (topography, soil types, and hydrography);
2. ungrib.exe – it unpacks the initial data;
3. metgrid.exe – it interpolates the received above data in the grid model.

Then core of model starts, which solves nonlinear system of differential equations in the quotient derivative using the numerical methods. It consists of two threaded programs:

1. real.exe – it performs the vertical interpolation of input data;
2. wrf.exe – it is the resolving core.

More information about the mathematics model can be found here.
Then, after calculation, we obtain a set of data, i.e. the prediction of the atmosphere’s condition for a few days ahead with discretization in 1 hour.
Now, we need to process these data and make the slides with the surface temperature, wind, pressure and rainfalls. In fact, wrf produces a large number of fields, but we limit ourselves to only these. For these purposes, we use the program wrfpost.exe from the module of post-processing.

Computational resources

If we don’t have a supercomputer, the model will be calculated for a long time.
At home, we can use Core i5 and i7, more cores - the faster will be calculation, or we can take a couple of 4-core Xeon with 8 GB of RAM for Slackware 12. In addition, it is necessary to install the libraries MPI, for example, MPICH2.
The only requirement - the platform should be x86_64. Otherwise, the preprocessing will not start.
Time spending for the area 3000 x 3000 km (the forecast for 2 days) is listed in the table below.
Step, km. Points. Computation time, hours.

10 301 x 301 10
20 151 x 151 6
30 101 x 101 4

There are some suggestions for setting up

All settings are preset in the files namelist.input and namelist.wps.
Steps by the axes X and Y (settings DX, DY) is better to set the same. The step should depend on the capacities that we have.
The time step DT is recommended setting equal to 9 * DX (in km). DX and DY are set in the meters, and DT in the seconds.

In terms of parameterization (frontier, surface layer, convection, microphysics) is better to keep the recommended settings:
& Physics
mp_physics = 8,8,8
ra_lw_physics = 1,1,1,
ra_sw_physics = 1,1,1,
sf_sfclay_physics = 1,1,1,
sf_surface_physics = 2,2,2,
bl_pbl_physics = 1,1,1,
cu_physics = 1,0,0,

Detailed description of all parameters is given in the user’s guide.

Where can we download?

Here is the official website of model: www.wrf-model.org
Model components: www.mmm.ucar.edu / wrf / users / download / get_sources.html
We recommend downloading a version 3.2.1. A minimum requirement:
WRF model V3.2.1,
WRF Preprocessing System V3.2.1,
WRF Postprocessing System V3.2,
Low-resolution geographical data (10' resolution),
The initial data (resolution of 1 °, the size of the order of 500MB)
: www.nco.ncep.noaa.gov/pmb/products/gfs/
We need to register in order to download the model.
If we want to count by step less than 10 kilometers, we will need to download a more detailed topography.

Program grads (for making the slides) can be taken from the project opengrads.org
User’s guide is in (eng), on-line version + pdf.


We offer the slides below with forecast on a Saturday
1. Wind and the surface temperature at a height of 10 m
2. Surface pressure and precipitation

All pictures are available in the photo album: imgur.com/a/XqBi6
MeLavi 29 september 2011, 13:58
Vote for this post
Bring it to the Main Page


Leave a Reply

Avaible tags
  • <b>...</b>highlighting important text on the page in bold
  • <i>..</i>highlighting important text on the page in italic
  • <u>...</u>allocated with tag <u> text shownas underlined
  • <s>...</s>allocated with tag <s> text shown as strikethrough
  • <sup>...</sup>, <sub>...</sub>text in the tag <sup> appears as a superscript, <sub> - subscript
  • <blockquote>...</blockquote>For  highlight citation, use the tag <blockquote>
  • <code lang="lang">...</code>highlighting the program code (supported by bash, cpp, cs, css, xml, html, java, javascript, lisp, lua, php, perl, python, ruby, sql, scala, text)
  • <a href="http://...">...</a>link, specify the desired Internet address in the href attribute
  • <img src="http://..." alt="text" />specify the full path of image in the src attribute