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-MESO 3KM

CMA-MESO 3KM 基础 GRIB2 数据文件有 575 个要素场。

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

import pandas as pd
from data_notebook.data import get_data_file

meso3km_grib2_orig_file_path = get_data_file("cma-meso-3km")
meso3km_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-meso-3km/grib2/orig/Z_NAFP_C_BABJ_20260818000000_P_NWPC-GRAPES-3KM-ORIG-02400.grb2')

要素列表

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

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

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

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