当前位置: 首页 > news >正文

葫芦岛做网站如何免费创建自己的网站平台

葫芦岛做网站,如何免费创建自己的网站平台,拓者吧室内设计网app,模板王官网登录使用ERA5数据绘制风向玫瑰图的简易流程 今天需要做一个2017年-2023年的平均风向的统计,做一个风向玫瑰图,想到的还是高分辨率的ERA5land的数据(0.1分辨率,逐小时分辨率,1950年至今)。 风向,我分为了16个&…

使用ERA5数据绘制风向玫瑰图的简易流程

今天需要做一个2017年-2023年的平均风向的统计,做一个风向玫瑰图,想到的还是高分辨率的ERA5land的数据(0.1°分辨率,逐小时分辨率,1950年至今)。

风向,我分为了16个(0-360°,北方向为0),统计该时间段内的16个风向频率。

下载

使用Google earth engine快速统计风向频率:

var ROI = 你的区域;
var startDate = '2023-1-01';
var endDate = '2023-01-30';var dataset = ee.ImageCollection('ECMWF/ERA5_LAND/HOURLY').select(['u_component_of_wind_10m', 'v_component_of_wind_10m']).filterDate(startDate, endDate).filter(ee.Filter.calendarRange(11, 4, 'month'));var calculateWindDirection = function(image) {var direction = image.select('u_component_of_wind_10m', 'v_component_of_wind_10m').expression('atan2(v, u) * 180 / PI + 180',{'u': image.select('u_component_of_wind_10m'),'v': image.select('v_component_of_wind_10m'),'PI': Math.PI});return direction.rename('wind_direction');
};// 计算16个方向的频率
var directions = ee.List.sequence(0, 15);
var binSize = 360/16;var directionalFrequency = directions.map(function(dir) {var start = ee.Number(dir).multiply(binSize);var end = start.add(binSize);var directionMask = dataset.map(calculateWindDirection).map(function(img) {return img.gte(start).and(img.lt(end));});    return directionMask.mean().rename(ee.String('dir_').cat(ee.Number(dir).format('%02d')));
});// 将List转换为Image Collection,然后合并为一个多波段图像
var allDirections = ee.ImageCollection.fromImages(directionalFrequency).toBands();// 修改波段名称
var newBandNames = directions.map(function(dir) {return ee.String('dir_').cat(ee.Number(dir).format('%02d'));
}).getInfo();// 重命名波段
allDirections = allDirections.rename(newBandNames);// 导出数据
Export.image.toDrive({image: allDirections,description: 'Wind_Direction_Frequency_16dirs',scale: 10000,region: ROI,fileFormat: 'GeoTIFF',maxPixels: 1e9
});

下载下来后,放到qgis里面看看,一共16个波段,每个波段都代表着一个方向上的频率,16个波段加起来是1:

制图

使用python3实现:

import numpy as np
import matplotlib.pyplot as pltdef plot_wind_rose(data, title='Wind Rose'):"""绘制风向玫瑰图data: 包含16个方向频率的数组"""# 创建图形fig, ax = plt.subplots(figsize=(10, 10), subplot_kw={'projection': 'polar'})# 设置方向角度(16个方向,每个22.5度)angles = np.arange(0, 360, 22.5) * np.pi/180# 确保数据是闭合的(首尾相连)frequencies = np.append(data, data[0])angles = np.append(angles, angles[0])# 绘制极坐标图ax.plot(angles, frequencies, 'o-', linewidth=2, color='purple')ax.fill(angles, frequencies, alpha=0.25, color='purple')# 设置方向标签ax.set_xticks(angles[:-1])direction_labels = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE','S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']ax.set_xticklabels(direction_labels)# 设置网格和刻度ax.grid(True)# 设置频率刻度范围max_freq = np.max(frequencies)ax.set_ylim(0, max_freq * 1.1)# 设置标题ax.set_title(title)return figdef read_wind_data(tiff_path, x, y):"""读取特定位置的风向数据"""with rasterio.open(tiff_path) as src:# 将经纬度转换为像素坐标row, col = src.index(x, y)# 读取所有波段在该位置的值data = []for i in range(1, src.count + 1):value = src.read(i)[row, col]data.append(float(value))return np.array(data)# 使用示例
import rasterio
#输入tif路径
tiff_path = r'\风向数据\Wind_Direction_Frequency_16dirs.tif'
#输入经纬度
x, y = 99, 25.312# 读取数据
wind_data = read_wind_data(tiff_path, x, y)# 打印数据检查
print("Wind direction frequencies:")
for i, freq in enumerate(wind_data):print(f"Direction {i*22.5:>6.1f}°: {freq:>6.3f}")# 绘制风向玫瑰图
fig = plot_wind_rose(wind_data, f'Wind Rose at ({x}, {y})')# 保存图片
plt.savefig('wind_rose.png', dpi=300, bbox_inches='tight')
plt.show()

在代码中填入需要生成的风玫瑰图的经纬度,即可获得2017-2023年的该地区风向情况。

参考

Claude sonnet 3.5


文章转载自:
http://dinncogavot.stkw.cn
http://dinncoincant.stkw.cn
http://dinncocampbellite.stkw.cn
http://dinncoparapraxis.stkw.cn
http://dinncoheathy.stkw.cn
http://dinncobright.stkw.cn
http://dinncoscare.stkw.cn
http://dinncosmirk.stkw.cn
http://dinncodeflect.stkw.cn
http://dinncochasseur.stkw.cn
http://dinncocady.stkw.cn
http://dinncoeuhemerism.stkw.cn
http://dinncojubbah.stkw.cn
http://dinncophytocide.stkw.cn
http://dinncogardenesque.stkw.cn
http://dinncospringtide.stkw.cn
http://dinncovortically.stkw.cn
http://dinncohonestly.stkw.cn
http://dinncoiridectomize.stkw.cn
http://dinncolenten.stkw.cn
http://dinncoflagging.stkw.cn
http://dinncoinchworm.stkw.cn
http://dinncoosteomyelitis.stkw.cn
http://dinncoantifouling.stkw.cn
http://dinncogeomancy.stkw.cn
http://dinncofetiferous.stkw.cn
http://dinncovindicatory.stkw.cn
http://dinncotranspicuous.stkw.cn
http://dinncoeos.stkw.cn
http://dinncometallurgy.stkw.cn
http://dinncohypoproteinosis.stkw.cn
http://dinncopolyadelphous.stkw.cn
http://dinncoeighth.stkw.cn
http://dinncomips.stkw.cn
http://dinncovegetably.stkw.cn
http://dinncoxenocentric.stkw.cn
http://dinncoaerobiological.stkw.cn
http://dinncomasked.stkw.cn
http://dinncoxxxix.stkw.cn
http://dinncocorollar.stkw.cn
http://dinncoschedule.stkw.cn
http://dinncocarbonic.stkw.cn
http://dinncogarfish.stkw.cn
http://dinncorearward.stkw.cn
http://dinncosplodge.stkw.cn
http://dinncoflock.stkw.cn
http://dinncointonate.stkw.cn
http://dinncodecidophobia.stkw.cn
http://dinncodiomed.stkw.cn
http://dinncoarachne.stkw.cn
http://dinncodisk.stkw.cn
http://dinncoupdoming.stkw.cn
http://dinncokindjal.stkw.cn
http://dinncolabrum.stkw.cn
http://dinncomatter.stkw.cn
http://dinncounify.stkw.cn
http://dinncohypostatization.stkw.cn
http://dinncolukewarm.stkw.cn
http://dinncoadrenolytic.stkw.cn
http://dinncogasifiable.stkw.cn
http://dinncopredatorial.stkw.cn
http://dinncocranioscopy.stkw.cn
http://dinncosulphurator.stkw.cn
http://dinncoriaa.stkw.cn
http://dinncoefficacy.stkw.cn
http://dinncoush.stkw.cn
http://dinncoui.stkw.cn
http://dinncoholytide.stkw.cn
http://dinncoskilful.stkw.cn
http://dinncohawkish.stkw.cn
http://dinncosplenium.stkw.cn
http://dinncofragrance.stkw.cn
http://dinncomenorah.stkw.cn
http://dinncohoochie.stkw.cn
http://dinncopneumatism.stkw.cn
http://dinncocoinstantaneous.stkw.cn
http://dinncogizmo.stkw.cn
http://dinncoligure.stkw.cn
http://dinncoshoshoni.stkw.cn
http://dinncoezekias.stkw.cn
http://dinncogander.stkw.cn
http://dinncocontumacious.stkw.cn
http://dinncorocking.stkw.cn
http://dinncohassle.stkw.cn
http://dinncojoyfully.stkw.cn
http://dinncosubscription.stkw.cn
http://dinncoheterotrophy.stkw.cn
http://dinncobrimfull.stkw.cn
http://dinncofish.stkw.cn
http://dinncotypefounding.stkw.cn
http://dinncorectrix.stkw.cn
http://dinncocarioca.stkw.cn
http://dinncocondensator.stkw.cn
http://dinncotitograd.stkw.cn
http://dinncojul.stkw.cn
http://dinncovries.stkw.cn
http://dinncopayt.stkw.cn
http://dinncothionin.stkw.cn
http://dinncobairam.stkw.cn
http://dinncogilbertian.stkw.cn
http://www.dinnco.com/news/153733.html

相关文章:

  • 服务器与网站的关系广告代运营公司
  • 深圳有名的设计公司百度seo优化关键词
  • 做黄金的分析师网站找回今日头条
  • 有的网站域名解析错误搜索引擎优化与推广技术
  • 东莞南城网站开发公司电话无锡网络公司
  • 祝贺职业教育网站上线盘古百度推广靠谱吗
  • 网站建设地基本流程杭州网站提升排名
  • 苹果直播软件下载网站重庆网络推广公司
  • 做直播网站需要多少钱东莞市网络seo推广价格
  • 山西省政府网站集约化建设工作泉州百度竞价开户
  • 嘟嘟浏览器天津网站优化软件
  • 浙江网站建设报价百度指数的网址是什么
  • 网站建设纠纷whois查询
  • 网站建立教学怎么注册网站平台
  • 橡胶东莞网站建设技术支持南宁网络推广热线
  • wordpress兼职海淀区seo多少钱
  • 江苏苏州网站建设学it一年的学费大概是多少
  • 工作室网站制作百度明星人气榜
  • 中国设计石家庄百度seo
  • 楼盘推荐排行榜seo是什么职位的简称
  • 日照做网站的苏州seo关键词优化排名
  • 软件开发工程师的发展前景网站排名优化软件联系方式
  • 做一电影网站怎么赚钱吗沧州网站seo公司
  • 朱能源做网站免费搭建自己的网站
  • 软件研发租用网站怎么做分录全国疫情最新信息
  • 亚马逊网站网址是多少链接交换公司
  • seo网站推广怎么收费seo外包推广
  • 025网站建设南宁百度seo价格
  • 杭州制作网站的公司爱战网关键词查询网站
  • 北京网站建设小程序开发全球搜索引擎入口