{"title":"On the speeding up and accuracy of the Second Order Moment (SOM) advection scheme using a mixed-precision method","authors":"Hideyuki Nakano, L. Shogo Urakawa, Kunihiro Aoki, Yuma Kawakami, Shoji Hirahara","doi":"10.1016/j.ocemod.2024.102495","DOIUrl":null,"url":null,"abstract":"<div><div>The ocean model is accelerated using the mixed-precision method for the second-order moment (SOM) advection scheme, which is highly accurate but computationally demanding. The execution time of the subroutine of the SOM scheme is successfully reduced by 43%, and since the SOM accounted for about 30% of the total time, the overall reduction in computation time is about 13%. A series of 300-year simulations showed that the mixed-precision method has sufficiently small negative impact on temperature (less than 0.02 °C), confirming that it can be used for climate simulations. When all the calculations are done in a simple single precision, an unacceptable difference in zonal mean temperature as a climate model of up to 0.4 °C in the deep ocean and 1 °C in the thermocline appears after the 300-year integration. We also conduct a sensitivity study using an idealized rectangular model, finding that consistency between the continuity equation and the tracer advection is necessary to guarantee accuracy in long-term integration, and it is shown that this consistency can be checked in a short time in a small rectangular domain as an salinity anomaly. In addition to the mixed-precision method, we have introduced two other methods for calculating the single-precision SOM algorithm. One is the Kahan method to compensate for the loss of information in the addition of some important variables represented in single precision, and the other is the conversion reduction method to compensate for the error due to data conversion between single and double precision at the entry and exit of subroutines. When both the methods are used simultaneously, the accuracy is comparable to mixed precision. We also evaluate them in an eddying OGCM and find that errors are difficult to evaluate because they are hidden by the inherent nonlinearity of the model at the stage when the nonlinearity develops.</div></div>","PeriodicalId":19457,"journal":{"name":"Ocean Modelling","volume":"194 ","pages":"Article 102495"},"PeriodicalIF":3.1000,"publicationDate":"2025-01-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Ocean Modelling","FirstCategoryId":"89","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S1463500324001811","RegionNum":3,"RegionCategory":"地球科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"METEOROLOGY & ATMOSPHERIC SCIENCES","Score":null,"Total":0}
引用次数: 0
Abstract
The ocean model is accelerated using the mixed-precision method for the second-order moment (SOM) advection scheme, which is highly accurate but computationally demanding. The execution time of the subroutine of the SOM scheme is successfully reduced by 43%, and since the SOM accounted for about 30% of the total time, the overall reduction in computation time is about 13%. A series of 300-year simulations showed that the mixed-precision method has sufficiently small negative impact on temperature (less than 0.02 °C), confirming that it can be used for climate simulations. When all the calculations are done in a simple single precision, an unacceptable difference in zonal mean temperature as a climate model of up to 0.4 °C in the deep ocean and 1 °C in the thermocline appears after the 300-year integration. We also conduct a sensitivity study using an idealized rectangular model, finding that consistency between the continuity equation and the tracer advection is necessary to guarantee accuracy in long-term integration, and it is shown that this consistency can be checked in a short time in a small rectangular domain as an salinity anomaly. In addition to the mixed-precision method, we have introduced two other methods for calculating the single-precision SOM algorithm. One is the Kahan method to compensate for the loss of information in the addition of some important variables represented in single precision, and the other is the conversion reduction method to compensate for the error due to data conversion between single and double precision at the entry and exit of subroutines. When both the methods are used simultaneously, the accuracy is comparable to mixed precision. We also evaluate them in an eddying OGCM and find that errors are difficult to evaluate because they are hidden by the inherent nonlinearity of the model at the stage when the nonlinearity develops.
期刊介绍:
The main objective of Ocean Modelling is to provide rapid communication between those interested in ocean modelling, whether through direct observation, or through analytical, numerical or laboratory models, and including interactions between physical and biogeochemical or biological phenomena. Because of the intimate links between ocean and atmosphere, involvement of scientists interested in influences of either medium on the other is welcome. The journal has a wide scope and includes ocean-atmosphere interaction in various forms as well as pure ocean results. In addition to primary peer-reviewed papers, the journal provides review papers, preliminary communications, and discussions.