Versions Compared

Key

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

Weather Research and Forecasting (WRF) model is a well-known atmospheric modeling system developed by NCAR. It is suitable for both meteorological research and operational weather prediction.

...

Module name

Description

Note

WRF/4.4.2-DMSM-cpeCray-23.03

Standard WRF model

Aggressive optimization

WRFchem/4.5.1-DM-cpeIntel-23.09

WRF model with chemistry,
including WRF-Chem tools

Standard optimization

WRFchem/4.5.2-DM-cpeCray-23.03

WRF model with chemistry,
including WRF-Chem tools

(Experimental)
Aggressive optimization

WPS/4.4-DM-cpeCray-23.03

WRF pre-processing system

for WRF 4.4.X

WPS/4.5-DM-cpeIntel-23.09

WRF pre-processing system

for WRF 4.5.X

...

Info

Two complete examples are available at /project/common/WRF/. To run it within a directory, use

  • cp /project/common/WRF/Example1/* . (WRF) or

  • cp /project/common/WRF/Example2/* .

and
  • (WRF-Chem)

then follow the instructions inside the README file. (The Data directory is not needed.)

2. Job submission script

Below is an example of a WRF submission script (submitWRF.sh). It can be created using vi submitWRF.sh.

Code Block
languagebash
#!/bin/bash
#SBATCH -p compute             # Partition
#SBATCH -N 1                   # Number of nodes
#SBATCH --ntasks-per-node=32   # Number of MPI processes per node
#SBATCH --cpus-per-task=4      # Number of OpenMP threads per MPI process
#SBATCH -t 5-00:00:00          # Job runtime limit
#SBATCH -J WRF                 # Job name
#SBATCH -A ltxxxxxx            # Account *** {USER EDIT} *** 

module purge
module load WPS/4.4-DM-cpeCray-23.03
module load WRF/4.4.2-DMSM-cpeCray-23.03

export OMP_STACKSIZE="32M"
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}

ulimit -s unlimited

# *** {USER EDIT} *** #
# Please check that namelist.wps and namelist.input exist where this script is submitted.
link_grib /--Path-to-your-meteorological-data--/
link_vtable /--Name-of-Vtable-to-parse-the-above-met-data--/

# -- WPS -- #
link_wps
srun -n${SLURM_NTASKS} ./geogrid.exe
srun -N1 -n1 ./ungrib.exe
srun -n${SLURM_NTASKS} ./metgrid.exe
unlink_wps

# -- WRF -- #
link_emreal
srun -n${SLURM_NTASKS} ./real.exe
srun -n${SLURM_NTASKS} -c${SLURM_CPUS_PER_TASK} ./wrf.exe
unlink_emreal
Info
  • Additional information regarding ThaiSC support commands for WPS (link_wps, unlink_wps) and WRF (link_emreal, unlink_emreal) can be found by using link_xxx --help, link_xxx --description or man link_xxx, after loading the modules.

  • You could run those WRF/WPS executables (.exe) separately by commenting unrelated lines out, using #, and adjusting your resource requests (#SBATCH) appropriately.

Some physics/dynamics options (and WRF-Chem) DO NOT support hybrid (DM+SM) run. If it is stuck at the beginning. try the following:

  1. Use #SBATCH --cpus-per-task=1 and export OMP_NUM_THREADS=1,

  2. Increase the total number of tasks, for example, #SBATCH --ntasks-per-node=128

  3. Specify the number of tasks for each executable explicitly; for instance, use
    srun -n16 ./real.exe
    srun -n128 -c1 ./wrf.exe or just srun ./wrf.exe

3. Job submission

...

Code Block
languagebash
sbatch submitWRF.sh

4. Post-processing

NCL, NCO, CDO, Ncview, ecCodes, netcdf4-python, wrf-python, pyngl, pynio, and cartopy and others are available for processing NetCDF files. They are installed in Conda environment the netcdf-py39 of Miniconda3Mamba/2223.11.1-10-0 (previously Miniconda3).

To use NCL, for instance,

Code Block
languagebash
module load Miniconda3Mamba/2223.11.10-10
conda activate netcdf-py39

# For NCL only
export NCARG_ROOT=${CONDA_PREFIX}
export NCARG_RANGS=/project/common/WPS_Static/rangs
export NCARG_SHAPEFILE=/project/common/WPS_Static/shapefile  # (If used)

# Commands such as 'ncl xxx' or 'python xxx' for serial run
Note

Please abstain from doing heavy post-processing tasks on LANTA frontend/login nodes.
For more information, visit LANTA Frontend Usage Policy.

5. Advanced topics

Child pages (Children Display)

...

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