Configure WRF


You will first need to create a configuration file for your computer. This file will determine the type of compilation (i.e., parallel or serial), and what compiler to use.




Before you continue, ensure that your computer environment is set up correctly.

Now that you have set up your environment, type:

./configure

You will be given a list of choices for your computer. You must choose the compiler options best suited for your needs, and then you need to choose whether you plan to build in parallel (distributed memory [dmpar], OpenMP shared memory [smpar], or a combination of shared memory and distributed memory [dm+sm]), or serially. Below is an example from a Linux system (*Note: dmpar is the most highly tested and recommended mode for compiling in parallel):

checking for perl5... no
checking for perl... found /usr/bin/perl (perl)
Will use NETCDF in dir: /glade/u/apps/ch/opt/netcdf/4.4.1.1/intel/17.0.1
HDF5 not set in environment. Will configure WRF for use without. PHDF5 not set in environment. Will configure WRF for use without.
Will use 'time' to report timing information
$JASPERLIB or $JASPERINC not found in environment, configuring to build without grib2 I/O...
------------------------------------------------------------------------
Please select from among the following Linux x86_64 options:

1. (serial) 2. (smpar) 3. (dmpar) 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
13. (serial) 14. (smpar) 15. (dmpar) 16. (dm+sm) INTEL (ifort/icc)
17. (dm+sm) INTEL (ifort/icc): Xeon Phi (MIC architecture)
18. (serial) 19. (smpar) 20. (dmpar) 21. (dm+sm) INTEL (ifort/icc): Xeon (SNB with AVX mods)
22. (serial) 23. (smpar) 24. (dmpar) 25. (dm+sm) INTEL (ifort/icc): SGI MPT
26. (serial) 27. (smpar) 28. (dmpar) 29. (dm+sm) INTEL (ifort/icc): IBM POE
30. (serial) 31. (dmpar) PATHSCALE (pathf90/pathcc)
32. (serial) 33. (smpar) 34. (dmpar) 35. (dm+sm) GNU (gfortran/gcc)
36. (serial) 37. (smpar) 38. (dmpar) 39. (dm+sm) IBM (xlf90_r/cc_r)
40. (serial) 41. (smpar) 42. (dmpar) 43. (dm+sm) PGI (ftn/gcc): Cray XC CLE
44. (serial) 45. (smpar) 46. (dmpar) 47. (dm+sm) CRAY CCE (ftn/gcc): Cray XE and XC
48. (serial) 49. (smpar) 50. (dmpar) 51. (dm+sm) INTEL (ftn/icc): Cray XC
52. (serial) 53. (smpar) 54. (dmpar) 55. (dm+sm) PGI (pgf90/pgcc)
56. (serial) 57. (smpar) 58. (dmpar) 59. (dm+sm) PGI (pgf90/gcc): -f90=pgf90
60. (serial) 61. (smpar) 62. (dmpar) 63. (dm+sm) PGI (pgf90/pgcc): -f90=pgf90

Enter selection [1-63] :




Never compiled WRF before?

Pick a serial option, as this will reduce the number of possible problems you run into. Once you are proficient in compiling and running WRF, you can re-configure WRF for a more complex environment that requires a parallel build.

NCAR – Cheyenne Users

Please see Notes for Using Cheyenne.

For 2D Idealized Cases

Always pick a single–threaded, no–nesting option


serial: single processor
smpar: shared memory option (OpenMP)
dmpar: distributed memory option (MPI) **Recommended for parallel**
dm+sm: distributed memory with shared memory (for example, MPI across nodes with openMP within a node) – usually better performance is through dmpar only)




Once you have made your choice, you will be asked the type of nesting run you are interested in:

Compile for nesting? (0=no nesting, 1=basic, 2=preset moves, 3=vortex–following) [default 0]:




The most common option is "basic" (1).
(2) is used for a moving nest in which the user specifies the nest movement using namelist variables - Note: This was originally developed for testing purposes and is possible to use, but is very tedious, as you must specify every move.
(3) is primarily used for moving nests following a hurricane vortex, and the model automatically moves the nest
To read more about moving nests, click here.





The above will create a 'configure.wrf' file. If necessary, you can edit this file, and then save it before compiling. Click here to see an example of a configure.wrf file that was created on NCAR's Cheyenne supercomputer. This file will differ from platform to platform, and from version to version.




After typing './configure', no options are listed, or the options are not for your platform:

This will happen if the code has not been ported to your platform. You will need to add compilation options for your computer.
**Note: This should be for advanced users only




Compiling for Real Data Cases




Compiling for Idealized Data Cases