Thanh Tri Nguyen
Simulation Solution Architect
Engineer at Qarnot, specialized in Computational Fluid Dynamics and Multiphysics
HPC platform
Launch compute tasks in a few lines of code or a few clicks on Tasq, our HPC platform.

Weather Research and Forecast Model on Qarnot Cloud - documentation

November 3, 2021 - Documentation, Numerical simulation

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 yearVersion
20204.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 files - GFS 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.

[video width="736" height="496" mp4="https://blog.qarnot.com/wp-content/uploads/2021/10/blog_U-in-wrfout_d01_2020-09-10_00-00-00.mp4"][/video]

Wrapping up

That’s it! If you have any questions, please contact qlab@qarnot.com and we will help you with pleasure!
You can read more about this use case of Weather Research and Forcast Model on Qarnot here : What will the weather be like tomorrow?

 

 

 

 

Share on networks