# Presentation: 154604

## SOO/STRC WRF Environmental Modeling System

- Robert Rozumalski
- National SOO Science and Training Resource CoordinatorNOAA/NWS/OCWWS/Training Division/FDTB

- The Static Initialization GUI

## SOO/STRC WRF EMS

- The WRF static initialization GUI (SI GUI) is a graphical tool used to create and modify a computational domain for use with the WRF EMS

- During installation the SI GUI routines will be created
- If build fails precompiled routines will be installed
- To start SI GUI:
- % sigui

## Select

**Select**

## 2. Enter Domain Name

**2. Enter Domain Name**

**3. Select “Next”**

**Notes:**
This step begins the process of defining a computational domain. At this point users must choose from four options on the pull-down menu under 
the instruction “Choose what you want to do”. 

These options allow the user to create, load, copy, or delete a domain. After a domain is created, only then can it be edited, copied, or deleted.

Within the Domain panel are four entry box fields for entering information; 
the domain name; 2) the path to your domain directory; 3) a description of the simulation, and 4) a user description. 

To edit an existing domain, choose the “Load” option from the pull-down menu shown on the Domain panel under the instruction “Choose what you want to do”. 
Then, choose a domain of interest from the list of available domains. This loads an existing domain into the GUI. Everything about an existing domain can be modified 
except for its name.

For the purpose of creating a new domain it is recommended that you follow the steps depicted in the image above. 
After clicking on the "Next" button, you will see the “Horizontal Grid” selection utility.

## 1. Draw Box Around Rough Domain

**1. Draw Box Around Rough Domain**

**2. Select Map Projection**

**4. Select “Update Map”**

**3. Change Center Lat/Lon**

**Notes:**
The Horizontal Grid panel interface allows the user to define a model domain by drawing a bounding 
box on a map (left side) and editing map projection variables (right side). 

You will use this window to draw a box around the general area that will define your computational 
domain and choose a map projection. You will be able to fine-tune the domain in the next window 
so there is no need to be exact here.

The initial global map image above shows a Cylindrical Equidistant projection of the world 

Initially, only the global map is active at this step and all other interface buttons are disabled. As the 
user presses mouse button 1 (left) on the global map and drags the mouse to a new location, a white 
domain-bounding box will be drawn that specifies a domain. 

## SOO/STRC WRF EMS

- The WRF EMS SIGUI has four different map projections
- Polar Stereographic – *Best for high latitudes* (ARW core)
- Lambert Conformal – *Best for mid latitudes* (ARW core)
- Mercator - *Best for low latitudes* (ARW core)
- Rotated Lat/Lon  - (NMM core)
- The map projection will determine the dynamic core used

**Notes:**
The WRF-ARW SI satisfies global domain localizations for three commonly used map projections; 
Lambert Conformal (both tangent and secant), Mercator, and Polar Stereographic. 

The WRF-NMM SI uses a rotated latitude longitude projection. Basic understanding of map projections
 is valuable but not mandatory because the GUI has built-in criteria to suggest to the ARW user a 
projection type based on the domain’s center point latitude value.

Note: As stated previously, your choice for map projection will determine whether you are running the 
NMM or ARW core of the WRF model. If you want to run the NMM core, select “Rot Lat-Lon (NMM)” 
in the Map Projection window. If you want to run the ARW core then you can choose 
“Polar Stereographic”, “Lambert Conformal”, or “Mercator”.

When the user presses "Update Map", both the map and map-editing interface of the Horizontal Grid 
editor are updated. The map is now displayed in projection space based on user-selected information.

## Select “Update Map”

**Select “Update Map”**

**Center Point Changed**

**Notes:**
After You are satisfied with your rough domain select “Update Map”

## 1. Select “Grid and Projection Values”

**1. Select “Grid and Projection Values”**

**Notes:**
At this point you will likely fine-tune your computational domain for your grid dimensions and spacing. 

Click on the “Grid & Projection Values” button, which will allow you to edit these values. 

Pressing the Grid & Projection Values button selects the mode to allow the user to adjust the domain 
bounding box grid values, but it will prevent the user from editing the box graphically.

After selecting the “Grid and Projection Values” button you will be allowed to edit the domain center point, 
NX and NY values, and the grid spacing. The GUI will display the domain on the projection that you selected.

## 2. Select “Update Map”

**2. Select “Update Map”**

**1. Make Desired Changes**

**Notes:**
At the bottom of the map projection interface are four action buttons; Clear, Start Over, Reset Values, and Update Map. 
The Update Map button will draw a map from a domain-bounding box and grid values. The Start Over button will undo all 
commands that updated the originally drawn domain-bounding box into a domain map. 

The Clear button erases the domain-bounding box, returning to the global map that resets all widget values. 

The user can fine-tune the domain bounding box by pressing the Update Map button again to commit to these changes 
or press Reset Values to cancel the pending changes.

## Updated Domain

**Updated Domain**

**1. Select “Next”**

**Notes:**
Once you are happy with your domain continue to the vertical coordinate specification by selecting “Next”. 

There will be a short delay in advancing to the next window as information files and a gif image depicting your domain.

However, if you want to created a nested domain for the ARW core -

## Nest Domain Tab

**Nest Domain Tab**

**Notes:**
Selecting the “Nest Domain” tab will reveal a new window with menus for configuring your nests. 

## Domain ID

**Domain ID**

**Parent ID**

**Ratio**

**Notes:**
Users will be able to draw a nest domain only after they have selected values for the Domain ID, Parent ID, and Grid Space Ratio. 

## Domain 2 (d02) Information

**Domain ID**

**Parent ID**

**Domain 2 (d02) Information**

**Notes:**

First select a nest Domain ID. Since the domain ID of the Mother of all Domains is always 1, the first nested domain you create will have an ID of 2. 
The second nest you create will have an ID of 3.

Next, specify the parent domain with the Parent ID menu. Remember that most values defining a nested domain are specified relative to the parent domain. 
In the above example, domain 2 (d02) is the nest and domain 1 (d01) is the parent. 

Finally, select a Grid Spacing Ratio to Parent value from a list of choices. Note that the default value for the grid space ratio is 3, meaning that the nested 
domain will have a grid spacing 1/3 of that of the parent domain.

Important – This value (3) is the recommended grid space ratio for all ARW core nested domains. Using an even ratio, i.e, 2, 4, 6, etc. may cause your nested run to fail. 
Stick with a ratio of 3; you will be glad you did.

Once these values are chosen, the graphical interface will allow you to draw a nested domain using the mouse cursor. A nest must be at least 5 grid points inside the parent’s 
grid boundary - the GUI will ensure that this limit is not exceeded. Each nest is constrained to have its corner points coincident with grid points of its parent domain, which the 
GUI will also ensure. The corner point values of the nest are displayed in the entry boxes for the lower left I, J, and upper right I, J. As with any domain, you can adjust the nest 
as necessary. The nest can be fine-tuned either by manually editing the text values, or interactively using the mouse cursor to change the nest’s size and shape.

## Domain 3 (d03) Information

**Domain ID**

**Parent ID**

**Domain 3 (d03) Information**

**Notes:**
This example shows a second nested domain (d03) that is also a child of domain 1 (d01). This is an example of having multiple nested domains at the same level.  
You can also have telescoping nests similar to those shown in the next example.

## Domain 4 (d04) Information

**Domain ID**

**Parent ID**

**Domain 4 (d04) Information**

**Notes:**
This image depicts a nested domain (d04) that is the child of domain 02 (d02), which itself is a child of domain 01 (d01). This is an example of telescoping nests. 
Note that the grid spacing for domain 01 (MOAD) is 30km, the spacing for d02 and d04 is 10 and 3.333km respectively.

A few notes: If the GUI will not create the nest that you are trying to draw, look for important information in the User Hints & Information panel. You just may be trying 
to create a child nest completely outside of the (selected) Parent ID domain. This is a common mistake.

Selecting “Delete Nest” will delete all of the information about the nest, its bounding box, and all of the parameters used, to describe the nest, including the Domain ID. 

Selecting “Erase Box” clears the nest bounding box in order for the user to redraw it without having to redefine its Parent ID and Grid Spacing Ratio to Parent. 

Selecting “Restore All Nests” button that loads all nests previously written to disk. If you change a nest value and it has been written to disk, then pressing this button
 reloads the nest(s) to its previous values.

## Drop down menu

**Drop down menu**

**Vertical Levels**

**Notes:**
The Vertical Grid panel allows the user to view sigma levels (left side) and edit these levels (right side). 

The layers represented in the display on the left hand side of the window appear only in the GUI, as additional information
for the user to evaluate sigma level minimum and maximum thickness values.

There are several options for editing the sigma levels. One option allows the user to enter the number of levels, 
choosing one of three sigma level schemes to automatically generate the selected number of levels. 

The options for schemes are to calculate linear levels in sigma, to calculate square root levels in sigma, or to calculate the top 
one-third of the requested levels in linear and the lower two-thirds of the requested levels in square root in sigma. 

A second option is to load an existing file of sigma levels.

A third option allows the user to add or remove sigma levels via a text-editing window.

Pressing “View Levels” processes user inputs and displays the sigma values. A quality control filter eliminates values greater 
than 1.0 and less than 0.0, as well as duplicated and non-numerical values. 
Vertical sigma levels can be displayed in log pressure or not with the press of the "Log Pressure" button.

## 1. Change Menu Option

**1. Change Menu Option**
**2. Specify Number of Levels**

**Increased Vertical Levels**

**3. Select “Next”**

**Notes:**
If you want to change the number of vertical levels the easiest method is to select “Calc Linear in Sigma” from the 
drop-down then edit the number of levels to meet your needs. You should see the levels changing in the box below.

Note: The value for the “Pressure at top of Model (mb)” must be below the top level of data in your initialization and 
boundary condition data sets. Otherwise the model will fail during initialization. The default value (50mb) is fine for most data sets. 

## Only Modifiable Parameters

**Only Modifiable Parameters**

**Select “Next”**

**Notes:**
The only parameters in this section that can be modified via this panel are SILAVWT_PARM_WRF and TOPTWVL_PARM_WRF that defined 
the representation of topography in your run. These parameters are only valid for the ARW core. Some documentation on these 
parameters is available if you are interested

Move past the “Localization Parms” window by selecting “Next” again.

## Select “Localize” to create 

**Select “Localize” to create **
**a computational domain**

**Notes:**
You will now find yourself in the “Localize Domain” window. The only step is to  create a localization and make sure it was successful. 

During the localization, terrain, land use, soil type, etc. information for your domain will be extracted from the files in 
the wrf/data/geog directory and placed in your wrf/runs/<domain>/static directory.

If the localization fails, there will be a warning or error message in the window with more details provided by the wrf/runs/<domain>/log/localization.log file.

## Check if Localization was successful

**Check if Localization was successful**

**Select “File” and **
**“****Exit” to End Session**

**Select “Next” for Domain Graphics**

**Notes:**
At this point you are done; however, you can continue to the next step by displaying some of the static localization files that were created 
for your domain by selecting “Next” and going on to “Domain Graphics”, but it is not necessary. 

To quit, simply select “File” and “exit” from the drop-down window at the upper right of the GUI. Answer yes to both questions and you are done. 

## SOO/STRC WRF Environmental Modeling System

- The End

- The Static Initialization GUI