我要评分
获取效率
正确性
完整性
易理解

Case 2: WRF Result Difference Analysis

A customer uses WRF 4.0.2 as the meteorological prediction software. WRF abstracts meteorological processes into equations and uses the equations to carry out numerical calculation and iterative solution. The WRF calculation process is closely related to each physical parameter. Therefore, you need to analyze the difference between the calculation results of each physical parameter. Based on commonly used physical parameters and the WRF Preprocessing System (WPS, which can generate WRF input data), 31 WRF computing test cases with different physical parameter combinations are constructed. For computing test cases whose calculation results on Kunpeng and x86 are inconsistent, locate code segments where differences occur and analyze the causes based on Implementing Code Instrumentation.

Figure 1 Mapping between computing test cases and difference causes

After specifying -fp-model=precise to remove the FTZ compilation option, using the Kunpeng Math Library, or modifying undefined behavior in WRF code, the 103-day weather forecast result on Kunpeng is the same as that on x86.

Figure 2 Temperature and rainfall prediction results on Kunpeng (left) and x86 (right) using 103-day computing test cases