Chapter 6: WRF-Var

 

Table of Contents

 

Introduction

Data assimilation is the technique by which observations are combined with an NWP product (the first guess or background forecast) and their respective error statistics to provide an improved estimate (the analysis) of the atmospheric (or oceanic, Jovian, whatever) state. Variational (Var) data assimilation achieves this through the iterative minimization of a prescribed cost (or penalty) function. Differences between the analysis and observations/first guess are penalized (damped) according to their perceived error. The difference between three-dimensional (3D-Var) and four-dimensional (4D-Var) data assimilation is the use of a numerical forecast model in the latter.

MMM Division of NCAR supports a unified (global/regional, multi-model, 3/4D-Var) model-space variational data assimilation system (WRF-Var) for use by NCAR staff and collaborators, and is also freely available to the general community, together with further documentation, test results, plans etc., from the WRF-Var web-pagehttp://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap6.htm.

Various components of the WRF-Var system are shown in blue in the sketch below, together with their relationship with rest of the WRF system.

xb: first guess either from previous WRF forecast or from WPS/real output.

yo: observations processed by OBSPROC.

B0: background error statistics from gen_be.

In this chapter, you will learn how to run the various components of WRF-Var system. In the online tutorial, you are supplied with a test case including the following input data: a) observation file (in the format prior to OBSPROC), b) WRF NetCDF background file (WPS/real output used as a first guess of the analysis), and c) Background error statistics (climatological estimate of errors in the background file, generated with one-month 200-km resolution CONUS domain runs). In your own work, you have to create all these input files yourselves. See the section Running Observation Preprocessor for creating your observation files. See section Running gen_be for generating your background error statistics file.

Before using your own data, we suggest that you start by running through the WRF-Var related programs at least once using the supplied test case. This serves two purposes: First, you can learn how to run the programs with data we have tested ourselves, and second you can test whether your computer is adequate to run the entire modeling system. After you have done the online tutorial, you can try

 

WARNING: It is impossible to test every code upgrade with every permutation of computer, compiler, number of processors, case, namelist option, etc. The “namelist” options that are supported are indicated in the “WRFDA/Registry/Registry.wrfvar” and these are the default options.

 

 

As a professional courtesy, we request that you include the following reference in any publications that makes use of any component of the community WRF-Var system:

 

Barker, D.M., W. Huang, Y. R. Guo, and Q. N. Xiao., 2004: A Three-Dimensional (3DVAR) Data Assimilation System For Use With MM5: Implementation and Initial Results. Mon. Wea. Rev., 132, 897-914.

Running WRF-Var requires a Fortran 90 compiler. We currently support the following platforms: IBM, SGI, PC/Linux, Cray-X1, and Apple. Please let us know if this does not meet your requirements, and we will attempt to add other machines to our list of supported architectures as resources allow. Although we are interested to hear of your experiences on modifying compile options, we do not yet recommend making changes to the configure file used to compile WRF-Var.

 

Installing WRF-Var

Because WRF-Var codes utilize some features of MPI-2, so if you would like to run WRF-Var with multiple processors, please make sure your MPI compilers are MPI-2 compatible. Otherwise, you can download MPICH2 from http://www.mcs.anl.gov/research/projects/mpich2/, install the MPICH2 in appropriate location and use the installed MPI compiler.

Before compiling the WRF-Var code, it is necessary to have installed the NetCDF, BLAS, LAPACK, and BUFR libraries. If any of the BLAS, LAPACK and BUFR libraries are not available on the computer, they needs to be installed first. The source code for these libraries can be freely downloaded from http://netlib.org/blas/, http://netlib.org/lapack/, and http://www.nco.ncep.noaa.gov/sib/decoders/BUFRLIB/. Assuming, for example, that these libraries have been installed in subdirectories of /usr/local, the necessary environment variables might be set with

setenv BLAS   /usr/local/blas
setenv LAPACK /usr/local/lapack
setenv BUFR   /usr/local/bufr

Hint: Make sure the required libraries were all compiled using the same compiler that will be used to build WRF-Var, since the libraries produced by one compiler may not be compatible with code compiled with another.

Assuming all required libraries are available, the WRF-Var Version 3 source code can be downloaded from http://www.mmm.ucar.edu/wrf/users/download/get_source.html. After the tar file is unzipped (gunzip WRFDAV3.TAR.gz) and untarred (untar WRFDAV3.TAR), the directory WRFDA should be created; this directory contains the WRF-Var source code.

To configure WRF-Var, change to the WRFDA directory and type

> ./configure wrfda

A list of configuration options for your computer should appear. Each option combines a compiler type and a parallelism option; since the configuration script doesn’t check which compilers are actually available, be sure to only select among the options for compilers that are available on your system. The parallelism option allows for a single-processor (serial) compilation, shared-memory parallel (smpar) compilation, distributed-memory parallel (dmpar) compilation, or a combination of shared-memory and distributed-memory parallel (dm+sm) compilation; for WRF-Var, parallel execution requires a “dm” option (see note below). After a selection from the list of options is made, a second choice for compiling nesting will appear. For example, on a Linux computer, the above steps look like:

> ./configure wrfda

checking for perl5... no

checking for perl... found /usr/bin/perl (perl)

Will use NETCDF in dir: /karri/users/xinzhang/external/netcdf/netcdf-3.6.1/pgi_x86_64

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, PGI compiler with gcc  (serial)

   2.  Linux x86_64, PGI compiler with gcc  (smpar)

   3.  Linux x86_64, PGI compiler with gcc  (dmpar)

   4.  Linux x86_64, PGI compiler with gcc  (dm+sm)

   5.  Linux x86_64 i486 i586 i686, ifort compiler with icc  (serial)</