#### Abstract

The HTF-coordinate is a feature that has been imported into the Weather Research and Forecasting (WRF) model version 4, and it is important to understand how it can be used efficiently. Indicators are needed to describe the characteristics of the distribution of the vertical coordinate and to evaluate the rationality of the configuration of the HTF-coordinate. Such indicators, including the maximum factor of compression (MFC), *eta* corresponding to the MFC, and the critical point of compression (CPC), were defined and calculated in this study. The indicators were also validated to efficiently and accurately describe the characteristics of the distribution of the vertical coordinate of the WRF model. They constituted the integrated system to resolve the problem of the configuration of the HTF-coordinate of WRF. The nonmonotonicity, compression, and stretching that were caused by the nonlinearity of the HTF-coordinate were also illustrated and validated.

#### 1. Introduction

The terrain-following coordinate (TF-coordinate), which promotes the effective application of numerical weather prediction (NWP) models, has been used widely in various dynamic frameworks of such models [1–4]. However, it has certain defects, e.g., the use of terrain-following coordinates reduces the accuracy of the horizontal pressure gradient force (PGF) in regions of relative steep terrain [5] and divergent wind anomalies extend from the bottom to the top levels of the model and distort the terrain gravitational wave in steep terrain [6]. In high-resolution models, as the slope of the steep terrain becomes larger, the spurious disturbance caused by the numerical errors of the horizontal PGF will become more distinct [7], weakening the prediction performance of the high-resolution numerical model. To help mitigate these effects, various modifications to the TF-coordinate formulation have been introduced that more rapidly remove terrain influences in the coordinate surfaces with increasing height. The most successful and widely used approach is the hybrid terrain-following coordinate (HTF-coordinate) [8–10]. The HTF-coordinate smoothly transitions from the TF-coordinate at the surface to the purely isobaric coordinate (p-coordinate) at the higher levels of the model to diminish the effect of steep terrain [11–17]. Through the implementation of the hybrid coordinate, the WRF model significantly reduces small-scale spurious vertical velocities, particularly at upper levels and downstream of complex terrain [18, 19].

WRF is a regional numerical weather prediction model developed by the National Center of Atmospheric Research (NCAR) and is used worldwide. WRF v4.0 implements NCAR’s HTF-coordinate using the Klemp cubic polynomial approach [20]. How to configure the parameters and take full advantage of the HTF-coordinate are important in the application of the hybrid coordinate system. Park et al. [21] deduced the necessary condition to maintain the monotonicity of the HTF-coordinate, which is an important result for the operational application of the HTF-coordinate. Indicators are also needed to describe the characteristics of the distribution of the vertical coordinate to choose the rational parameters of the HTF-coordinate of WRF. In this paper, the nonmonotonicity, compression, and stretching of the vertical coordinate were studied and the indicators of compression and stretching were defined, calculated, and validated. They constituted the indicator system to resolve the problem of the configuration of the HTF-coordinate.

Our paper is organized as follows. In Section 2, the basic contents and characteristics of the HTF-coordinate are introduced briefly. In Section 3, the nonmonotonicity of the HTF-coordinate is introduced and illustrated using idealized tests. In Section 4, the difference of the partial derivative of normalized *pd* with respect to *eta*, the MFC, *eta* corresponding to the MFC, and the CPC of the HTF-coordinate are defined and calculated. They are then validated to allow the effective and accurate evaluations of the compression and stretching of the vertical coordinate in an idealized experiment. Section 5 presents some discussion. In Section 6, the conclusions of the study are summarized.

#### 2. HTF-Coordinate Introduction

This is a brief introduction to the basic contents of the HTF-coordinate to facilitate the calculations in the below sections.

##### 2.1. TF-Coordinate

TF-coordinates are used in mesoscale numerical weather prediction models to simplify the processing of surface boundary conditions. The TF-coordinate in WRF has the formwhere (noted as *pd*) is the hydrostatic component of the pressure of dry air and (noted as *pt*) and (noted as *ps*) are the hydrostatic top level pressure and the surface pressure for dry air, respectively. is the difference of hydrostatic pressure of dry air from the top level to the surface of the model; subscript *d* indicates dry air. (noted as *eta*) indicates the vertical coordinate value of the model [18]. When and , the vertical coordinate value is always 1 at the surface boundary.

##### 2.2. HTF-Coordinate

The WRF HTF-coordinate is given aswhere is the reference sea level pressure of air, defines the relative weighting between the TF-coordinate and a purely isobaric coordinate, and smoothly transitions from the TF-coordinate at the surface to the purely isobaric coordinate in the upper levels of the model [18–21]. is defined in terms of a third-order polynomial:

Subject to the boundary conditions of equation (4),where (noted as *eta_c*) is a user-defined constant that specifies where the vertical coordinate completely transitions from the TF-coordinate levels at low levels to purely isobaric coordinate levels aloft. The subscript represents the partial derivative with respect to eta. When , the model applies the TF-coordinate at the surface; when , the model applies the p-coordinate in the upper levels, and when , the transitions from TF-coordinate to p-coordinate take place.

#### 3. The Nonmonotonicity of the HTF-Coordinate

Although the HTF-coordinate reduces the errors in the PGF, it also generates other defects. For example, it cannot maintain the monotonic, continuous, and smooth one-to-one mapping relationship between *eta* and at the lower levels of the model when *eta_c* is set to excessively large values in regions of steep terrain, which causes the adjacent coordinate surfaces to intersect with each other, violating the monotonicity requirement of the coordinate.

##### 3.1. HTF-Coordinate Numerical Experiment

Experiment 1 on the effect of the relationship between *pd* and *eta* at different terrain altitudes and *eta_c* illustrates the nonmonotonicity of the vertical coordinate of the HTF-coordinate in WRF.

The configuration of the experiment is listed in Table 1. Four test cases were applied. From Figure 1, the following conclusions can be drawn:(i)The nonlinearity relationship between *eta* and *pd* at the lower level of the model became more significant when the topographic height or *eta_c* increased gradually.(ii)The HF-, TF-, and p-coordinates were the same when the surface pressure of air equaled the referenced sea level pressure of air and the mapping relationship between *eta* and *pd* was completely linear.(iii)The nonlinearity of the mapping relationship between *eta* and *pd* is so significant that the nonmonotonicity of the vertical coordinate was achieved as = 400 hPa and *eta_c*= 0.5 in the lower levels of the model. *pd* with a smaller *eta* was greater than the *pd* with a larger *eta.* This was unreasonable and resulted in the integral overflow of the numerical calculation of WRF.

**(a)**

**(b)**

**(c)**

**(d)**

*Experiment 2*. To further analyze the mapping relationship between *eta* and *pd*, an experiment with an ideal terrain was designed. The terrain was designed as a sine function:where *A* is the amplitude of the sine function and represents the height of the terrain. The parameters for Experiment 2 are listed in Table 2.

From Figure 2, the following conclusions can be drawn:(i)The value of *eta_c* determines the height of the vertical coordinate above where the HTF-coordinate completely transitioned into the p-coordinate. The greater *eta_c*, the lower the level of the vertical coordinate of the model above where the HTF-coordinate transitioned into the p-coordinate. For example, the hydrostatic pressure of air was approximately 200 hPa at *eta_c* = 0.2 or approximately 400 hPa at *eta_c* = 0.4 above where the HTF-coordinate completely transitioned into the p-coordinate.(ii)The effect of the topography of the HTF-coordinate diminished with increasing height, and the mapping relationship between *eta* and *pd* was completely linear when *eta* is less than *eta_c*.(iii)In theory, to reduce the PGF errors, *eta_c* should be set as large as possible; however, the nonmonotonicity of the HTF-coordinate limited the value range of *eta_c.*

**(a)**

**(b)**

**(c)**

**(d)**

The maximum value of *eta_c* should be studied to simulate WRF. To maintain the monotonic mapping relation between *eta* and *pd*, Park [21] found that and *eta_c* should conform to the following equations:where is the smallest allowable surface pressure for which the hybrid coordinate does not violate monotonicity. is the normalized , is the normalized hydrostatic surface pressure of the model, and is the normalized pressure at the top level of the model [21].

However, to ensure that the solution remains accurate and stable, it is important to configure the hybrid coordinate in a way that the anticipated minimum surface pressure is significantly greater than . According to (7), we created a relational table of , , and *eta_c* as shown in Table 3.

#### 4. The Compression and Stretching of the HTF-Coordinate

The nonlinear relationship between *eta* and *pd* generated the compression and stretching of the vertical coordinate of the model. The approaches to measure the compression and stretching of the HTF-coordinate were defined, calculated, and validated to evaluate the compression and stretching of the vertical coordinate effectively and accurately in idealized experiments.

##### 4.1. Compression and Stretching Experiment (Experiment 3)

An experiment was designed and conducted to illustrate the compression and stretching of the vertical coordinate caused by the HTF-coordinate. The vertical coordinate of the model was divided into 50 even levels between 0 and 1. The configuration of Experiment 3 is listed in Table 4.

As shown in Figure 3, *pd* was distributed evenly by the *eta* value in the case of the TF-coordinate. With the same configuration, the distribution of *pd* was more concentrated at the lower levels and more decentralized at the higher levels of the model in Figures 3(b)–3(d). When *eta_c* was larger, the compression and stretching was more significant. At high levels of the model, the HTF-coordinate transitioned into a purely isobaric coordinate when , which caused *pd* to change almost linearly with *eta.*

**(a)**

**(b)**

**(c)**

**(d)**

##### 4.2. Estimating the Compression and Stretching of the Vertical Coordinate

The compression and stretching of the vertical coordinate can be estimated using the difference of the partial derivative of the normalized *pd* with respect to *eta* of the HTF-coordinate and that of the TF-coordinate. The rationality of the approach lies in the value of the partial derivative of the normalized *pd* with respect to *eta* of the TF-coordinate being a constant as the pt^{∗} is constant that can be standardized for the comparison. The difference represents the relative rate of change of normalized *pd* with respect to *eta* between the TF- and the HTF-coordinate. If the difference is negative, this indicates compression of the vertical coordinate, and if the difference is positive, this indicates stretching. The greater the positive difference, the more significant the stretching. Conversely, the smaller the negative difference, the more significant the compression. The equation is derived as follows:

Equation (8) is the expression of the partial derivative of the normalized *pd* with respect to *eta* of the TF-coordinate, and equation (9) is the expression of the HTF-coordinate. Equation (10) presents the difference of the partial derivative of the normalized *pd* with respect to *eta* between the HTF- and the TF-coordinate. Equation (10) shows that the difference of the partial derivative of the normalized *pd* with respect to *eta* is only relevant to *eta_c* and the normalized surface pressure. Equations (9) and (10) are piecewise functions because the HTF-coordinate completely transitions into the purely isobaric coordinate when .

From Figure 4, the following conclusions can be drawn:(i)The difference of the partial derivative of the normalized *pd* with respect to *eta* can estimate the compression and stretching of the vertical coordinate effectively and has a point with a minimum negative value that indicates the position where the compression of the vertical coordinate is most significant. The difference will be a constant when *eta* is less than *eta_c* because = 0 when *eta* is less than *eta_c.*(ii)The absolute value of difference decreases with increasing normalized surface pressure and the gradually decreasing *eta_c* of the model. The small absolute value of difference indicates that the compression and stretching are moderate.(iii)The *eta* value of the points where the difference equals zero can be calculated using equation (10) by setting the partial derivative of the normalized *pd* with respect to *eta* to zero. The *eta* value of the points is only relevant to *eta_c* and where there is no compression or stretching of the vertical coordinate.

**(a)**

**(b)**

##### 4.3. MFC of the HTF-Coordinate

It is reasonable to estimate the compression using the minimum difference of the partial derivative of the normalized *pd* with respect to *eta*. The MFC is defined in terms of the absolute value of the minimum difference and is calculated as follows:

As shown in equation (12), the MFC a positive value. The compression of the vertical coordinate is more significant with an increasing MFC. Note that *eta_c* should not be set to zero as this would result in the MFC being infinity.

MFC is only relevant to the normalized surface pressure and *eta_c*. From Figure 5, the following conclusions can be drawn:(i)MFC increases with decreasing normalized surface pressure and increasing *eta_c* of the model.(ii)MFC approaches infinity when *eta_c* approaches 1.(iii)MFC is zero when the normalized surface pressure is set to 1, which means that no compression or stretching of the vertical coordinate occurs.

The MFC of the vertical coordinate was calculated based on equation (12) as shown in Table 5.

##### 4.4. Eta Corresponding to the MFC

*Eta* corresponding to the MFC indicates *eta* where the compression of the vertical coordinate is most significant and is calculated using the following equation:

*Eta* is only relevant to *eta_c*. The relationship between *eta* corresponding to the MFC and *eta_c* is shown in Figure 6.

Based on Figure 6, *eta* corresponding to the MFC increases with increasing *eta_c* and is always less than *eta_c*. The values of *eta* corresponding to the MFC were calculated and are listed in Table 6.

##### 4.5. CPC of the HTF-Coordinate

The vertical coordinate of the HTF-coordinate is divided into two intervals. One interval covers the lower levels of the vertical coordinate where the mapping relation between *pd* and *eta* is compressed. The other covers the higher levels of the vertical coordinate where the mapping relation is stretched, and the CPC indicates the location where the transition occurs.

According to (11), when , the mapping relation of *pd* and *eta* is compressed, and when , the mapping relation of *pd* and *eta* is stretched. This is determined based on the *eta_c*.

To be able to conveniently look up the critical point, the CPC is listed in Table 7.

As shown in Figure 7, the vertical coordinate is compressed in the region above the curve and stretched in the region under the curve. When *eta_c* increases, the compressed region gradually decreases and the stretched region gradually increases accordingly.

##### 4.6. Validation of the Compression of HTF-Coordinate Theory

The compression theory was validated using parameters from Experiment 3, where the normalized surface pressure is 0.6 and *eta_c* is set as 0.0, 0.2, and 0.4, respectively. The MFC, *eta* corresponding to the MFC, and the CPC are calculated and listed in Table 8.

Based on Table 8 and Figure 3, the MFC is 0.5143 when *eta_c* = 0.4, which is reasonable because the compression of the vertical coordinate is most significant in Figure 3(d). *Eta* corresponding to the MFC is 0.7429 when *eta_c* = 0.4, which agrees well with Figure 3(d). The CPC is 0.4857 when *eta_c* = 0.4, which indicates the location of the completely transition in Figure 3(d). According to the validation, the compression theory of the HTF-coordinate can be used to efficiently estimate the compression and stretching of the vertical coordinate of the HTF-coordinate.

#### 5. Discussion

Although WRF is used widely and the HTF-coordinate is imported into WRF v4.0, the accurate configuration of the hybrid coordinate is not explicitly noted in the WRF guide. Park et al. [21] systematically studied the nonlinearity of the HTF-coordinate of WRF in 2019 and stated the necessary conditions to maintain the linearity of the HTF-coordinate, which is important for the application of the HTF-coordinate. However, more indicators are needed to reveal the characteristics of the distribution of the vertical coordinate of the HTF-coordinate and to understand where the vertical coordinate is mainly compressed, where the compression transitions to stretching, and the degree of the compression that is important for the operational application of WRF.

The difference of the partial derivative of the normalized *pd* with respect to *eta*, the MFC, *eta* corresponding to the MFC, and the CPC of the HTF-coordinate are defined, calculated, and validated to evaluate the compression and stretching of the vertical coordinate effectively and accurately. However, further analysis is needed to understand which distribution of the vertical coordinate is best suited for WRF to reduce the numerical errors of PGF over steep terrains.

#### 6. Conclusions

(i)The nonmonotonicity of the HTF-coordinate indicated that the mapping relationship between *eta* and *pd* was not monotonic, which was validated by the results of Experiments 1 and 2. This potentially caused the adjacent coordinate surfaces to intersect with each other, which violated the monotonicity requirement of the vertical coordinate and resulted in the integral overflow of the numerical computation. The nonmonotonicity was relevant to the value of *eta_c*, , and .(ii)The compression and stretching of the vertical coordinate were caused by the nonlinearity of the HTF-coordinate. The compression and stretching were increasingly significant with increasing *eta_c* and decreasing .(iii)The difference of the partial derivative of the normalized *pd* with respect to *eta* indicated the degree of compression and stretching of the vertical coordinate effectively and accurately.(iv)The MFC of the HTF-coordinate was an effective indicator to estimate the compression of the vertical coordinate and was only relevant to the normalized surface pressure and *eta_c.* The compression of the vertical coordinate was more significant with an increasing MFC.(v)*Eta* corresponding to the MFC indicated the value of *eta* where the compression of the vertical coordinate was most significant and was only relevant to *eta_c. Eta* corresponding to the MFC increased with increasing *eta_c* and was always less than *eta_c.*(vi)The vertical coordinate was divided into two intervals by the CPC: one interval covered the lower levels of the vertical coordinate where the mapping relation between *pd* and *eta* was compressed and the other covered the higher levels of the vertical coordinate where the mapping relation was stretched. When *eta_c* increased, the compressed region was gradually reduced, and the stretched region gradually increased accordingly.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Authors’ Contributions

Hailiang Zhang contributed to original draft preparation, review and editing, and methodology. Huoqing Li was responsible for formal analysis and investigation. Shuiyong Fan conceptualized the study. Hailiang Zhang and Huoqing Li validated the study and were responsible for software. All authors read and agreed to the published version of the manuscript.

#### Acknowledgments

This research was funded by the National Key Research and Development Program of China (grant no. 2018YFC1507100), the Central Scientific Research Institute of the Public Basic Scientific Research Business Professional (grant no. IDM2017001), the National Natural Science Foundation of China (grant no. 41875023), the Research Foundation of China Desert Meteorology (grant no. sqj2018017), the National Department of Public Benefit (Meteorology) Research Foundation (grant no. GYHY201306066), and the Central Asia Atmospheric Research Foundation (grant no. CASS201711).