3DVAR: Configuration

Step 3: Examine the WRFDA code

Now that you have unpacked the WRFDA code, you should see a WRFDA directory in your main folder. This is the directory which contains the WRFDA source code. Enter this directory and examine at the directory structure.

> cd WRFDA
> ls -al
drwxr-xr-x 16 USER users  4096 Apr 11 08:40 .
drwxr-xr-x 14 USER users  4096 Aug 23 16:14 ..
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 arch
-rwxr-xr-x  1 USER users  2235 Feb 28 16:15 clean
-rwxr-xr-x  1 USER users 15053 Jul 22  2011 compile
-rwxr-xr-x  1 USER users 25588 Feb 24 10:49 configure
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 dyn_em
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 dyn_exp
drwxr-xr-x 16 USER users  4096 Apr  6 18:51 external
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 frame
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 inc
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 main
-rw-r--r--  1 USER users 32699 Apr  5 21:41 Makefile
drwxr-xr-x  2 USER users 12288 Apr  6 18:51 phys
-rw-r--r--  1 USER users 12967 Apr  6 18:08 README
-rw-r--r--  1 USER users  7786 Apr  6 16:12 README.DA
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 Registry
drwxr-xr-x  2 USER users  4096 Apr  6 18:51 run
drwxr-xr-x  2 USER users  4096 Apr  6 18:52 share
drwxr-xr-x 19 USER users  4096 Apr  6 18:51 test
drwxr-xr-x  4 USER users  4096 Apr  6 18:51 tools
drwxr-xr-x 12 USER users  4096 Apr  6 18:51 var

Each of these directories and files has a special purpose, but for an introduction we are really only need to know about a few of these:

configure

This script will set up your computer's environment in preparation for compilation. We will go over this in more detail in a moment.

compile

This script calls the Makefile to compile the WRFDA code with the settings you have selected using the configure script and certain environment variables.

clean

This script will clean up the files created by the configure and compile scripts, so that we can easily start over if something goes wrong.

README.DA

This is a "README" file which will contain version information and brief compile/run instructions. This tutorial will go over these instructions in much better detail, so it's best to just ignore this file.

var

This is a directory; it contains all the data-assimilation-related code, some more detailed "README" files, test data, and eventually (after compilation) the necessary executable files. This directory contains a number of subfolders, some of which will be important later on:

build

This is where the WRFDA executables will be found after compilation.

obsproc

This directory contains the "obsproc" utility, which is used for ingesting certain types of data into WRFDA. This will be explained later on.

test

This directory contains a number of sample namelists and data tables, which will be useful later on.

You can read more about the WRFDA source code at the Source Code Help Page.

Step 4: Set up your environment

WRFDA utilizes many external libraries, but only one is necessary for all uses: netCDF. NetCDF stands for Network Common Data Form, and it is a machine-independent file format for storing scientific data. All WRFDA output files are in netCDF format, so the libraries for reading and creating netCDF files are necessary for using WRFDA.

Tip

For more information about netCDF, see the Unidata FAQ

WRFDA will try to automatically find netCDF if you have it installed, but to avoid problems you should set the NETCDF environment variable to point to its location, which is typically in the /usr/local directory:

> setenv NETCDF /usr/local/netcdf

Tip I don't have or don't know if I have netCDF installed
Please see the "NetCDF Help Page" for information.
Tip NetCDF must be installed using the same compilers that you will use to compile WRFDA. Failure to do so will likely lead to compilation problems.

Step 5: Configure WRFDA

WRFDA can be compiled on a wide variety of systems. Because of this, WRFDA must be configured for the particular system you are using. This is achieved using the configure script. This script attempts to determine your system setup, and allows you to choose from several different options. Because the same configuration script is used for all WRF-related products, you must specify that you want to compile WRFDA by issuing the command ./configure wrfda. As an example, this is what this step will look like on a 64-bit Ubuntu Linux system:

> ./configure wrfda
checking for perl5... no
checking for perl... found /usr/bin/perl (perl)
Will use NETCDF in dir: /usr/local/netcdf
PHDF5 not set in environment. Will configure WRF for use without.
$JASPERLIB or $JASPERINC not found in environment, configuring to build without grib2 I/O...
------------------------------------------------------------------------
Please select from among the following supported platforms.
 
   1.  Linux x86_64 i486 i586 i686, PGI compiler with gcc  (serial)
   2.  Linux x86_64 i486 i586 i686, PGI compiler with gcc  (smpar)
   3.  Linux x86_64 i486 i586 i686, PGI compiler with gcc  (dmpar)
   4.  Linux x86_64 i486 i586 i686, PGI compiler with gcc  (dm+sm)
   5.  Linux x86_64, PGI compiler with pgcc, SGI MPT  (serial)
   6.  Linux x86_64, PGI compiler with pgcc, SGI MPT  (smpar)
   7.  Linux x86_64, PGI compiler with pgcc, SGI MPT  (dmpar)
   8.  Linux x86_64, PGI compiler with pgcc, SGI MPT  (dm+sm)
   9.  Linux x86_64, PGI accelerator compiler with gcc  (serial)
  10.  Linux x86_64, PGI accelerator compiler with gcc  (smpar)
  11.  Linux x86_64, PGI accelerator compiler with gcc  (dmpar)
  12.  Linux x86_64, PGI accelerator compiler with gcc  (dm+sm)
  13.  Linux x86_64 i486 i586 i686, ifort compiler with icc  (serial)
  14.  Linux x86_64 i486 i586 i686, ifort compiler with icc  (smpar)
  15.  Linux x86_64 i486 i586 i686, ifort compiler with icc  (dmpar)
  16.  Linux x86_64 i486 i586 i686, ifort compiler with icc  (dm+sm)
  17.  Linux x86_64 i486 i586 i686, Xeon Phi (MIC architecture) ifort compiler with icc (dm+sm)
  18.  Linux x86_64 i486 i586 i686, Xeon (SNB with AVX mods) ifort compiler with icc (serial)
  19.  Linux x86_64 i486 i586 i686, Xeon (SNB with AVX mods) ifort compiler with icc (smpar)
  20.  Linux x86_64 i486 i586 i686, Xeon (SNB with AVX mods) ifort compiler with icc (dmpar)
  21.  Linux x86_64 i486 i586 i686, Xeon (SNB with AVX mods) ifort compiler with icc (dm+sm)
  22.  Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (serial)
  23.  Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (smpar)
  24.  Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dmpar)
  25.  Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dm+sm)
  26.  Linux x86_64 i486 i586 i686, ifort compiler with icc, IBM POE (serial)
  27.  Linux x86_64 i486 i586 i686, ifort compiler with icc, IBM POE (smpar)
  28.  Linux x86_64 i486 i586 i686, ifort compiler with icc, IBM POE (dmpar)
  29.  Linux x86_64 i486 i586 i686, ifort compiler with icc, IBM POE (dm+sm)
  30.  Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (serial)
  31.  Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (dmpar)
  32.  x86_64 Linux, gfortran compiler with gcc (serial)
  33.  x86_64 Linux, gfortran compiler with gcc (smpar)
  34.  x86_64 Linux, gfortran compiler with gcc (dmpar)
  35.  x86_64 Linux, gfortran compiler with gcc (dm+sm)
  36.  Cray XE and XC30 CLE/Linux x86_64, Cray CCE compiler (serial)
  37.  Cray XE and XC30 CLE/Linux x86_64, Cray CCE compiler (smpar)
  38.  Cray XE and XC30 CLE/Linux x86_64, Cray CCE compiler (dmpar)
  39.  Cray XE and XC30 CLE/Linux x86_64, Cray CCE compiler (dm+sm)
  40.  Cray XC30 CLE/Linux x86_64, Xeon ifort compiler (serial)
  41.  Cray XC30 CLE/Linux x86_64, Xeon ifort compiler (smpar)
  42.  Cray XC30 CLE/Linux x86_64, Xeon ifort compiler (dmpar)
  43.  Cray XC30 CLE/Linux x86_64, Xeon ifort compiler (dm+sm)
  44.  Linux x86_64, Fujitsu FX10 mpifrtpx and mpifccpx compilers (serial)
  45.  Linux x86_64, Fujitsu FX10 mpifrtpx and mpifccpx compilers (smpar)
  46.  Linux x86_64, Fujitsu FX10 mpifrtpx and mpifccpx compilers (dmpar)
  47.  Linux x86_64, Fujitsu FX10 mpifrtpx and mpifccpx compilers (dm+sm)

Enter selection [1-47] :

Each line contains several columns of data. All of these data are important, so be sure to pay attention:

    1. Operating system and architecture
    2. Fortran compiler and C compiler
    3. Parallelization option

You should enter the number of the selection you choose (for this simple tutorial, select a "serial" parallelization option), then hit [Enter]. Again, make sure that you choose the same compilers (both FORTRAN and C) that you used to compile your netCDF library. Notice that each compilation option comes with a term tacked on the end in parenthesis: This term represents the parallelization option for your code. For this simple tutorial, select the "serial" option. Compiling with a different parallelization option will be covered in the "Advanced 3DVAR" tutorial.

Tip How do I know which configuration option to choose?
Please see the "Configuration Help Page" for information.

After choosing a compilation option, a long list of settings will be printed to the screen. It is not necessary to know what these mean for now, but you should pay attention to the last few lines. You should see a message similar to this:

Testing for NetCDF, C and Fortran compiler

This installation NetCDF is 64-bit
              C compiler is 64-bit
        Fortran compiler is 64-bit
           It will build in 64-bit

If these lines do not say "32-bit" or "64-bit" at the end, it is possible there is a problem with your netCDF libraries. Check the netCDF Help Page for guidance.

NEXT: Compiling for 3DVAR    
      



Note: This website is currently under construction. If you notice any problems with the website, including but not limited to broken links, formatting errors, or incorrect information, please submit an email to the or wrfhelp@ucar.edu so that we can address the problem. We appreciate your feedback!

 

NOTE: These pages makes use of Java Script. Enable Java on your computer to make use of all the functionality.