Version 23 (modified by MarkelGarcia, 9 years ago) (diff)

--

# Reforecast Tutorial

## How to get WRF4G

The latest official version can get it by direct download WRF4G.tar.gz. Before you get it, you have to check the WRF4G requirements:

• x86_64 Linux
[user@localhost ~]$uname -p x86_64  • Python, version >= 2.4 and < 3.0 [user@localhost ~]$ python -V
Python 2.7.3


See the installation guide for moreover information.

## Quick deploy guide

### Deploy WRF4G

Download and unpack the distribution file into the deployment directory (e.g. $HOME directory). [user@localhost ~]$ cd
[user@localhost ~]$wget http://www.meteo.unican.es/work/WRF4G.tar.gz [user@localhost ~]$ tar xzvf WRF4G.tar.gz


Setup the WRF4G environment.

[user@localhost ~]$export PATH=$HOME/WRF4G/bin:$PATH  In order to avoid typing the export command every time you open a terminal, you should copy it into$HOME/.bashrc.

[user@localhost ~]$echo "export PATH=$HOME/WRF4G/bin:$PATH" >>$HOME/.bashrc


### Verifying

You can verify if WRF4G has been deployed properly by running the following command:

[user@localhost ~]$wrf4g_framework start Starting DRM4G (GridWay) .... OK Starting WRF4G_DB (MySQL) ... OK  If the answers are not satisfactory ("OK"), you should check out the log files: •$HOME/WRF4G/opt/drm4g_gridway/var/gwd.log for DRM4G (GridWay)
• $HOME/WRF4G/var/mysql.log for WRF4G_DB (MySQL). ## How to configure computing resources By default, WRF4G is going to use the local machine as FORK system. [user@localhost ~]$ wrf4g_resources
HID PRI OS              ARCH    NODES(U/F/T) LRMS              HOSTNAME
0   1   GNU/Linux3.8.9  x86_64         0/1/1 FORK              mycomputer


## How to get driving model (NCEP) data.

In this example, the publicly available NCEP Reanalysis (run 1) data are going to be used. This data can be dowloaded from http://nomad3.ncep.noaa.gov/pub/reanalysis-1/6hr in GRIB format. These are monthly files that get updated each month nearly in real time. Two files are needed for each month, one with the pressure level data, labeled "pgb", and other one with 2D data, labeled "grb2d". extdata_path defined in experiment.wrf4g must point to the folder where these files are located. Alternatively, it is possible to write a preprocessor that downloads the data itself. Note that the file names must be parsed by the preprocessor. In this case, if both files are located into the same folder, and provided the extension ".grb" is appended to them, the default preprocessor will parse them correctly, since it looks for monthly files with year/month (YYYY/mm) into their names. For example, the files for December 2010 should be:

grb2d201001.grb
pgb.ft00.201001.grb


## Creating a WRF experiment

### Keeping organized

Before starting to create an experiment, is good practice to create some directories to be tidy. For example, if our project is called "seawind", we can create the following directory hierarchy.

projects/seawind/submit/exp1
projects/seawind/submit/exp2
...
projects/seawind/domains
projects/seawind/data
projects/seawind/scripts
projects/seawind/figures


Of course, many other combinations are possible, depending in the organization of the resources available to the user.

### The test experiment

Before creating a large experiment, with many chunks and realizations, it is convenient to run a smaller test experiment with exactly the same model configuration. This way we can see that everything is working as we want. Frequently, some attempts are needed before WRF runs, because of mistakes in the configuration files or in the set up of input files.

Go to the "submit" folder and create another folder called "sw_test":

cd projects/seawind/submit
mkdir sw_test
cd sw_test


Now we need to copy here the templates of experiment.wrf4g and resources.wrf4g.