Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Updated: 04 January 2024

Table of Contents
minLevel1
maxLevel4
stylecircle

...

1. Load required modules and set environment variables

Paste the whole recipe into your terminal.

Code Block
languagebash
module purge
module load cpeIntel/23.09
module load cray-hdf5-parallel/1.12.2.7
module load cray-netcdf-hdf5parallel/4.9.0.7
module load cray-parallel-netcdf/1.12.3.7
module load libpng/1.6.39-cpeIntel-23.09
module load JasPer/1.900.1-cpeIntel-23.09
module load ADIOS2/2.9.1-cpeIntel-23.09

export WRF_EM_CORE=1    # Explicitly select ARW core developed by NCAR
export WRF_NMM_CORE=0   # Not NMM core
export WRF_CHEM=0       # Select WRF-Chem

export NETCDF=${CRAY_NETCDF_HDF5PARALLEL_PREFIX}
export NETCDFPAR=${CRAY_NETCDF_HDF5PARALLEL_PREFIX}    
export PNETCDF=${CRAY_PARALLEL_NETCDF_PREFIX}           
export HDF5=${CRAY_HDF5_PARALLEL_PREFIX}
export ADIOS2=${EBROOTADIOS2}

export JASPERINC=${EBROOTJASPER}/include              # (Optional)
export JASPERLIB=${EBROOTJASPER}/lib                  # (Optional)
export WRFIO_NCD_LARGE_FILE_SUPPORT=1                 # (Optional)
export PNETCDF_QUILT=1                                # (Optional)

### Common mistake :: insert spaces before or after =

2. Set install location directory (DIR)

Let set an install path, DIR.

Code Block
languagebash
# While being in your desired install location directory, execute
export DIR=$(pwd)

3. Download WRF source code

An example for WRF 4.5.1 is as shown below.

...

Info

For other version, check the WRF stable branches on the GitHub repository and its official website. For WRF 3.X, users have to add ./WRFV3/chem folder with these.

4. Enable GRIB2 IO (Optional)

Note

Must set JASPERINC and JASPERLIB in Step 1

...

Code Block
vi ${DIR}/WRF/arch/Config.pl                  # or Config_new.pl
# Change $I_really_want_to_output_grib2_from_WRF = "FALSE" ; 
#   to   $I_really_want_to_output_grib2_from_WRF = "TRUE" ;

5. Install RTTOV (Optional)

Note

WRFDA 4d-var version 4.5.1 supports up to RTTOV 12.1

...

Code Block
languagebash
export RTTOV=${DIR}/RTTOV

6. Compile WRFPLUS (Optional, only for 4dvar)

  1. Copy the source code and go inside the directory

...

Code Block
languagebash
export WRFPLUS_DIR=$(pwd)

7. Compile WRFDA 4dvar

  1. Copy the source code and go inside the directory

...

  1. Run ls ./var/build/*.exe | wc -l to check if 43 executables were successfully compiled.

  2. Run ls ./var/obsproc/src/*.exe to check if obsproc.exe exists.

8. Example: Job submission script

Code Block
#!/bin/bash
#SBATCH -p compute              # Partition
#SBATCH -N 1                    # Number of nodes
#SBATCH --ntasks-per-node=128   # Number of MPI processes per node
#SBATCH -t 5-00:00:00           # Job runtime limit
#SBATCH -J WRFDA                # Job name
#SBATCH -A ltxxxxxx             # Account *** {USER EDIT} ***

module purge
module load cpeIntel/23.09
module load cray-hdf5-parallel/1.12.2.7
module load cray-netcdf-hdf5parallel/4.9.0.7
module load cray-parallel-netcdf/1.12.3.7
module load libpng/1.6.39-cpeIntel-23.09
module load JasPer/1.900.1-cpeIntel-23.09
module load ADIOS2/2.9.1-cpeIntel-23.09

export OMP_NUM_THREADS=1

ulimit -s unlimited

...

...

Contact Us
ThaiSC support service : thaisc-support@nstda.or.th

...