CIME框架阅读翻译笔记第一章第一节(案例控制系统第一部分:基本使用——介绍)

CIME官方使用手册的链接在这http://esmci.github.io/cime/versions/master/html/users_guide/index.html
本期翻译的是第一章第一节(案例控制系统第一部分:基本使用——介绍)的内容。
一共包含学习CIME先决条件CIME关键术语与概念的介绍运行CIME所需环境快速开始CIME的参考案例如何简单使用query_config五个小节。

Case Control System Part 1: Basic Usage

Introduction

Part 1 of this guide explains the basic commands in the CIME Case Control System that are needed to get a model running.
手册的第一部分是用来解释在CIME案例控制系统中使模式运行起来所需的基础命令。

1.1. Prerequisites 先决条件

Part 1 of this guide assumes that CIME or a CIME-driven model and the necessary input files have been installed on the computer you are using. If that is not the case, see Porting CIME.
手册的第一部分默认CIME或者CIME驱动模式及其所必需的输入文件已经在你所用电脑上安装完成。如果并不是这种情况,请看移植CIME这章。

Other prerequisites:
其他的先决条件:

Familiarity with basic climate modeling concepts.
对基本气候模型概念的熟悉
Familiarity with UNIX command line terminals and the UNIX development environment.
对UNIX命令行终端及UNIX开发环境的熟悉
A correct version of the Python interpreter.
一个Python解释器的正确版本

CIME’s commands are Python scripts and require a correct version of the Python interpreter to be installed. The Python version must be greater than 2.7. Determine which version you have like this:
CIME的命令是python脚本故需要安装好版本正确的Python解释器。Python版本必须比2.7高。确定你使用的版本如下:

python --version

Consult your local documentation if you need to update your python version.
请参考你的当地文档,如果你需要更新python版本。

1.2. Key Terms and concepts 关键术语与概念

The following key terms and concepts are ingrained in CIME and used frequently in this documentation. See the Glossary for a more complete list of terms.
以下的关键术语与概念在CIME中根深蒂固,并且在本文档中频繁使用。

concepts 概念

In CIME, a coupled earth system model is made up of components that interact through a coupler and are all controlled by a driver.
在CIME中,地球耦合系统是由一些通过耦合器相互联系并由一个驱动程序控制的组件所构成。

In the current version of CIME, there are 7 physical components allowed. They are:
在当前的版本的CIME中,有七个物理组件被允许使用。他们分别是:
atmosphere, ocean, sea-ice, land surface, river, ice sheet, ocean waves
大气、海洋、海冰、地表、河流、冰盖、海浪

Components are also referred to as “models”. The choice of 7 is partly historical and partly determined by the physics of the Earth system: these 7 components occupy physically distinct domains in the Earth system and/or require different numerical grids for solving.
这些组件也称为“模型”。这七个组件的选择部分是历史原因,部分是由地球系统的物理性质决定的,即:这7个组成部分在地球系统中占据物理上不同的区域,并且/或者需要不同的数值网格来求解。

component types 组件类型

For each of the 7 physical components (models), there can be three different implementations in a CIME-driven coupled model.
对于这七个物理组件(模型)的每一个,CIME驱动的耦合模型可以有三种不同的实现方式。

data: For some climate problems, it is necessary to reduce feedbacks within the system by replacing an active model with a version that sends and receives the same variables to and from other models, but with the values read from files rather than computed from the equations. The values received are ignored. These active-model substitutes are called data models. CIME provides data models for each of the possible components. You could add your own data model implementation of a component but as for active models only one at a time can be used.
数据:对于一些气候问题,有必要通过将一个活动模型替代为一个向其他模型(组件)发送或接受相同的变量的版本,以此来减少系统中的反馈,但要用从文件里读取的值而不是方程计算得到的值。接受的值被忽略。这些活动模型的替代物被称作数据模型。CIME为每个可能的组件提供数据模型。你可以增加你自己的组件数据模型工具,但是对于活动模式,一次只能使用一个。

stub: For some configurations, no data model is needed, so CIME provides stub versions that simply occupy the required place in the driver and do not send or receive any data.
存根:对于一些配置,不需要数据模型,所以CIME提供简单存根版本只占据在驱动器所需位置,不发送和接收任何数据。

component set or compset: The particular combination of active, data and stub versions of the 7 components is referred to
组件集:七个组件的活动、数据和存根版本的特定组合称为组件集
as a component set or compset. The Case Control System allows one to define several possible compsets and configure and run them on supported platforms. See Component Sets for more information.

作为组件集,案例控制系统允许定义一些可能的组件集,并在支持平台配置和运行他们。查看这些组件设置获取更多信息。

grid or model grid: 网格或者模型网格
Each active model must solve its equations on a numerical grid. CIME allows models within the system to have different grids. The resulting set of all numerical grids is called the model grid or sometimes just the grid, where grid is a unique name that denotes a set of numerical grids. Sometimes the resolution also refers to a specific set of grids.

每个活动模型必须在数值网格上求解其方程。CIME允许系统内的模型具有不同的网格。生成的所有数值网格集称为模型网格,有时称为网格,其中网格是表示一组数值网格的特殊名称。有时分辨率也指一组特定的网格。

machine and compilers: 机器和编译器
The machine is the computer you are using to run CIME and build and run the climate model. It could be a workstation or a national supercomputer. The exact name of machine is typically the UNIX hostname but it could be any string. A machine may have one more more versions of Fortran, C and C++ compilers that are needed to compile the model’s source code and CIME

这里的机器是指你用来运行CIME框架和构建并运行气候模式的计算机。它可以是个人电脑也可以是一个国家超算。这个电脑的确切名字一般是UNIX系统的主机名,但它可以是任何字符串。一个电脑可能有一个或多个版本的Fortran、C and C++ compilers,被用来编译模式的源代码和CIME框架。

case: 案例
To build and execute a CIME-enabled climate model, you have to make choices of compset, model grid, machine and compiler. The collection of these choices, and any additional customizations you may make, is called the case.

为了建立和运行一个CIME实现的气候模型,你必须选择你的组件集、模式网格、计算机和编译器。这些选择的集合和所有你构建的其他定制被称为案例。

out-of-the-box:
Any case that can be defined by the coupled model’s CIME configuration files and built with only basic commands in the CIME Case Control System is an “out-of-the-box” case. Since CIME and its configuration files are kept with the model source code and version-controlled together, its possible to match supported out-of-the-box cases with specific versions of the model source code, promoting reproducibility and provenance. An out-of-the-box case is also called a base case.

所有可以被耦合模式的CIME配置文件所定义并用CIME案例控制系统中的基本命令就可以建立的案例被称作“out-of-the-box”案例。由于CIME和其配置文件与模型源代码及版本控制器一起保持,因此可以用特定的模型源代码来匹配所支持的“out-of-the-box”案例,以此提高再生成性和来源。一个out-of-the-box案例也被称作一个基本案例。

1.3. CIME and your environment

Before using any CIME commands, set the CIME_MODEL environment variable. In bash, use export as shown and replace with the appropriate text. Current possibilities are “e3sm” or “cesm.”
在使用任何CIME命令前,请设置CIME_MODLE的环境变量。在bash命令行里,用以下所示的export命令和并用合适的路径文本代替< model >。目前可能是“e3sm”或“cesm”。

export CIME_MODEL=< model >

There are a number of possible ways to set CIME variables. For variables that can be set in more than one way, the order of precedence is:
设置CIME变量的方法有很多种。对于可以以多种方式设置的变量,优先顺序为:

  • variable appears in a command line argument to a CIME command
    出现在CIME命令的命令行中的变量
  • variable is set as an environment variable
    设置在环境变量里的变量
  • variable is set in $ HOME/.cime/config as explained further here
    作为进一步解释,设置在$HOME/.cime/config的变量
  • variable is set in a $CASEROOT xml file
    设置在 $CASEROOT xml文件里的变量

1.4. Quick start 快速开始

To see an example of how a case is created, configured, built and run with CIME, execute the following commands. (This assumes that CIME has been ported to your current machine).
要查看如何使用CIME创建、配置、构建和运行案例的示例,请执行以下命令。(假设CIME已经被移植到当前电脑上)

cd cime/scripts
./create_newcase --case mycase --compset X --res f19_g16
cd mycase
./case.setup
./case.build
./case.submit

The output from each command is explained in the following sections.
下面几节将解释每个命令的输出。

After you submit the case, you can follow the progress of your run by monitoring the CaseStatus file.
在你提交这个案例之后,您可以通过监视CaseStatus文件来跟踪运行进度。

tail CaseStatus

Repeat the command until you see the message case.run success.
重复这个命令直到你看到案例运行成功的信息。

1.5. Discovering available cases with query_config

使用query_config发现可用案例

Your CIME-driven model has many more possible cases besides the simple one in the above Quick Start.
你的CIME驱动模型除了快速开始那一小节的简单案例外,还有更多可行的案例。

Use the utility query_config to see which out-of-the-box compsets, components, grids and machines are available for your model.
使用query_config实用程序来查看有哪些现成的组件集、组件、网格和机器可用于你的模式。
If CIME is downloaded in standalone mode, only standalone CIME compsets can be queried.
如果CIME以独立模式下载,则只能查询独立的CIME组件集。
If CIME is part of a CIME-driven model, query_config will allow you to query all prognostic component compsets.
如果CIME是CIME驱动模型的一部分,query_config将会允许您查询所有预测组件集合。

  • To see lists of available compsets, components, grids and machines, look at the help text:
    查看以下的帮助文档,就可以看到可用的组件集、组件、网格与机器列表。

query_config --help

  • To see all available component sets, try:
    要查看所有可行的组件集,试试这个:

query_config --compsets all

Usage examples

To run query_config for compset information, follow this example, where drv is the component name:
为运行获取组件集的信息的query_config ,可以遵循以下示例,其中drv就是组件名:

query_config --compsets drv

The output will be similar to this:
将有类似以下的输出:
在这里插入图片描述
Each model component specifies its own definitions of what can appear after the % modifier in the compset longname (for example, DOM in DOCN%DOM).
每一个模式组件都可以在组件集longname中%修饰符后指定自己的定义。(举个例子啊,DOCN%DOM中的DOM)
To see what supported modifiers are for DOCN, run query_config as in this example:
为了查看DOCN支持修饰语是什么,运行一个query_config作为参考案例。

query_config --component docn

The output will be similar to this:
将会出现类似以下输出:
在这里插入图片描述
For more details on how CIME determines the output for query_config, see Component Sets.
为了获得更多CIME如何确定query_config的输出,请查看组件设置。

(本期文章内容中的两个链接,关于$HOME/.cime/config和query_config的更多内容将会分别在本章的第八小节和第二章做详细翻译。)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值