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.

MESO要素清单:369-402

import numpy as np
import pandas as pd
import xarray as xr

from reki.format.grib.eccodes import load_field_from_file
/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(
from data_notebook.data import get_data_file

meso_grib2_orig_file_path = get_data_file("cma-meso-1km")
meso_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-meso-1km/grib2/orig/Z_NAFP_C_BABJ_20260725000000_P_CEMC-CMA-MESO-1KM-ORIG-02400.grb2')

层次

21 层,层次列表如下:

  • 1000

  • 975

  • 950

  • 925

  • 900

  • 850

  • 800

  • 750

  • 700

  • 650

  • 600

  • 550

  • 500

  • 450

  • 400

  • 350

  • 300

  • 250

  • 200

  • 150

  • 100

5 层,层次列表如下:

  • 1000

  • 925

  • 850

  • 700

  • 500

3 层,层次列表如下:

  • 850

  • 700

  • 500

雷达反射率

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
雷达反射率dbz--(0, 16, 225)pl21层369-389
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=1000,
    lazy=True
)
assert field.attrs["GRIB_count"] == 369
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=850,
    lazy=True
)
assert field.attrs["GRIB_count"] == 374
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=200,
    lazy=True
)
assert field.attrs["GRIB_count"] == 387
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 16,
        "parameterNumber": 225,
    },
    level_type="pl",
    level=100,
    lazy=True
)
assert field.attrs["GRIB_count"] == 389

风暴螺旋度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
0-1000m风暴螺旋度srh(0-1000)HLCYhlcy(0, 7, 8)heightAboveGroundLayer1000, 0390
0-3000m风暴螺旋度srh(0-3000)HLCYhlcy(0, 7, 8)heightAboveGroundLayer3000, 0391
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="HLCY",
    level_type="heightAboveGroundLayer",
    level=1000,
    lazy=True
)
assert field.attrs["GRIB_count"] == 390
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="hlcy",
    level_type="heightAboveGroundLayer",
    level={
        "first_level": 1000,
        "second_level": 0,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 390
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="srh(0-3000)",
    lazy=True
)
assert field.attrs["GRIB_count"] == 391
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 7,
        "parameterNumber": 8,
    },
    level_type="heightAboveGroundLayer",
    level={
        "first_level": 3000,
        "second_level": 0,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 391

冰雹指数

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
冰雹指数hi--(0, 1, 239)surface-392
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="hi",
    lazy=True
)
assert field.attrs["GRIB_count"] == 392
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 1,
        "parameterNumber": 239,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 392

0度层高度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
0度层高度ht0--(0, 3, 225)surface-393
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="ht0",
    lazy=True
)
assert field.attrs["GRIB_count"] == 393
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 3,
        "parameterNumber": 225,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 393

-20度层高度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
-20度层高度ht2--(0, 3, 226)surface-394
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="ht2",
    lazy=True
)
assert field.attrs["GRIB_count"] == 394
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 3,
        "parameterNumber": 226,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 394

整层可降水量

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
整层可降水量pwatPWATpwat(0, 1, 3)atmosphere-395
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="PWAT",
    level_type="atmosphere",
    lazy=True
)
assert field.attrs["GRIB_count"] == 395
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="pwat",
    lazy=True
)
assert field.attrs["GRIB_count"] == 395
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 1,
        "parameterNumber": 3,
    },
    level_type="atmosphere",
    lazy=True
)
assert field.attrs["GRIB_count"] == 395

能见度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
能见度visVISvis(0, 19, 0)surface-396
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="VIS",
    lazy=True
)
assert field.attrs["GRIB_count"] == 396
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="vis",
    lazy=True
)
assert field.attrs["GRIB_count"] == 396
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 19,
        "parameterNumber": 0,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 396

阵风风速

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
10米阵风风速gustGUSTi10fg(0, 2, 22)heightAboveGround10397
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="GUST",
    level_type="heightAboveGround",
    level=10,
    lazy=True
)
assert field.attrs["GRIB_count"] == 397
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="i10fg",
    lazy=True
)
assert field.attrs["GRIB_count"] == 397
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="gust",
    level_type="heightAboveGround",
    level=10,
    lazy=True
)
assert field.attrs["GRIB_count"] == 397
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 2,
        "parameterNumber": 22,
    },
    level_type="heightAboveGround",
    level=10,
    lazy=True
)
assert field.attrs["GRIB_count"] == 397

降水类型

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
降水类型precitypePTYPEptype(0, 1, 19)surface-398
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="PTYPE",
    lazy=True
)
assert field.attrs["GRIB_count"] == 398
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="ptype",
    lazy=True
)
assert field.attrs["GRIB_count"] == 398
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="precitype",
    lazy=True
)
assert field.attrs["GRIB_count"] == 398
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 1,
        "parameterNumber": 19,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 398

云顶高度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
云顶高度cldtCDCTOPcdct(0, 6, 12)surface-399
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="CDCTOP",
    lazy=True
)
assert field.attrs["GRIB_count"] == 399
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="cdct",
    lazy=True
)
assert field.attrs["GRIB_count"] == 399
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="cldt",
    lazy=True
)
assert field.attrs["GRIB_count"] == 399
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 6,
        "parameterNumber": 12,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 399

云底高度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
云底高度cldbCDCB-(0, 6, 11)surface-400
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="CDCB",
    lazy=True
)
assert field.attrs["GRIB_count"] == 400
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="cldb",
    lazy=True
)
assert field.attrs["GRIB_count"] == 400
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 6,
        "parameterNumber": 11,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 400

卫星红外通道模拟亮温

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
卫星红外通道模拟亮温bti--(0, 4, 228)surface-401
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="bti",
    lazy=True
)
assert field.attrs["GRIB_count"] == 401
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 4,
        "parameterNumber": 228,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 401

卫星水汽通道模拟亮温

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
卫星水汽通道模拟亮温btv--(0, 4, 227)surface-402
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter="btv",
    lazy=True
)
assert field.attrs["GRIB_count"] == 402
field = load_field_from_file(
    meso_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 4,
        "parameterNumber": 227,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 402