Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

CMA-REPS

CMA-REPS 基础 GRIB2 数据文件有 71 个要素场。

本页文件为集合预报成员 1(文件名后缀 -m001.grib2);所有要素均为集合扰动预报(pf)。

import pandas as pd
from data_notebook.data import get_data_file

reps_grib2_orig_file_path = get_data_file("cma-reps")
reps_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-reps/grib2/orig/Z_NAFP_C_BABJ_20260811060000_P_NWPC-GRAPES-REPS-CN-02400-m001.grib2')

要素列表

使用 reki 识别全部 GRIB2 消息头中的要素,并结合内置要素注册表生成要素列表。

下表将相邻的同要素不同层次条目合并为一行:序号显示合并范围(如 64-100),层次列出全部层次。

from IPython.display import display
from data_notebook import get_grib2_inventory, merge_inventory_levels

inventory = get_grib2_inventory(reps_grib2_orig_file_path)
cma_reps_merged_inventory = merge_inventory_levels(inventory)
with pd.option_context("display.max_rows", None):
    display(cma_reps_merged_inventory.style.hide(axis="index"))
/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/.venv/lib/python3.14/site-packages/gribapi/__init__.py:23: UserWarning: ecCodes 2.42.0 or higher is recommended. You are running version 2.34.1
  warnings.warn(
Loading...