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/ref/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/ref/data-notebook-project/data-notebook/data/cma-gfs/grib2/orig/Z_NAFP_C_BABJ_20260725000000_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

雷达反射率#

要素名

wgrib2

eccodes

cemc

GRIB Key

层次类型

层次

编号

雷达反射率

-

-

dbz

(0, 16, 225)

pl

30层

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

雷达组合反射率#

要素名

wgrib2

eccodes

cemc

GRIB 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

沙氏指数#

要素名

wgrib2

eccodes

cemc

GRIB Key

层次类型

层次

编号

沙氏指数

SHWINX

-

si

(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

冰雹指数#

要素名

wgrib2

eccodes

cemc

GRIB 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

大风指数#

要素名

wgrib2

eccodes

cemc

GRIB 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度层高度#

要素名

wgrib2

eccodes

cemc

GRIB 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

整层可降水量#

要素名

wgrib2

eccodes

cemc

GRIB Key

层次类型

层次

编号

整层可降水量

PWAT

pwat

pwat

(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

位涡#

要素名

wgrib2

eccodes

cemc

GRIB Key

层次类型

层次

编号

位涡

-

-

mpv1

(0, 2, 225)

pl

30层

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