Find the Bugs
 

For this case we are going to use the default case you have been using, but now the code contains BUGS.
It is your task to find and correct them.

To make this exercise work correctly, it is best to start from new clean code. Get the following tar file and place it in your top-level working directory:  /WRFV3_bugs.TAR.gz

Once you have untarred this file, you will have the following new directory, Find_the_Bugs, which will contain directories WPS and WRFV3. For this exercise, work in these directories.

 

1. Set-up and Run geogrid

  • Make sure you are in the WPS directory.   
     
     
  • We have provided you with a namelist, so do not edit anything; simply start running the code.
     
     
  • Run geogrid:
     
         ./geogrid.exe
     
     
  • Since a number of errors were built in, let's work through them one by one.
    If you have trouble working out the error, mouse over the link to find the solution.
    After you have a fix for the problem - run geogrid.exe again to look for the next one.
     
    1. ERROR: For nest 2, (e_we-s_we+1) must be one greater than an interger multiple of the parent_grid_ratio of 3.
      Hint: This has to do with domain 2's dimensions.
      See if you can correct this, or else see the answer here.
       
    2. ERROR: Could not open /mmm/users/wrfhelp/WPS_GEOG/topo_10m/index
      Hint: Where are your static data located?
      See if you can correct this, or else find the solution here.


      All is fixed! - let's move on to ungrib.

 

2. Set-up and Run ungrib

    Degrib and reformat meteorological data from another model.
     

    So let's run ungrib:
     
         ./ungrib.exe


    You should see the following problems. See if you can figure them out before getting the solution:

    1. ERROR: edition_num: unable to open GRIBFILE.AAA
      Hint: How does ungrib know which data to use?
      Solution


    2. ***** ERROR in Subroutine PARSE_TABLE:
      Problem opening file Vtable.
      File ''Vtable'' does not exist.
      ERROR: ***** Stopping in Subroutine PARSE_TABLE

      Hint: Is there a Vtable available for ungrib to use?
      Solution


    3. ERROR: Data not found: 2007-09-15_00:00:00.0000
      Hint: Look in the directory /kumquat/wrfhelp/DATA/Colorado to see at which times the data are available.
      Solution

       

3. Set-up and Run metgrid

Now let's us run metgrid:
 
     ./metgrid.exe

You should see the following problems. Fix them one at a time untill metgrid runs successfully:

  1. WARNING: Couldn't open file NARI:2006-12-19_12 for input.
    ERROR: The mandatory field TT was not found in any input data.

    Hint: What is the input to metgrid? And what was the output from ungrib?
    Solution
     
  2. Processing domain 2 of 2
    GETH_IDTS: Month of NDATE = 0
    GETH_IDTS: Month of ODATE = 0
    GETH_IDTS: Day of NDATE = 0
    GETH_IDTS: Day of ODATE = 0
    ERROR: Screwy NDATE: 0000-00-00_00:00:00

    Hint: What were domain 2's dates set too?
    Solution

Success - let's move on to the WRF model
 

Set-up WRF

  • Make sure you are in the WRFV3/test/em_real directory.    
     
     
  • Simply start by running real.exe
              real.exe

    You should see the following problems in your 'rsl.error.0000' file. Use the following command to search to take a look at the end of the file:

    tail rsl.error.0000
    Fix the errors one at a time until real runs successfully:



    1. -------------- FATAL CALLED ---------------
      FATAL CALLED FROM FILE: LINE: 406
      error opening met_em.d01.2000-01-24_12:00:00.nc for input; bad date in namelist or file not in directory
      -------------------------------------------

      Hint: 'met_em.d01.2000-01-24_12:00:00.nc'?
      Solution
       
    2. -------------- FATAL CALLED ---------------
      FATAL CALLED FROM FILE: LINE: 406
      error opening met_em.d01.2006-12-19_12:00:00.nc for input; bad date in namelist or file not in directory
      -------------------------------------------

      Hint: Oops - thought we just fixed this one? But look carefully at the file it is complaining about.
      Solution
       
    3. ----------------- ERROR -------------------
      namelist : num_metgrid_soil_levels = 2
      input files : NUM_METGRID_SOIL_LEVELS = 4 (from met_em files).
      -------------- FATAL CALLED ---------------
      FATAL CALLED FROM FILE: <stdin> LINE: 608
      Mismatch between namelist and global attribute NUM_METGRID_SOIL_LEVELS
      -------------------------------------------

      Hint: How many soil levels are coming from the met_em files?
      Solution

       
    4. -------------- FATAL CALLED ---------------
      FATAL CALLED FROM FILE: <stdin> LINE: 727
      input_wrf.F: SIZE MISMATCH: namelist ide,jde,num_metgrid_levels= 74 61 27 ; input data ide,jde,num_metgrid_levels= 75 70 40

      -------------------------------------------

      Hint: Check the dimension sizes set in the WPS namelist and met_em files.
      Solution


 
 That's All Folks, both real and wrf should now run successfully!
 
 


You can now continue to run another practical example.