Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

GEMPAK / N-AWIPS

Region of Interest Example

Creating A Region of Interest Mask

A vgf file is created using the interactive product generation tools within NMAP2. A closed line is drawn enclosing the region of interest, and a text label is grouped with the line assigning a value of 1 to the contour.

Once the region of interest is defined, a grid file can be created using the graph-to-grid option in NMAP2, or the GRPHGD stand alone program. As shown below, a grid CMASK is createswhere values greater than 1 are enclosed by the contour. DLINES defines the epsilon of (here -0.5 is used since the contour was drawn counterclockwise) to add to vlaues on either side of the single contour to be define greater / less than the contour value of 1.0.

The grid point values of SGT(cmask,1) (greater than 1.0) as shown below.

The resultant grid can ge used with the MASK() function and logical operators to define mask or clipping regions of interest. As an example, the 24 hour precipitation in the top panel is masked by the region of interest in the lower panel so that only data within the region of interest will be considered.

GDFILE  nam12+2007071900_cmask.grd                                                                                 
GDATTIM f030                                                                                                       
GLEVEL  0                                                                                                          
GVCORD  none                                                                                                       
PANEL   t ! b                                                                                                      
SKIP    0                                                                                                          
SCALE   0                                                                                                          
GDPFUN  p24i ! mask(p24i,sgt(cmask^070719/0000f000+2,1))                                                           
TYPE    f                                                                                                          
CONTUR  3/3                                                                                                        
FINT    .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9                                                      
FLINE   0;21-30;14-20;5

The HIGH function can be used to obtain local maximas from the grid region of interest. The GWFS() gaussian weighted smoothing function can be used to reduce higher frequency features in the grid and focus on broader areas of interest. By using the GDCSV program, the locations of HIGH() output are output to a file for use in determining local mesoscale model domain centers. By masking the region, the model domains are ensured to be within the desired region.

 GDATTIM  = f030
 GDFILE   = nam12|070718/1200 + 2007071900_cmask.grd
 GLEVEL   = 0
 GAREA    = grid
 PROJ     = def
 GVCORD   = none
 GFUNC    = high(mask(gwfs(p24i,40),sgt(cmask^070719/0000f000+2,1)),30)
 SCALE    = 0
 OUTPUT   = t
 GEMPAK-GDCSV>r
     361,     231,        42.4306,       -93.1138,        1.71997
     164,     314,        48.9638,      -123.0159,        0.89088
     514,     238,        41.6641,       -71.5493,        0.67123
     270,     193,        38.1108,      -105.5379,        0.33479
     490,     166,        34.4772,       -76.2753,        0.32275
     418,     141,        32.5794,       -85.9228,        0.13055

The locations of the 2 greatest local maximas are showsn below along with the gaussian weighted precipitation field. The primary and secondary domains are drawn using GPANOT to overlay the boxes.

The resultant hourly precipitation forecast for the 2 greatest maximas above are available as the primary and secondary WRF output runs.
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690