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.

GFS要素清单:785-850

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

gfs_grib2_orig_file_path = get_data_file("cma-gfs")
gfs_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-gfs/grib2/orig/Z_NAFP_C_BABJ_20260811000000_P_NWPC-GRAPES-GFS-GLB-02400.grib2')

层次

30 层,单位百帕 mb:

  • 1000

  • 975

  • 950

  • 925

  • 900

  • 850

  • 800

  • 750

  • 700

  • 650

  • 600

  • 550

  • 500

  • 450

  • 400

  • 350

  • 300

  • 275

  • 250

  • 225

  • 200

  • 175

  • 150

  • 125

  • 100

  • 70

  • 50

  • 30

  • 20

  • 10

雷达反射率

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
雷达反射率dbz--(0, 16, 225)pl30层785-814
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=1000,
    lazy=True
)
assert field.attrs["GRIB_count"] == 785
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=850,
    lazy=True
)
assert field.attrs["GRIB_count"] == 790
The history saving thread hit an unexpected error (OperationalError('attempt to write a readonly database')).History will not be written to the database.
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="dbz",
    level_type="pl",
    level=70,
    lazy=True
)
assert field.attrs["GRIB_count"] == 810
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 16,
        "parameterNumber": 225,
    },
    level_type="pl",
    level=10,
    lazy=True
)
assert field.attrs["GRIB_count"] == 814

cdbz/SHWINX/hi/wi/ht0/PWAT

雷达组合反射率

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
雷达组合反射率cdbz--(0, 16, 224)surface-815
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="cdbz",
    lazy=True
)
assert field.attrs["GRIB_count"] == 815
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 16,
        "parameterNumber": 224,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 815

沙氏指数

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
沙氏指数siSHWINX-(0, 7, 13)surface-816
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="SHWINX",
    lazy=True
)
assert field.attrs["GRIB_count"] == 816
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="si",
    lazy=True
)
assert field.attrs["GRIB_count"] == 816
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 7,
        "parameterNumber": 13,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 816

冰雹指数

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

大风指数

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
大风指数wi--(0, 2, 236)surface-818
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="wi",
    lazy=True
)
assert field.attrs["GRIB_count"] == 818
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 2,
        "parameterNumber": 236,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 818

0度层高度

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

整层可降水量

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

湿位涡垂直分量

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
湿位涡垂直分量mpv1--(0, 2, 225)pl30层821-850
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="mpv1",
    level_type="pl",
    level=1000,
    lazy=True
)
assert field.attrs["GRIB_count"] == 821
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="mpv1",
    level_type="pl",
    level=850,
    lazy=True
)
assert field.attrs["GRIB_count"] == 826
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="mpv1",
    level_type="pl",
    level=70,
    lazy=True
)
assert field.attrs["GRIB_count"] == 846
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 2,
        "parameterNumber": 225,
    },
    level_type="pl",
    level=10,
    lazy=True
)
assert field.attrs["GRIB_count"] == 850