Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ASL738

How to run the WRF model


ATTENTION !!

Pre-requirements for running WRF


• Geography data
• FNL data
Please follow the set of instructions shared earlier on how to download FNL data and geographical data.
• Attached below are the best-practices link of namelist.wps and namelist.input. You should go through
them before you jump to start your simulation.

https://www2.mmm.ucar.edu/wrf/users/namelist_best_prac_wps.html
https://www2.mmm.ucar.edu/wrf/users/namelist_best_prac_wrf.html

This being the first time, we are sharing the namelist.wps and namelist.input files. Edit yours accordingly
and carefully. Make sure to use the correct path for the geog_data_path in namelist.wps file. For your next
runs, you can use the Domain Wizard software to define your domain and update or make changes to your
namelist options.
• We will perform our simulation over the domain as
shown in the right. The outermost and coarsest domain
(d01) has a resolution of 30 km. The middle domain
(d02) has a resolution of 10 km and the innermost and
finest domain (d03) has a resolution of 3.33 km and it is
roughly centred around Delhi.

• We will be doing a 3 day run starting from 01.01.2023


00 UTC to 04.01.2023 00 UTC.

• All other options have been mentioned in the namelist.


Please be very careful while editing your own namelists.

Fig. Simulation domains


Steps

1. We will run WPS first. This will prepare the input to WRF for real-data simulations. Go to your WPS-4.4
directory. Do vi namelist.wps and edit it according to the one that has been shared with you and save
changes.
2. Load the modules (module load apps/wrf/deps/intel2019).
3. ./geogrid.exe
Type ls and you can see the ‘geo_em.dxx.nc' - one file for each domain.
4. Link the correct Vtable.
ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable
5. Link the FNL data. Add the path to where you have stored the FNL data in your hpc.
./link_grib.csh /scratch/cas/mtech/username/path_to_data
6. ./ungrib.exe
Output files will be in the form ‘FILE:YYYY-MM-DD_hh’ - one file for each time.
7. ./metgrid.exe
Output from this program will be:- ‘met_em.d0X.YYYY-MM-DD_hh:00:00.nc’ - one file for per time, for each domain
("d0X" represents the domain).

8. Now we will run WRF. Navigate to WRF/test/em_real. Load all modules.

9. Link the met_em files to this directory (Don’t forget the dot in the end. Dot means you are linking the files in your
current directory).

ln –sf /scratch/cas/mtech/username/path_to_met_em_files/met_em.d0* .

10. Type ls and check if met_em files are listed inside WRF/test/em_real

11. Open the namelist.input file and edit it according to the one that has been shared with you. Save the changes.

12. ./real.exe
This takes a short time. Type vi rsl.error.0000 and you find the following message at the end of the file.
‘SUCCESS COMPLETE REAL_EM INIT’.
13. You will have the following output files: ‘wrfinput_dxx’ file for each domain and ‘wrfbdy_d01’.

14. We will run wrf.exe by taking interactive nodes. For your run the following requirements will be
sufficient.
qsub -q low -P cas -I -l select=1:ncpus=6 -l walltime=3:00:00

15. Once your job is ready, navigate to your WRF/test/em_real directory and load the modules again
(module load apps/wrf/deps/intel2019). Next type

mpirun -np 6 ./wrf.exe

16. You can keep a track of your progress by opening a new hpc terminal and navigating to WRF
/test/em_real. Type

tail -f rsl.out.0000

17. If you have completed the run successfully, you can find the following message at the end of
rsl.out.000 file: ‘SUCCESS COMPLETE WRF’.
18. You will obtain the following output files: wrfout_dxx_[initial_date] (one for each domain).

19. Copy the output file of the innermost domain to your local machine using the scp command.
scp wrfout_file username@hpc.iitd.ac.in:/path_to_wrfout_file/ /local_machine_path/
Now edit the filename by editing a .nc extension at the end of the filename.

20. You can now use MATLAB, Python or any other software of your choice to read the output file and
analyse it.

21. The following link will give you an idea about the variables in the wrf_out file.
http://rccdp.unl.edu/portal/WRF_Variable_Table.pdf

You might also like