读SMAP格丽堆栈数据使用python -地球科学交流江南电子竞技平台江南体育网页版 最近30从www.hoelymoley.com 2023 - 07 - 07 - t23:44:28z //www.hoelymoley.com/feeds/question/24759 https://creativecommons.org/licenses/by-sa/4.0/rdf //www.hoelymoley.com/q/24759 3 读SMAP格丽数据使用python irok94 //www.hoelymoley.com/users/28318 2023 - 01 - 17 t09:37:17z 2023 - 01 - 17 t14:29:07z 阅读时< p > < a href = " https://gimms.gsfc.nasa.gov/SMOS/SMAP/L04/ " rel = " nofollow noreferrer " > SMAP < / >数据(格丽格式)使用与cfgrib xarray引擎,未知变量显示为<代码> < / >代码和数据的经度值的约539不应该是可能的。我假设变量被确定为“未知的可能是由于缺少SMAP格丽表数据。Summary of data read using xarray is given below:

<xarray.Dataset> Dimensions: (latitude: 1920, longitude: 2560) Coordinates: time datetime64[ns] ... step timedelta64[ns] ... level float64 ... * latitude (latitude) float64 -89.95 -89.86 -89.77 ... 89.77 89.86 89.95 * longitude (longitude) float64 -179.9 -179.8 -179.6 ... 179.6 179.8 539.9 valid_time datetime64[ns] ... Data variables: unknown (latitude, longitude) float32 ... Attributes: GRIB_edition: 2 GRIB_centre: consensus GRIB_centreDescription: Consensus GRIB_subCentre: 65535 Conventions: CF-1.7 institution: Consensus history: 2023-01-17T14:45 GRIB to CDM+CF via cfgrib-0.9.1... 

The output of wgrib2 is given below:

** WARNING input Code Table 4.3 = 255 (undefined) for 20150402_20150404_anom1.grb2 ** 1:0:d=1970010100:var discipline=1 master_table=2 parmcat=255 parm=255:reserved:anl: 
//www.hoelymoley.com/questions/24759/-/24760 # 24760 3 英格瓦卢卡斯的回答读SMAP格丽数据使用python 英格瓦•卢卡斯 //www.hoelymoley.com/users/18907 2023 - 01 - 17 t14:29:07z 2023 - 01 - 17 t14:29:07z < p >似乎格丽格式是用于分发的数据(可能存储,便于处理?),而卫星SMAP不适合在格丽标准(见可用参数支持格丽标准< a href = " https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4 - 1. - shtml”rel = " nofollow noreferrer " > < / >)。这就是为什么是255(即输入代码。"missing").

I downloaded the file 20150402_20150404_anom1.grb2 and opened in Python using xarray 0.18.2 with cfgrib 0.9.10.1. I cannot see the anomalous longitude.

<xarray.Dataset> Dimensions: (latitude: 1920, longitude: 2560) Coordinates: time datetime64[ns] 1970-01-01 step timedelta64[ns] 00:00:00 level float64 0.0 * latitude (latitude) float64 -89.95 -89.86 -89.77 ... 89.77 89.86 89.95 * longitude (longitude) float64 -179.9 -179.8 -179.6 ... 179.6 179.8 179.9 valid_time datetime64[ns] 1970-01-01 Data variables: unknown (latitude, longitude) float32 nan nan nan nan ... nan nan nan Attributes: GRIB_edition: 2 GRIB_centre: consensus GRIB_centreDescription: Consensus GRIB_subCentre: 65535 Conventions: CF-1.7 institution: Consensus history: 2023-01-17T15:53 GRIB to CDM+CF via cfgrib-0.9.1... 

You can read and process the data in Python in any case using 'unknown' as the variable name:

ds = xr.open_dataset(...) smap = ds.variables['unknown'] lon = ds.variables['longitude'] lat = ds.variables['latitude'] 

2

Baidu
map