Home Agenda Lectures Virtual Mtg. Etiquette



  Quick Links
Output Additional Variables in History File
 

In this example you will output additional variables to the history file that are not automatically output (by default). You can do this by adding 'h' in the I/O column for each variable in the Registry.EM_COMMON file, but that would require issuing a 'clean -a' and then reconfiguring and recompiling the code, which can take a great deal of time. This exercise makes use of the Runtime I/O option, which allows additional output through namelist modifications.

There is no data pre-processing necessary. If you still have wrfinput_d01 and wrfbdy_d01 files from a previous case, you can continue. If not, please return to the Single Domain case and generate these again.



Suppose you want to know how much temperature change is coming from radiation, PBL, cumulus and microphysics. You can output the variables RTHCUTEN, RTHBLTEN, RTHRATEN, and H_DIABATIC to analyze this.

  1. Edit the namelist.input file


    &time_control
    iofields_filename = "myoutfields.txt",
    ignore_iofields_warning = .true.,




    Note

    • The namelist for the standard case is perfect for this example. You just need to make a few changes (see below).

    • To ensure the model runs fast, make sure that max_dom=1.

    • The namelist variable ignore_iofields_warning tells the program what to do if it encounters an error in these user-specified files. The default value, .TRUE., tells it to print a warning message but continue the run. If set to .FALSE., the program will abort if there are errors in these user-specified files.




  2. Now you need to make a .txt file called "myoutfields.txt". Inside that file, declare the variables you wish to output. Inside the "myoutfields.txt" file, simply type:
    +:h:0:RTHCUTEN,RTHBLTEN,RTHRATEN,H_DIABATIC

    Note

    Make sure there are no spaces in the text file, and then save it in the running directory.


  3. No need to run real.exe again, just run wrf.exe.

    If successful, you should see the new variables in your history output (wrfout*). Use 'ncdump -h' to take a look at this file. You can also view the variables using the 'ncview' option.
  4. 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.