Home Agenda Lectures Virtual Mtg. Etiquette



  Quick Links

Compile WRF-ARW for Idealized Cases

Obtain the Source Code

  1. If you haven't done so already, create a new directory in your home space called compile, and go into that directory.

  2. Issue the following command to obtain the WRF source code from GitHub:
    git clone --recurse-submodule https://github.com/wrf-model/WRF.git

    Recommended options to compile the code are:

    WRF (dmpar) : INTEL (ftn/icc): Cray XC (dmpar); option 50 – can be used for 3D idealized cases.
    WRF (serial): INTEL (ftn/icc): Cray XC (serial); option 48 – must use for 2d idealized cases




Note

For 2D cases, you must compile the code serially.




Configure WRF

  1. Go into the WRF directory and issue the configure command:
    cd WRF

    ./configure

  2. Pick the machine and its configuration from the list.


    Note

    • For idealized cases, serial compilation is recommended. It is possible, however, to compile the 3D cases in parallel.

    • The 2d cases are indicated with a "2d" in the name; otherwise it is a 3d case (with the exception of the em_scm_xy case, which is a 1d case, and must be compiled serially). For simplicity, we recommend compiling all cases serially for the purpose of this class.


  3. Pick a nesting option.
    Compile for nesting?
    (0=no nesting, 1=basic, 2=preset moves, 3=vortex following) [default 0]:
    For 2d idealized cases pick "No Nesting" (0)



Compile WRF


IMPORTANT NOTE!!

When compiling on Derecho specifically, to avoid saturating the Derecho login nodes with compilation processes and negatively impacting other users, we will run our compilation command on a batch node with the special qcmd command, which launches the specified command on a batch node and returns when the command has finished. So, although you would normally not use "qcmd" when compiling WRF on other systems, for this tutorial we will prefix the usual compilation command with qcmd -A UMMM0005 -- (where UMMM0005 is the computing project we're working under).

  1. Issue the following command to compile:
    qcmd -A UMMM0005 -- ./compile em_test_case -j 6 >& compile.log
    where em_test_case is the ideal test you'd like to compile. See the options in the list below. Untitled Document

    compile em_b_wave
    compile em_convrad
    compile em_fire
    compile em_grav2d_x
    compile em_heldsuarez
    compile em_hill2d_x
    compile em_les
    compile em_quarter_ss
    compile em_scm_xy
    compile em_seabreeze2d_x
    compile em_squall2d_x
    compile em_squall2d_y
    compile em_tropical_cyclone

    This could take 30-60 minutes to complete.


  2. Once it's finished, check to see if the executables are present in the main directory by issuing:
    ls -l main/*.exe
    You should see:
    wrf.exe
    ideal.exe

    If you don't, check log.compile to look for compile errors (search for string 'Error').


    Note

    If you change cases, you will need to recompile the code.


    WRF Tutorial Exercises



    Continue to More Exercises

    If you plan to attempt more exercises right now, you can access the cases studies menu by clicking here.