当前位置:网站首页>Matlab / ArcGIS 处理GPM全球月均降水数据
Matlab / ArcGIS 处理GPM全球月均降水数据
2022-07-31 23:53:00 【PeanutbutterBoh】
GPM降水数据网站:https://disc.gsfc.nasa.gov/datasets/GPM_3IMERGM_06/summary?keywords=GPM
这个降水数据的空间分辨率是0.1°(大约10km),全球范围包括海洋。
1 数据下载
进入网站后一般选择Subset,因为并不是需要全球区域的降水,可以根据自己的需要来裁剪。
不过下载数据之前需要注册,点击网站右上角login会引导到注册界面,进行注册即可。注意一定要记住用户名和密码,后续批量下载的时候需要用到。
注册完成之后,使用subset对数据进行日期选择、区域裁剪等处理,注意如果选择区域裁剪要把Use ‘Refine Region’ for geo-spatial subsetting 给勾选上要不然等于没裁剪得到的数据还是全球区域
2 批量下载数据
我这里获取了南海区域2001年1月到2021年12月的降水数据,点击Get Data。
稍等片刻会出现242个文件下载链接,这么多不可能一个一个点击下载。点击Download links list,会下载一个txt文本文件,这个文件里包含了所有数据的下载链接。

这个时候就需要用IDM来创建任务进行批量下载,如何使用IDM可以自行百度一下。
首先要在IDM选项——站点管理里添加一个授权:站点地址为https://urs.earthdata.nasa.gov,用户名和密码就是刚才注册网站的那个
添加完授权之后,复制txt文件中的所有链接,在IDM里点击任务,选择从剪切板中添加批量下载,会自动识别所有的文件下载链接。
出现error先不用管(如果刚才添加授权没问题的情况下),然后全部选择、改保存路径,直接点确定就可以下载了。下载的时候会自动识别降水数据。
下载完毕后可以进行下一步处理。
3 matlab数据单位转换
首先得用arcgis读取一个nc文件,然后将其转换为tif格式
arcgis中使用创建NetCDF栅格文件工具,然后再将数据导出(以下均使用arcgis pro操作其实都是一样的)
导出tif的时候还要注意数据的维度大小,这个要和后面读取在matlab中的数据大小一致要不然没法用这个地理坐标系来保存数据。
随后就可以在matlab里批量转换单位了,因为我要的是年均降水量,所以直接把一年的12个月进行了合成,不过思路都一样改个代码就行。
clear all; clc
[ncname,ncpath] = uigetfile('.nc4','请选择nc文件可多选','MultiSelect','on');
% ncdisp([ncpath,ncname])
[tifname,tifpath] = uigetfile('.tif','选择tif数据'); % 选择刚才导出的tif文件
[A,GeoRef] = geotiffread([tifpath,tifname]);
k = 1;
for i = 1:numel(ncname)
scs_pr = ncread([ncpath,ncname{
i}],'precipitation');
% 这个数据需要上下翻转一下才是真实的地理分布
scs_pr_true = flipud(scs_pr);
year = str2num(ncname{
i}(21:24));
mon = str2num(ncname{
i}(25:26));
monthd = [31,28,31,30,31,30,31,31,30,31,30,31];
if ((mod(year,4)==0 && mod(year,100)~=0) || mod(year,400)==0)
monthd(2) = 29; % 判断是否闰年
end
mon_days = monthd(mon);
scs_pr_mon(:,:,mon) = scs_pr_true .* 24 .* mon_days; % 得到月均降水数据,单位mm
if mod(mon,12) == 0
scs_pr_year = sum(scs_pr_mon,3); % 求该年降水量
scs_pr_year_k(:,:,k) = scs_pr_year;
exp = ['geotiffwrite(''SCS_Pr_year_',num2str(year),'.tif'',scs_pr_year,GeoRef)'];
eval(exp);
clear scs_pr_mon scs_pr_year;
k = k+1;
end
end
scs_pr_year_mean = mean(scs_pr_year_k,3);
geotiffwrite('SCS_Pr_2001to2020_mean.tif',scs_pr_year_mean,GeoRef); % 得到近20年年平均降水量
最后就可以得到近20年南海年平均降水量啦!!!
4 关于数据的准确性
之前我先试着下载了一下2021年7月和8月的降水数据,并且提取出河南省的范围,计算了一下这个GPM的河南省2021年7月和8月的月降水量,发现还算比较吻合,有些偏高了。

边栏推荐
- 基于mysql的消息队列设计
- /usr/local/bin和/usr/bin的区别
- 【1161. 最大层内元素和】
- Thinking and Implementation of Object Cache Service
- One line of code to solve CoreData managed object properties change in SwiftUI problem of animation effects
- "SDOI2016" Journey Problem Solution
- @JsonFormat(pattern="yyyy-MM-dd") time difference problem
- 面试突击69:TCP 可靠吗?为什么?
- MySQL数据库‘反斜杠\’ ,‘单引号‘’,‘双引号“’,‘null’无法存储
- To help the construction of digital government, the three parties of China Science and Technology build a domain name security system
猜你喜欢

消息队列消息存储设计(架构实战营 模块八作业)

A high-quality WordPress download site template theme developed abroad

C# Rectangle basic usage and picture cutting

IJCAI2022 | 代数和逻辑约束的混合概率推理

NIO编程
Carefully organize 16 MySQL usage specifications to reduce problems by 80% and recommend sharing with the team
![[Cloud Residency Co-Creation] [HCSD Big Celebrity Live Broadcast] Personally teach the secrets of interviews in big factories](/img/7a/278ffada1cc660e7f5c2d7c66fa38e.png)
[Cloud Residency Co-Creation] [HCSD Big Celebrity Live Broadcast] Personally teach the secrets of interviews in big factories

浏览器下载快捷方式到桌面(PWA)

What is customer profile management?

TFC CTF 2022 WEB Diamand WriteUp
随机推荐
SVN server construction + SVN client + TeamCity integrated environment construction + VS2019 development
[Reading Notes -> Data Analysis] 02 Data Analysis Preparation
继承和友元,静态成员的关系
Keil nRF52832下载失败
IPD process terminology
/etc/sysconfig/network-scripts configure the network card
[1161. The maximum sum of elements in the layer]
【Acwing】The 62nd Weekly Game Solution
SQL injection Less54 (limited number of SQL injection + union injection)
Unity - by casting and cloning method dynamic control under various UGUI create and display
博弈论(Depu)与孙子兵法(42/100)
编程语言是什么
SQL injection Less42 (POST type stack injection)
LeetCode 第 304 场周赛
硬件设备计算存储及数据交互杂谈
Mysql environment installation under Linux (centos)
SQL injection Less38 (stack injection)
SQL injection Less47 (error injection) and Less49 (time blind injection)
To help the construction of digital government, the three parties of China Science and Technology build a domain name security system
基于mysql的消息队列设计