< Back

# Weather Research and Forecast Model on Qarnot – documentation

by Thanh Tri Nguyen - November 3, 2021 - Documentation

# Introduction

The Weather Research and Forecast Model (WRF) is an open source weather simulation software that gives forecasts from actual or idealised conditions. It is used extensively by research laboratories and forecasting centers around the world. It also includes modules for data assimilation (WRFDA), hydrology (WRF-Hydro) and air pollution (WRF-CHEM). Running your Weather Research and Forcast Model simulation on Qarnot is as easy as uploading your case and launching a script. Here’s a walk-through of the different steps.

# Versions

The test case uses Weather Research and Forcast Model 4.2.1.

Release year Version
2020 4.2.1

If you are interested in another version, please send us an email at qlab@qarnot.com.

# Test case

Please ensure that you have created a Qarnot account here.

This test case is based on a 36 hours weather prediction of France. You can download the files here and here, which contains the following files :

• DATA folder –  the initial grib files needed by the ungrib program.
• GFS filesGFS outputs from 2020, September 10th until September 11th, 12pm.
• namelist.input  – a configuration file corresponding to the above shared data, which defines the parameters setup for the WRF package execution.
• namelist.wps  – a file which defines the parameters setup for WPS.
• running_script.sh – a bash script that includes all commands needed to run the case, from setting up the WPS environment to the execution of the file wrf.exe.

You should put those four items in the same folder and call it france. Please note that it needs to be unzipped before it can be used on Qarnot.

# Launching the case

Before starting a calculation with the Python SDK, a few steps are required:

• Retrieve the authentication token (here)
• Install Qarnot’s Python SDK (here)

Note: in addition to the Python SDK, Qarnot provides C# and Node.js SDKs and a Command Line.
Once everything is set up, the following script needs to be used to start the calculation.

Be sure you have copied your authentication token in the script (instead of <<<MY_SECRET_TOKEN>>>) to be able to launch the task on Qarnot.

wrf.py

To launch this script, simply copy the preceding code in a Python script, put it at the same level as the france folder and execute python3 wrf.py & in your terminal.

# Results

At any given time, you can monitor the status of your task on the general web interface, Console. The following figure shows a successful Weather Research and Forcast Model demo simulation on Qarnot’s Console.

You should also now have a result folder in the output bucket and on your computer containing all the numerical results. You can open the wrfout_d01_2020-09-10_00:00:00 file with any software that can read NetCDF files to view the results.