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要素清单:851-861

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')

light/VIS/fogh/fogod/GUST/

雷电概率

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
雷电概率light--(0, 1, 238)surface-851
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="light",
    lazy=True
)
assert field.attrs["GRIB_count"] == 851
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 1,
        "parameterNumber": 238,
    },
    level_type="surface",
    lazy=True
)
assert field.attrs["GRIB_count"] == 851

能见度

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

雾顶高度 / 光学厚度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
雾顶高度fogh--(0, 19, 224)surface-853
光学厚度fogod--(0, 19, 225)surface-854
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="fogh",
    lazy=True
)
assert field.attrs["GRIB_count"] == 853
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 19,
        "parameterNumber": 224,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 853
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="fogod",
    lazy=True
)
assert field.attrs["GRIB_count"] == 854
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 19,
        "parameterNumber": 225,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 854

阵风风速

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

降水类型

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

CDCTOP/CDCB/CEIL

云顶高度

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

云底高度

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

云幂高度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
云幂高度ceilingCEILceil(0, 6, 13)surface-859
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="CEIL",
    lazy=True
)
assert field.attrs["GRIB_count"] == 859
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="ceil",
    lazy=True
)
assert field.attrs["GRIB_count"] == 859
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter="ceiling",
    lazy=True
)
assert field.attrs["GRIB_count"] == 859
field = load_field_from_file(
    gfs_grib2_orig_file_path,
    parameter={
        "discipline": 0,
        "parameterCategory": 6,
        "parameterNumber": 13,
    },
    lazy=True
)
assert field.attrs["GRIB_count"] == 859

bti/btv

卫星红外通道模拟亮温

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

卫星水汽通道模拟亮温

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