MESO要素清单:11-21#
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
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/ref/data-notebook-project/data-notebook/data/cma-meso-1km/grib2/orig/Z_NAFP_C_BABJ_20260725000000_P_CEMC-CMA-MESO-1KM-ORIG-02400.grb2')
总云量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
总云量 |
TCDC |
tcc |
tcc |
(0, 6, 1) |
entireAtmosphere |
- |
11 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="TCDC",
lazy=True
)
assert field.attrs["GRIB_count"] == 11
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="tcc",
lazy=True
)
assert field.attrs["GRIB_count"] == 11
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 6,
"parameterNumber": 1,
},
level_type="entireAtmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 11
低云量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
低云量 |
LCDC |
lcc |
lcc |
(0, 6, 3) |
entireAtmosphere |
- |
12 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="LCDC",
lazy=True
)
assert field.attrs["GRIB_count"] == 12
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="lcc",
lazy=True
)
assert field.attrs["GRIB_count"] == 12
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 6,
"parameterNumber": 3,
},
level_type="entireAtmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 12
中云量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
中云量 |
MCDC |
mcc |
mcc |
(0, 6, 4) |
entireAtmosphere |
- |
13 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="MCDC",
lazy=True
)
assert field.attrs["GRIB_count"] == 13
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="mcc",
lazy=True
)
assert field.attrs["GRIB_count"] == 13
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 6,
"parameterNumber": 4,
},
level_type="entireAtmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 13
高云量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
高云量 |
HCDC |
hcc |
hcc |
(0, 6, 5) |
entireAtmosphere |
- |
14 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="HCDC",
lazy=True
)
assert field.attrs["GRIB_count"] == 14
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="hcc",
lazy=True
)
assert field.attrs["GRIB_count"] == 14
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 6,
"parameterNumber": 5,
},
level_type="entireAtmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 14
大气总柱水汽含量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
大气总柱水汽含量 |
TCIWV |
- |
tvw |
(0, 1, 64) |
atmosphere |
- |
15 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="TCIWV",
lazy=True
)
assert field.attrs["GRIB_count"] == 15
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="tvw",
lazy=True
)
assert field.attrs["GRIB_count"] == 15
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 1,
"parameterNumber": 64,
},
level_type="atmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 15
大气总柱云冰含量#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
大气总柱云冰含量 |
TCOLI |
- |
tiw |
(0, 1, 70) |
atmosphere |
- |
16 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="TCOLI",
lazy=True
)
assert field.attrs["GRIB_count"] == 16
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="tiw",
lazy=True
)
assert field.attrs["GRIB_count"] == 16
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 1,
"parameterNumber": 70,
},
level_type="atmosphere",
lazy=True
)
assert field.attrs["GRIB_count"] == 16
边界层高度#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
边界层高度 |
HPBL |
blh |
pblh |
(0, 3, 18) |
surface |
- |
17 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="HPBL",
lazy=True
)
assert field.attrs["GRIB_count"] == 17
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="blh",
lazy=True
)
assert field.attrs["GRIB_count"] == 17
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="pblh",
lazy=True
)
assert field.attrs["GRIB_count"] == 17
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 3,
"parameterNumber": 18,
},
level_type="surface",
lazy=True
)
assert field.attrs["GRIB_count"] == 17
雷达组合反射率#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
雷达组合反射率 |
- |
- |
cdbz |
(0, 16, 224) |
surface |
- |
18 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="cdbz",
lazy=True
)
assert field.attrs["GRIB_count"] == 18
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 16,
"parameterNumber": 224,
},
level_type="surface",
lazy=True
)
assert field.attrs["GRIB_count"] == 18
输出间隔内最大垂直速度#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
输出间隔内最大垂直速度 |
DZDT |
wz |
w, wmax#1 |
(0, 2, 9) |
pl |
1000 |
19 |
Note
检索输出间隔内最大垂直速度需要增加 stepType="max" 条件,与 1000hPa 垂直速度 (编号133) 区分。
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="DZDT",
level_type="pl",
level=1000,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 19
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="wz",
level_type="pl",
level=1000,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 19
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="w",
level_type="pl",
level=1000,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 19
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="wmax#1",
lazy=True
)
assert field.attrs["GRIB_count"] == 19
输出间隔内最大10mU风#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
输出间隔内最大10mU风 |
UGRD |
10u |
u10mmax#1 |
(0, 2, 2) |
heightAboveGround |
10 |
20 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="UGRD",
level_type="heightAboveGround",
level=10,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 20
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="10u",
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 20
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="u10mmax#1",
lazy=True
)
assert field.attrs["GRIB_count"] == 20
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 2,
"parameterNumber": 2,
},
level_type="heightAboveGround",
level=10,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 20
输出间隔内最大10mV风#
要素名 |
wgrib2 |
eccodes |
cemc |
GRIB Key |
层次类型 |
层次 |
编号 |
|---|---|---|---|---|---|---|---|
输出间隔内最大10mV风 |
VGRD |
10v |
v10mmax#1 |
(0, 2, 3) |
heightAboveGround |
10 |
21 |
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="VGRD",
level_type="heightAboveGround",
level=10,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 21
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="10v",
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 21
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter="v10mmax#1",
lazy=True
)
assert field.attrs["GRIB_count"] == 21
field = load_field_from_file(
meso_grib2_orig_file_path,
parameter={
"discipline": 0,
"parameterCategory": 2,
"parameterNumber": 3,
},
level_type="heightAboveGround",
level=10,
stepType="max",
lazy=True
)
assert field.attrs["GRIB_count"] == 21