Home Agenda Lectures Virtual Mtg. Etiquette



  Quick Links

Generating Time Series Output
 

In this exercise you are going to generate time series output (also see wrf/run/README.tslist for additional information) at particular station locations within your domain. This can be useful to see the progression of certain variables are a particular spot.


There is no data pre-processing necessary. As long as you still have wrfinput_d01 and wrfbdy_d01 files from the initial case (co_blizzard) you can continue.

 


 

  1. Edit the namelist.input file


    Notes

    • Use the namelist from the initial case for this exercise. You should have saved it, along with the wrfbdy and wrfinput files from that case in the co_blizzard directory you created at the beginning of the tutorial. Copy all of those files to your running directory.
      cp co_blizzard/namelist.input .
      cp co_blizzard/wrfbdy_d01 .
      cp co_blizzard/wrfinput_d01 .

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


  2. Create the input text file containing station information.




  3. To create time-series output, the model expects a text file in the running directory, named "tslist."

    **The file is format–specific, so to ensure correct formatting, copy a pre-made tslist to your running directory:

    cp /glade/campaign/mmm/wmr/wrf_tutorial/tslist .


    The content of the file looks as follows:

    #-----------------------------------------------#
    # 24 characters for name | pfx  | LAT   | LON   |
    #-----------------------------------------------#
    Boulder                    kbou  40.000  -105.150
    Broomfield                 kbjc  39.550  -105.070
    Denver Airport             kden  39.490  -104.390






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

    If successful, the following time series output files will be generated:
     
    kbou.d01.PH   kbjc.d01.PH   kden.d01.PH
    kbou.d01.PR   kbjc.d01.PR   kden.d01.PR
    kbou.d01.QV   kbjc.d01.QV   kden.d01.QV
    kbou.d01.TH   kbjc.d01.TH   kden.d01.TH
    kbou.d01.TS   kbjc.d01.TS   kden.d01.TS
    kbou.d01.UU   kbjc.d01.UU   kden.d01.UU
    kbou.d01.VV   kbjc.d01.VV   kden.d01.VV
    kbou.d01.WW   kbjc.d01.WW   kden.d01.WW

     
    pfx*.dNN.TS contains time series output of surface variables at each time step, while the other output files contain vertical profile data for geopotential height, potential temperature, water vapor mixing ratio, and wind, at each time step.


    Notes

    • You will have a set of text output files for each pfx you specified in the tslist file.

    • Look in the run/README.tslist file for information about the variables that are output.


     

Check your output:

The new output files generated are text files, so there are many ways you can use them. For this example, plot a time series of surface temperature at the Boulder station.

Inside the test/em_real/ directory there should be another directory called "WRF_NCL_scripts." Copy WRF_NCL_scripts/wrf.ts.ncl to your test/em_real directory. This script has been edited for this case, so all you need to do is run the script  by typing:

ncl wrf.ts.ncl

You should see the following plot on your screen.

Now plot a different variable, like surface pressure. To do that you need some explanation regarding the script:

  1. Reading data
    To read data from the files, you need to know a bit about the file. We know the following about these data:
    • The data we are interested in are in the file kbou.d01.TS
    • There are 19 columns of data in the file
    • All data are real (float) values
    • The file contains one header record
    Therefore we can read data with the NCL function readAsciiTable, i.e.,
        data = readAsciiTable("kbou.d01.TS", 19, "float", 1)


  2. Plotting the data
    First we need to set some plot resources to create a nice plot.
    And again you need to know something about our data before we can generate a plot.
    We know the first column in the file is a domain I.D., the second is the forecast hour, and the 6th record is 2m temperature.
    If we want to plot temperature over time we need columns 2 and 6 (this will be 1 and 5 in NCL). So we can plot the data using:
        plot = gsn_csm_xy(wks,data(:,1),data(:,5),res)


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.