有没有办法从python中的MODIS MCD19A2文件生成网格信息(lat-lon)?。 文件下载自 Link to the data file 。在MATLAB中,可以使用以下块代码
import matlab.io.hdf4.*
import matlab.io.hdfeos.*
% Open the HDF-EOS2 Grid file.
FILE_NAME='MCD19A2.A2010010.h25v06.006.2018047103710.hdf';
file_id = gd.open(FILE_NAME, 'rdonly');
% Read data from a data field.
GRID_NAME='grid1km';
grid_id = gd.attach(file_id, GRID_NAME);
DATAFIELD_NAME='Optical_Depth_055';
[data, lat, lon] = gd.readField(grid_id, DATAFIELD_NAME, [], [], []);
简而言之,我正在寻找一个pyhdf/python等价的gd.readField文件关于MATLAB package
HDF-EOS工具和信息中心帮助很好地提供了一个脚本来处理网格定义。这可以在here找到。如果链接不起作用,代码如下:
相关问题 更多 >
编程相关推荐