Journal of Frontiers of Computer Science and Technology ›› 2017, Vol. 11 ›› Issue (2): 242-251.DOI: 10.3778/j.issn.1673-9418.1512060

Previous Articles     Next Articles

Research of CAS-ESM Coupler Interface

CHEN Yiran1,2,3+, JIANG Jinrong1,2, ZHAO Xiaoxi1,2,3, WANG Yuzhu4, HAO Huiqun1,2   

  1. 1. Supercomputing Center, Computer Network Information Center, Chinese Academy of Sciences, Beijing 100190, China
    2. Center of Scientific Computing Applications & Research, Chinese Academy of Sciences, Beijing 100190, China
    3. University of Chinese Academy of Sciences, Beijing 100049, China
    4. Institute of Remote Sensing and Digital Earth, Chinese Academy of Sciences, Beijing 100094, China
  • Online:2017-02-01 Published:2017-02-10



  1. 1. 中国科学院 计算机网络信息中心 超级计算中心,北京 100190
    2. 中国科学院 计算科学应用研究中心,北京 100190
    3. 中国科学院大学,北京 100049
    4. 中国科学院 遥感与数字地球研究所,北京 100094

Abstract: Coupler is an important part of the earth system model (ESM). It connects various component models. Based on the CPL coupler interface, this paper separates the component models codes from the system model, in order to achieve the goal to read coupler interface only rather than understand the complex internal coupler of the system for component models exports. Then this paper studies two ways to code with coupler interface: reusing the duplicate codes to get unification codes and automated generation codes. Firstly, repetitive codes of different component models from coupler interface are reused to unify. Secondly, codes will be automatically generated after filling up the corresponding contents of variables on the configuration files by component models exports. Those variables will replace special variables from template files and loop traversal. Those contents can be inserted into the final codes to finish automated generation codes. Furthermore, the ESM with coupler interface which adds coding reuse and automated generation is deployed to Chinese Academy of Sciences (CAS) super computer, ERA. The results of coupler with the two techniques are consistent with the original simulation one.

Key words: earth system model (ESM), coupler, coding reuse, automated generation

摘要: 耦合器是地球系统模式(earth system model,ESM)的重要组成部分,用于连接各个分量模式。针对地球系统模式中的耦合接口进行编程操作,使得分量模式的代码从耦合系统中分离出来,从而使得模式专家只需要了解耦合接口而不再需要了解耦合器的复杂内部实现。为此提出了两种耦合接口技术:一是耦合接口代码复用技术,将各个分量模式形式相似的代码段复用为统一的接口;二是耦合接口代码自动生成技术,根据统一的模板文件,模式专家只需要在配置文件中提供相应的变量信息,便可通过模板文件自动生成分量模式的代码。基于以上工作,将改写耦合接口后的地球系统模式部署到中科院超级计算机“元”上,结果表明经过代码复用及自动生成后的耦合接口与原来代码模拟结果一致。

关键词: 地球系统模式(ESM), 耦合器, 代码复用, 自动生成