NOTE: The pre-compiled code provided for you has the WRFDA TOOLS package already loaded under var/scripts and var/graphics. The source code does not contain these files, so you should get them from /kumquat/wrfhelp/DATA/WRFDA/WRFDA_tools.tar.gz |
Compiling WRFDA for 3DVAR
Reference: Download the tutorial presentation
Get the WRFDA zipped tar file from /kumquat/wrfhelp/SOURCE_CODE
cd /kumquat/users/${USER}/DA
cp /kumquat/wrfhelp/SOURCE_CODE/WRFDA_V3.7.tar.gz .
Unzip and untar the file:
tar -zxf WRFDA_V3.7.tar.gz
Using ls, you should now see the directory WRFDA, which contains the WRFDA source code.
To reduce compilation time you can compile in parallel (this is a separate process from deciding to run WRFDA in serial or parallel mode). You can do this by setting the environment variable J="-j #", where "#" is the number of processors.
setenv J "-j 6"
Configure and compile
cd /kumquat/users/${USER}/DA/WRFDA
Only one radiative transfer model is necessary, but WRFDA can be compiled with both, so set the CRTM and/or RTTOV environment variables as below
setenv CRTM 1
setenv RTTOV /kumquat/wrfhelp/external/rttov11
./configure wrfda
Choose 34 for GNU (gfortran/gcc), dmpar
./compile all_wrfvar >& compile_3dvar.log &
The ">& compile_3dvar.log" part of the command instructs the terminal to direct all output and error messages from the compile script to the file compile_3dvar.log. The "&" at the end will cause the script to run in the background. You can use the UNIX "tail" command to follow the progress of the script by seeing what's written to the log file (use Ctrl-C to quit tail).
tail -f compile_3dvar.log
Compilation should take about 5 minutes on the classroom computers. When compilation is completed, at the end of the log file you will see "build started:" and "build completed:" indicating the start and finish time for the script. However, this does not mean that compilation was successful! You need to check that all the necessary files were created; use the following command:
ls var/build/*exe var/obsproc/src/obsproc.exe
You should see 44 executables: 43 in the var/build/ directory, plus var/obsproc/src/obsproc.exe. The most important of these is var/build/da_wrfvar.exe; this is the main WRFDA executable.
Compiling WRFPLUS
WRFPLUS contains both the non-linear and the tangent-linear/adjoint WRF code. It is needed for 4DVAR and Forecast Sensitivity to Observations (FSO).
Get the WRFPLUS zipped tar file from /kumquat/wrfhelp/SOURCE_CODE
cd /kumquat/users/$USER/DA
cp /kumquat/wrfhelp/SOURCE_CODE/WRFPLUS_V3.7.tar.gz .
Set "J" to compile in parallel
setenv J "-j 6"
Unzip and untar the file
tar -zxf WRFPLUS_V3.7.tar.gz
Configure
cd /kumquat/users/$USER/DA/WRFPLUSV3
./configure wrfplus
Choose 18 for GNU (gfortran/gcc), dmpar
Compile WRFPLUS
./compile em_real >& compile_wrfplus.log &
Compilation should take 5-10 minutes on the classroom computers. You can use the UNIX "tail" command to follow the progress of the script by seeing what's written to the log file.
tail -f compile_wrfplus.log
When compilation is completed, at the end of the log file you will see " Executables successfully built " if the build was successful, in addition to some timing information.
Compiling WRFDA for 4DVAR
To compile WRFDA for 4DVAR, you should have already compiled WRFPLUS (see above).
Get the WRFDA zipped tar file from /kumquat/wrfhelp/SOURCE_CODE
cd /kumquat/users/$USER/DA
cp /kumquat/wrfhelp/SOURCE_CODE/WRFDA_V3.7.tar.gz .
If you have already built WRFDA in this directory for 3DVAR, be sure to rename that directory first.
mv /kumquat/users/$USER/DA/WRFDA /kumquat/users/$USER/DA/WRFDA_3DVAR
Unzip and untar the file
tar -zxf WRFDA_V3.7.tar.gz
Configure and Compile
cd /kumquat/users/${USER}/DA/WRFDA
./clean -a
Only one radiative transfer model is necessary, but WRFDA can be compiled with both, so set the CRTM and/or RTTOV environment variables as below
setenv CRTM 1
setenv RTTOV /kumquat/wrfhelp/external/rttov11
Set the environment variable WRFPLUS_DIR to point to the WRFPLUS build you just installed
setenv WRFPLUS_DIR /kumquat/users/$USER/DA/WRFPLUSV3
./configure 4dvar
Choose 18 for GNU (gfortran/gcc), dmpar
./compile all_wrfvar >& compile_4dvar.log &
Compilation should take about 5 minutes on the classroom computers. You can use the UNIX "tail" command to follow the progress of the script by seeing what's written to the log file.
tail -f compile_4dvar.log
When compilation is completed, at the end of the log file you will see "build started:" and "build completed:" indicating the start and finish time for the script. However, this does not mean that compilation was successful! You need to check that all the necessary files were created; use the following command:
ls var/build/*exe var/obsproc/src/obsproc.exe
You should see 44 executables: 43 in the var/build/ directory, plus var/obsproc/src/obsproc.exe. The most important of these is var/build/da_wrfvar.exe; this is the main WRFDA executable.
Compiling for CLOUD_CV options
If you want to compile for CLOUD_CV, set the environment variable "CLOUD_CV" equal to 1 before running the configure script.
setenv CLOUD_CV 1
This will work for either 3DVAR or 4DVAR (Setting this option will have no effect on WRFPLUS). Note that this will result in slower code even if you are not using the CLOUD_CV control variable options, so it is recommended that you only use this code for experiments that are using the CLOUD_CV moisture control variables!
|