Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Exact meaning of attributes in wrfinput.d01 file

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

luckyuu_

New member
Hello, I have just learned to use WRF and do not understand some keywords in variables in the wrfinput.d01 file, for example, U:MemoryOrder = "XYZ". What is the storage order at the bottom layer of this MemoryOrder? Are x/y/z stored separatedly as a variable, or are x, y, z stored in different attributes of the same variable? There is also the keyword U:stagger = "X".What does it mean? Where can I find an explanation of the wrfinput.d01 file, if any scholar can provide it, that is the best. Thank you!
 
There are two issues that are mentioned: index/memory ordering of variables, and variable staggering.

index/memory ordering
For a general 3d array, the netcdf input to and the output from the WRF model is always ordered so that the FASTEST index is in the i-direction, the SLOWEST is in the k-direction, and the middle index is in the j-direction. However, if you look in the WRF code, you will notice that the computational indexing for a 3d array is always FASTEST=i-direction and SLOWEST=j-direction. This was a decision made about 20 years ago to take advantage of the then-existing cache available on the chip. Within the WRF model, the memory order is therefore (i,k,j), which translates into XZY. These MemoryOrder aspects are entirely internal to the model, and are much more general than is required

variable staggering
Take a look at the WRF tutorial dynamics presentation. The discretization is show here: http://amps-backup.ucar.edu/information/configuration/wrf_grid_structure.html. Because the U (cell-faced) velocity variables have an extra value in the i-direction (the x-direction), the staggering for the U variables is referred to as an "X" stagger. This is similar for the V (cell-faced) velocity variables and the "Y" stagger. Vertically, there are variables that are defined along the top of the grid cell face, for example W is "Z" staggered. For the temperature, moisture, and pressure variables that are defined at the center of the grid cell, those variables are considered unstaggered.
 
Top