Algorithmic transformation from physical models to data-driven models using the coupling library: a case of a climate model Climate model (or module) emulators that use AI technology are helpful in reducing the amount of computation in climate simulations and accelerating them by utilizing computing units that specialize in dense matrix operations. On the other hand, it is difficult for us to control the behavior of surrogate models that implicitly include too many physical processes and to use them to expand scientific knowledge. We developed a system to construct a scheme-level fine-grained surrogate model using the coupling library h3-Open-UTIL/MP, which combines components of climate models such as atmospheric models and ocean models. This combined library extracts the inputs and outputs of a particular physics scheme during a simulation and converts them to different spatiotemporal resolutions as required. The extracted data is fed on-the-fly to a Python-based machine learning suite. By limiting the functional requirements of the surrogate model to faithfulness to the original interpretable physical model, long-term simulations can be performed with less fear of unexpected behavior. Furthermore, building a low-resolution parameterized model based on km-scale simulations is expected to improve conventional low-resolution climate models' reproducibility and calculation speed.