User Tools

Site Tools


How to Run a VOLC-WRF-Chem Forecast

This page covers the initialization of WRF-Chem using Prep Sources Chem 1.2, and running the WRF-Volc code modified by Dr. Chang Ki Kim.

Start by extracting the WRFV3.4_volc.tar file using tar -xvf WRFV3.4_volc.tar

Configuring and Running Prep-Sources-Chem-1.2

For the purposes of this tutorial, we will run the Kasatochi eruption of 2008. This is done on Pacman, but should be similar if run on Fish or your local computer

  • Enter the ./src/ directory in the prep sources chem folder
  • cat * | grep KASA
  • Output shows the latitude and longitude of the Kasatochi case (52.1770, -175.52080) and the number of the volcano in the listing, which for Kasatochi is 919.
  • The eventX folder contains a blank run. Create a new directory (kasatochi here) and copy eventX to it.
  • Enter the new folder (cd kasatochi)
  • vim prep_chem_sources.inp
  • Edit the start time and date
  • Enter the variables data list into the use_these_values variable. Here, I set use_these_values='Kasatochi.txt'
  • Enter the volcanic case: volcano_index = 919, !KASATOCHI
  • Enter the begin_eruption value. Kasatochi is begin_eruption='200808072200'
  • Make sure that GOCART, EDGAR and RETRO are all enabled. Also ensure that the directories pointing to these databases are correct. (THESE WILL CHANGE WITH THE $WORKDIR-$CENTER CHANGE!)
  • Input the number of grids, the number of x and y grid points, etc. Also change the dx and dy.
  • Enter the appropriate lat and lon into POLELAT POLELON, STDLAT1 STDLAT2, CENTLAT and CENTLON. (ie POLELAT = 52.1770, POLELON = -175.05080 for Kasatochi)
  • Enter an appropriate output name, and make sure the chem_out_format is 'vfm'. Here I set chem_out_prefix to be KASATOCHI.
  • Create a text file which contains the eruption information, as well as the particle size distribution in this order:
  • Height in meters, duration in seconds, mass in kg, height above vent in meters
  • Kasatochi would look like this.
  • 13686. 6012. 4.56e+10. 314.
  • 22. 5. 4. 5. 24.5 12. 11. 8. 5. 3.5
  • run prep_chem_sources_RADM_WRF_FIM.exe
  • Binary files will be created in the directory. You will use these in your WRF-Chem runs under the test/em_real folder as symbolic links.

Setting up WPS and WRF for Given Domain

You need to obtain GFS data (.fnl files) for WPS. Download these, ungrib, geogrid and metgrid them. Link the metem files to symbolic links in your test/em_real directory. To do this, I create a subdirectory in the WPS directory where I store my .fnl (or NARR) files. I do the following steps:

  • Edit the namelist.wps file so that your lat, long, dx, dy, times, etc match those of the domain you entered for Prep Sources Chem, and that you will use in your WRF simulation.
  • Create symbolic links for all your .fnl files stored in your subdirectory. To do this, use the link_grib.csh shell script. ./link_grib.csh ./GFS/* – This will link all the of *.fnl files in the directory named GFS
  • Run the following:
  • ./ungrib.exe
  • ./geogrid.exe
  • ./metgrid.exe
  • After metgrid.exe is finished, change to your test/em_real directory.
  • Create symbolic links for all your met_em files which were generated by met_grid, ie ln -sf ../../WPS/met_em* ./
  • Edit your namelist.input. This should be self explanatory, however include the following:
  • Under &time_control, include:
    io_form_auxinput8                   = 2
    auxinput8_interval_m                = 86400, 60, 60
    auxinput8_inname                    = "wrfchemi_gocart_bg_d01"
  • Under &chem, chem_opt must be set to 0 for the first run of real.exe

*REMEMBER* If you want to use another file format, such as NARR/AWIPS/whatever, you need to link the variable table for that type to the Vtable file located in the WPS directory. Pre-made variable tables can be found in /ungrib/Variable_Tables directory, and should be symbolically linked to the ./Vtable file in the WPS directory.

Setting up Eruptions in volc_d01.asc

The volc_d01.asc file (not to be confused with the volc_d01 binary file generated by Prep Sources Chem) contains the eruption size distributions, times, rates, heights and duration for ash, sulfur dioxide and water. Here is an example:

0.207 0.055 0.042 0.059 0.232 0.117 0.109 0.081 0.053 0.045
200808071401 60   14478 0.000e+00 2.360e+05 2.000e+03
200808071750 30   14478 0.000e+00 2.000e+04 2.000e+03
200808072035 30   14478 0.000e+00 3.000e+04 3.000e+03

If you specify a non-zero ERUPTIONA, then Mastin's Formula for mass will not be used. Above, we set it to 0, and thus mass will be calculated using the formula.

Linking Prep Sources Chem Files

Make sure to symbolically link the Prep Sources Chem files to the appropriate destination links in the test/em_real directory.

*g1-ab.bin links to emissopt3_d01 *g1-volc.bin links to volc_d01 *g1-gocartBG.bin links to wrf_gocart_backg

Running WRF for Given Domain

  • Run real.exe, ./real.exe >& real.out & and follow with tail -f rsl.error.0000
  • When finished, remove the rsl files (rm *rsl*)
  • Enter the namelist and set chem_opt = 402
  • Run convert_emiss, ./convert_emiss.exe >& emi.out &
  • Tail this file like above. When finished, remove the rsl files as above
  • Submit a PBS file to Pacman. Using qmap will show you the amount of available nodes. Tailor your PBS file to this information, such as:
#PBS -q standard_16     
#PBS -l walltime=2:00:00 
#PBS -l nodes=10:ppn=16 
#PBS -j oe


rm rsl.*

# WRF/Chem run
mpirun ./wrf.exe
echo "wrf.exe/chem finished: `date`"

Follow your Run and Analyze

You can use the tail -f rsl.error.0000 method to follow your program. If you would like to follow volcanic information, you can do a grep -i eruption *rsl* to find which rsl file contains the eruption information. You can then tail this file instead.

howtovolccase.txt · Last modified: 2016/04/15 15:24 by martin