matlab读取中国1km分辨率逐月降水量/逐月平均气温数据集(1901-2022)
该摘要描述了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的转换过程:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:该文本提供了一个从NETCDF格式向量数据到TIF raster georeferenced geospatial raster data的过程示例:
开源免费开放的两个气候数据分析集合——《中国 1 公里分辨率逐月平均温度数据集(1901-2022)》与《中国 1 公里分辨率逐月降水量数据集(1901-2022)》,它们均以 NETCDF 格式(.nc 文件类型)存储原始数据。为了满足分析需求,现需将其转换为 TIFF 格式。建议采用 MATLAB 软件进行读取操作,请参考以下代码:
数据的引用: 作为资源被使用。
彭守璋. The People's Republic of China 1-km spatial resolution monthly mean temperature datasets (1901-2022). State Tibetan Plateau Science Data Center, https://doi.org/10.11888/MeteoR.tpdc.270961
Peng Shouzhang presents the one-kilometer spatial resolution monthly precipitation dataset for China spanning from 1901 to 2022, accessible through the Three-Dimensional Spatio-Temporal Environmental Data Platform, with its DOI identifier 10.5281/zenodo.3185722
该系统采用三年一期的时间划分策略,在数字成图(NC)文件中构建了包含36个波段的数据结构
1. ncFilePath=['F:\pre_2000_2002.nc'];
2. lon=ncread(ncFilePath,'lon');
3. lat=ncread(ncFilePath,'lat');
4. time=ncread(ncFilePath,'time');
5. pre=ncread(ncFilePath,'pre');
6. k=0;
7. for y=2000:2002
8. for j=1:12
9. k=k+1;
10. pre1=pre(:,:,k);
11. data=flipud(pre1');
12. data(data==-32768)=NaN;
13. R = georasterref('RasterSize', size(data),'Latlim', [double(min(lat)) double(max(lat))], 'Lonlim', [double(min(lon)) double(max(lon))]);%地理栅格数据参考对象(类)
14. filename1=['F:\pre_',num2str(y),'_',num2str(j),'.tif'];
15. geotiffwrite(filename1,data,R);
16. end
17. end
Matlab

在年度周期内的一次更新中使用的一种文件类型共有12个部分
1. ncFilePath=['F:\tmp_2020.nc'];
2. lon=ncread(ncFilePath,'lon');
3. lat=ncread(ncFilePath,'lat');
4. time=ncread(ncFilePath,'time');
5. tmp=ncread(ncFilePath,'tmp');
6. for k=1:12
7. tmp1=tmp(:,:,k);
8. data=flipud(tmp1');
9. data(data==-32768)=NaN;
10. R = georasterref('RasterSize', size(data),'Latlim', [double(min(lat)) double(max(lat))], 'Lonlim', [double(min(lon)) double(max(lon))]);%地理栅格数据参考对象(类)
11. filename1=['F:\tmp_2020\tmp_2020','_',num2str(k),'.tif'];
12. geotiffwrite(filename1,data,R);
13. end
Matlab

