CMORPH介绍 CMORPH是由美国气候预测中心(Climate Prediction Center, CPC)在多种微波降水数据和红外数据的基础上研制的全球高时空分辨率降水数据,适用于研究从中尺度到年际范围内的降水及其时空变化。
该数据的生成算法为:将多个卫星的红外观测资料生成降水事件发生的运动矢量,对低轨卫星被动微波反演而得的瞬时降水分布沿着该运动矢量推至目标时间以得到空间连续的降水分布。利用SSM/I算法、AMSU-B算法和TMI算法对微波降水算法的估计进行结合,这种方法较为灵活,任何微波来源的降水估计都可以被纳入其中。
CMORPH日数据下载地址:https://www.ncei.noaa.gov/data/cmorph-high-resolution-global-precipitation-estimates/access/daily/0.25deg
Image Name 导入模块 import refrom bs4 import BeautifulSoupimport urllib.requestimport os
下载脚本 for year in range(2008 ,2009 ): os.mkdir('/home/mw/work/' +str(year)) for month in range(1 ,2 ): url = 'https://www.ncei.noaa.gov/data/cmorph-high-resolution-global-precipitation-estimates/access/daily/0.25deg/' +str(year) + "/" + str(month).zfill(2 ) +"/" print(url) my_url = urllib.request.urlopen(url).read().decode('ascii' ) soup = BeautifulSoup(my_url,'html.parser' ) url_list = soup.find_all(href=re.compile(".nc" )) #根据目标文件的格式更改后缀 urls = [] for i in url_list[0 :]: urls.append(url+i.get('href' )) for i, url in enumerate(urls): file_name = str(year) + '/' + url.split('/' )[-1 ] #保存数据的路径 if os.path.isfile(file_name): print('已存在' , file_name) else : urllib.request.urlretrieve(url, '/home/mw/work/' +file_name) print('正下载' , file_name)
数据下载结果 !ls /home/mw/work/2008
CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080101.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080102.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080103.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080104.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080105.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080106.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080107.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080108.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080109.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080110.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080111.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080112.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080113.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080114.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080115.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080116.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080117.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080118.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080119.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080120.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080121.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080122.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080123.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080124.nc
CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080125.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080126.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080127.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080128.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080129.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080130.nc CMORPH_V1.0_ADJ_0.25deg-DLY_00Z_20080131.nc
import xarray as xr ds = xr.open_mfdataset('/home/mw/work/2008/*.nc' ) ds
Dimensions: (time: 31, nv: 2, lat: 480, lon: 1440) Coordinates:time (time) datetime64[ns] 2008-01-01 2008-01-02 ... 2008-01-31 lat (lat) float32 -59.88 -59.62 -59.38 -59.12 ... 59.38 59.62 59.88 lon (lon) float32 0.125 0.375 0.625 0.875 ... 359.4 359.6 359.9 Dimensions without coordinates: nv Data variables: time_bounds (time, nv) datetime64[ns] dask.array lat_bounds (time, lat, nv) float32 dask.array lon_bounds (time, lon, nv) float32 dask.array cmorph (time, lat, lon) float32 dask.array Attributes: (12/57) ncei_template_version: NCEI_NetCDF_Grid_template_V2.0 title: NOAA Climate Data Record (CDR) of CPC Morphin... keywords: Precipitation, Satellite, High-Resolution, Gl... summary: The CMORPH CDR is a reprocessed and bias-corr... references: Xie, P., et al. (2017), Reprocessed, Bias-Cor... Conventions: CF-1.6, ACDD-1.3 ... ... geospatial_lat_resolution: 0.25 geospatial_lat_units: degrees_north geospatial_lon_min: 0.0 geospatial_lon_max: 360.0 geospatial_lon_resolution: 0.25 geospatial_lon_units: degrees_east # 2008年1月平均降雨量 ds.cmorph.mean(dim='time' ).plot()
1. 在好奇心Log 公众号后台回复CMORPH