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.

GEPS要素清单:112-130

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

geps_grib2_orig_file_path = get_data_file("cma-geps")
geps_grib2_orig_file_path
PosixPath('/home/wangdp/project/cedarkit/notebook-project/notebook-devel/repo/data-notebook-project/data-notebook/data/cma-geps/grib2/orig/Z_NAFP_C_BABJ_20260811000000_P_NWPC-GRAPES-GEPS-GLB-02400-m001.grib2')

等压面:相对湿度

层次

17 层列表(百帕 (hPa)):

  • 1000

  • 975

  • 950

  • 925

  • 900

  • 850

  • 800

  • 750

  • 700

  • 650

  • 600

  • 550

  • 500

  • 400

  • 300

  • 200

  • 100

相对湿度

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
相对湿度rhRHr(0, 1, 1)pl17层112-128
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="RH",
    level_type="pl",
    level=100,
    lazy=True
)
assert field.attrs["GRIB_count"] == 112
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="r",
    level_type="pl",
    level=550,
    lazy=True
)
assert field.attrs["GRIB_count"] == 117
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="rh",
    level_type="pl",
    level=850,
    lazy=True
)
assert field.attrs["GRIB_count"] == 123
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter={"discipline": 0, "parameterCategory": 1, "parameterNumber": 1},
    level_type="pl",
    level=1000,
    lazy=True
)
assert field.attrs["GRIB_count"] == 128

阵风与能见度

阵风风速

要素名cemcwgrib2eccodesGRIB Key层次类型层次编号
阵风风速gustGUSTi10fg(0, 2, 22)heightAboveGround10129
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="GUST",
    lazy=True
)
assert field.attrs["GRIB_count"] == 129
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="i10fg",
    lazy=True
)
assert field.attrs["GRIB_count"] == 129
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter="gust",
    lazy=True
)
assert field.attrs["GRIB_count"] == 129
field = load_field_from_file(
    geps_grib2_orig_file_path,
    parameter={"discipline": 0, "parameterCategory": 2, "parameterNumber": 22},
    lazy=True
)
assert field.attrs["GRIB_count"] == 129

能见度

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