WRF-Python

NCL

RIP4

ARWpost

 

WRF-to-GrADS

 

WG6 Home Page

 

 

 

WRF Model GRAPHIC TOOLS : GrADS

Purpose

- Generate 'ieee' files from WRF netCDF files
- All WRF input, output and static (real and idealized data) in netCDF format can be converted
- Make the corresponding grads_control_files

Necessary Software to run Scripts

- Obtain the WRF2GrADS TAR file from the WRF Download page
- GrADS software :You can download and install GrADS from 
 http://grads.iges.org/grads/

Hardware

The code has been ported to the following machines:

- DEC Alpha
- Linux
- Sun
- SGI
- IBM

Steps to Run Scripts

- Unzip and untar the WRF2GrADS TAR file - you will have the following files:

Makefile
README
control_file
control_file_height
control_file_pressure
module_wrf_to_grads_netcdf.F
module_wrf_to_grads_util.F
wrf_to_grads.F

- Compile

- To compile the code, EDIT the Makefile to select the compiler flags for your machine
- make
-
this will create a wrf_to_grads executable

- Edit the control_file:

- set times to be processed
- set variables to be processed
- define the input file
- specify if the input is real/ideal/static data
- set levels to interpolate too

- for extra comment regarding the control file, refer to the README file

- Run

- wrf_to_grads   control_file   MyOutput  [-options]

- This will create a MyOutput.dat and a MyOutput.ctl file for use with GrADS

- There are 2 debug levels (options) available:

-v : low debug option
-V : high debug option (this option will print a lot of output to the screen)
If no debug option is given, only basic information will be printed to the screen

- NOW YOU ARE READY TO VIEW THE OUTPUT WITH GrADS

 

- To help users get started a number of grads scripts have been provided:

- The scripts provided are only examples of the type of plots one can generate with GrADS data.
- The user will need to modify these script to suit their data (Example, if you did not specify 0.25 km and 2 km as levels to interpolate to when you run the "bwave" data through the converter, the "bwave.gs" script will not display any plots, since it will specifically look for these to levels).

- GENERAL SCRIPTS:

cbar.gs
Plot color bar on shaded plots (from GrADS home page)

rgbset.gs
Some extra colors (Users can add/change colors from color number 20 to 99)

skew.gs
Program to plot skewT (modified version of function as found on
http://www.ems.psu.edu/~bryan/mm5/grads/)
TO RUN TYPE: run skew.gs (needs pressure level TC,TD,U,V as input)
User will be prompted if a hardcopy of the plot must be create - 1 for yes and 0 for no.
If 1 is entered a GIF image will be created.
Need to enter lon/lat of point you are interested in
Need to enter time you are interested in
Can overlay 2 different times

- SCRIPTS FOR REAL DATA:

real_surf.gs
Plot some surface data
Need input data on model levels

plevels.gs
Plot some pressure level fields
Need model output on pressure levels

rain.gs
Plot total rainfall
Need a model output data set (any vertical coordinate), that contain fields "RAINC" and "RAINNC"

cross_z.gs
Need z level data as input
Will plot a NS and EW cross section of RH and T (C)
Plots will run through middle of the domain

zlevels.gs
Plot some height level fields
Need input data on height levels
Will plot data on 2, 5, 10 and 16km levels

input.gs
Need WRF INPUT data on height levels

- SCRIPTS FOR IDEALIZED DATA:

bwave.gs
Need height level data as input
Will look for 0.25 and 2 km data to plot

grav2d.gs
Need normal model level data

hill2d.gs
Need normal model level data

qss.gs
Need height level data as input.
Will look for heights 0.75, 1.5, 4 and 8 km to plot

sqx.gs
Need normal model level data a input

sqy.gs
Need normal model level data a input

Trouble Shooting

The code executes correctly, but you get "NaN" or "Undefined Grid" for all fields
when displaying the data.

Look in the .ctl file.

a) If the second line is:
     options byteswapped
Remove this line from your .ctl file and try to display the data again.
If this SOLVES the problem, you need to remove the -Dbytesw option from the Makefile.

b) If the line below does NOT appear in your .ctl file:
     options byteswapped
ADD this lines as the second line in the .ctl file.
Try to display the data again.
If this SOLVES the problem, you need to ADD the -Dbytesw option for the Makefile.

The line "options byteswapped" is often needed on some computers (DEC alpha as an example).
It is also often needed if you run the converter on one computer and use another
to display the data.

 



   
 
Home -- Model System -- User Support -- Doc / Pub -- Links -- Download -- WRF Real-time Forecast