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-TYM

CMA-TYM 基础 GRIB2 数据文件有 479 个要素场。

所有要素均为确定性预报(fc)。

import pandas as pd
from data_notebook.data import get_data_file

tym_grib2_orig_file_path = get_data_file("cma-tym")
tym_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-tym/grib2/orig/Z_NAFP_C_BABJ_20260811000000_P_NWPC-GRAPES-TYM-ACWP-02400.grib2')

要素列表

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

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

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

inventory = get_grib2_inventory(tym_grib2_orig_file_path)
cma_tym_merged_inventory = merge_inventory_levels(inventory)
with pd.option_context("display.max_rows", None):
    display(cma_tym_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...