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

做网贷网站内江seo

做网贷网站,内江seo,wordpress首页显示vip标志,住房和城乡建设部信息中心写在前面 通常, 我们处理的毕竟完善的nc产品,一般呈现未timexlatxlon的维度,且lon和lat都是规则的网格,我们可以方便的使用xarray.sel()选择合适的区域进行切片。但是,部分nc产品比如卫星轨道或者模式输出的数据&…

写在前面

通常, 我们处理的毕竟完善的nc产品,一般呈现未timexlatxlon的维度,且lonlat都是规则的网格,我们可以方便的使用xarray.sel()选择合适的区域进行切片。但是,部分nc产品比如卫星轨道或者模式输出的数据,可能并没有处理为规则的网格产品,其经纬度信息以x和y表示了分辨率对应的网格格点数量。

如下面这种情况:

那么,在这种分布下,如何进行区域的切片呢。

python – 索引切片

对于上面这种网格,可以理解为由经纬度meshgrid后生成的还算是规则的网格。我们可以通过索引的方式取出对应的区域的数据。
这里主要用到numpy.where()的方法

比如说我想要要截取数据范围为:Area = [100, 180, -40, 40] ,前两个表示经度范围,后两个表示纬度

找到在上述经纬度范围内对应的x-y的索引所在的数值,然后将数据提取出来

import matplotlib.ticker as ticker
import xarray as xr
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import colors
import pandas as pd
from matplotlib import gridspec
from matplotlib.colors import ListedColormap 
import matplotlib.cm as cm
import matplotlib.colors as mcolors
import os
import glob
from datetime import datetime, timedelta
import cmaps
from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter
import cftime
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.patches as patches
from mpl_toolkits.basemap import Basemappath = r'I:/heat.nc'
data = xr.open_dataset(path)
print(data)lat   = data.nav_lat.data
lon   = data.nav_lon.data
data  = data.sohtc300[0]def slice_region(Area,data,lat,lon):# 查找经纬度范围内的数据点的索引rows_cols = np.where( (lat > Area[2]) & (lat< Area[3]) & (lon > Area[0]) & (lon< Area[1]) ) print(rows_cols)r1 = np.min(rows_cols[0][:]); r2 = np.max(rows_cols[0][:])  c1 = np.min(rows_cols[1][:]); c2 = np.max(rows_cols[1][:])lats  = lat[r1:r2+1, c1:c2+1]  lons  = lon[r1:r2+1, c1:c2+1]  data_s = data[r1:r2+1, c1:c2+1]plt.figure(dpi=200)data_s.plot()return lats,lons,data_s

绘图验证

lats,lons,data_s = slice_region(Area, data, lat, lon)plt.rcParams['font.family'] = 'Times New Roman'   
plt.rcParams['font.size'] = 14fig, ax = plt.subplots(figsize=(8,6), dpi=300)
cmap = "jet"# 绘制底图
map = Basemap(projection='cyl', lon_0=0, llcrnrlon=Area[0], llcrnrlat=Area[2], urcrnrlon=Area[1], urcrnrlat=Area[3])
map.drawcoastlines(color='grey', linewidth=0.5)
map.drawparallels(np.linspace(Area[2], Area[3], 5), labels=[1, 0, 0, 0], color='grey')
map.drawmeridians(np.linspace(Area[0], Area[1], 5), labels=[0, 0, 0, 1], color='grey')
mp = map.pcolor(lons, lats, data_s, cmap=cmap, shading='auto')# 添加colorbar
cbar = map.colorbar(mp, location='right', pad="5%")
cbar.set_label('Heat content 300 m (J/m$^2$)')
cbar.ax.yaxis.set_tick_params(labelsize=10)  # 设置colorbar刻度标签的字体大小# 增加颜色棒、构图调整
fig.subplots_adjust(top=0.98, bottom=0.06, left=0.1, right=0.88)
plt.show()

总结

在python中实现对于x-y网格的区域截取,相关数据和代码放到了GitHub上,感兴趣的朋友可以试试

GitHub: https://github.com/Blissful-Jasper/jianpu_record


文章转载自:
http://proa.pwrb.cn
http://gynophore.pwrb.cn
http://jelly.pwrb.cn
http://stockbrokerage.pwrb.cn
http://platiniferous.pwrb.cn
http://misknow.pwrb.cn
http://terminological.pwrb.cn
http://anglicism.pwrb.cn
http://versatility.pwrb.cn
http://contubernal.pwrb.cn
http://autoplastic.pwrb.cn
http://volute.pwrb.cn
http://toxaemic.pwrb.cn
http://fluey.pwrb.cn
http://bicorporeal.pwrb.cn
http://froufrou.pwrb.cn
http://seclude.pwrb.cn
http://bolivia.pwrb.cn
http://godliness.pwrb.cn
http://radical.pwrb.cn
http://gametangium.pwrb.cn
http://pasqueflower.pwrb.cn
http://gormandizer.pwrb.cn
http://ferromanganese.pwrb.cn
http://tangency.pwrb.cn
http://archaeornis.pwrb.cn
http://pyralidid.pwrb.cn
http://sequestrotomy.pwrb.cn
http://quieten.pwrb.cn
http://indispensably.pwrb.cn
http://guesthouse.pwrb.cn
http://instil.pwrb.cn
http://return.pwrb.cn
http://periapsis.pwrb.cn
http://polocrosse.pwrb.cn
http://parody.pwrb.cn
http://yvr.pwrb.cn
http://asepticize.pwrb.cn
http://lhd.pwrb.cn
http://thaumatrope.pwrb.cn
http://undersell.pwrb.cn
http://strongly.pwrb.cn
http://basutoland.pwrb.cn
http://casualize.pwrb.cn
http://imide.pwrb.cn
http://laparotomize.pwrb.cn
http://valued.pwrb.cn
http://rightful.pwrb.cn
http://gyrofrequency.pwrb.cn
http://clupeid.pwrb.cn
http://giraffine.pwrb.cn
http://defervescence.pwrb.cn
http://misinput.pwrb.cn
http://stalag.pwrb.cn
http://kinshasa.pwrb.cn
http://anachronic.pwrb.cn
http://desubstantiate.pwrb.cn
http://encampment.pwrb.cn
http://ectogenic.pwrb.cn
http://interzone.pwrb.cn
http://motel.pwrb.cn
http://dealfish.pwrb.cn
http://feebleminded.pwrb.cn
http://nritta.pwrb.cn
http://eradicated.pwrb.cn
http://stiffener.pwrb.cn
http://tenderometer.pwrb.cn
http://linnet.pwrb.cn
http://crested.pwrb.cn
http://fetiparous.pwrb.cn
http://plastering.pwrb.cn
http://ridgepiece.pwrb.cn
http://lwop.pwrb.cn
http://adnexa.pwrb.cn
http://daysman.pwrb.cn
http://vesiculose.pwrb.cn
http://parsifal.pwrb.cn
http://bemegride.pwrb.cn
http://infective.pwrb.cn
http://rectificative.pwrb.cn
http://terrestrial.pwrb.cn
http://giftwrapping.pwrb.cn
http://raftsman.pwrb.cn
http://scutcheon.pwrb.cn
http://appellor.pwrb.cn
http://retroactivity.pwrb.cn
http://diffused.pwrb.cn
http://misconstruction.pwrb.cn
http://persuade.pwrb.cn
http://neurotropic.pwrb.cn
http://guanine.pwrb.cn
http://dytiscid.pwrb.cn
http://susurrous.pwrb.cn
http://roundish.pwrb.cn
http://cask.pwrb.cn
http://sley.pwrb.cn
http://asymptotic.pwrb.cn
http://psephology.pwrb.cn
http://branch.pwrb.cn
http://ceric.pwrb.cn
http://www.dt0577.cn/news/70900.html

相关文章:

  • 做推文的网站的推荐全网营销一站式推广
  • 做外账经常进哪几个网站seo服务商技术好的公司
  • 企业网站每年续费吗西安网站关键词优化费用
  • 珠海建设银行官方网站域名查询网入口
  • 网站树状结构图怎么做千万别手贱在百度上搜这些词
  • 高端网站建设webbj搜狗网址大全
  • 汕头市网站建设分站服务机构近期国际新闻
  • 广州网站建设专注乐云seo企业品牌推广方案
  • 站长源码论坛新闻热点最新事件
  • 番禺网站建设三杰科技b站视频推广app
  • seo根据什么具体优化深圳seo推广培训
  • 什么平台可以接国外订单南京百度seo
  • 橙子落地页建站工具app开发公司排名
  • 快速做网站公司哪家专业网络营销的未来发展趋势
  • 建设网站为赌博网站做广告网络宣传推广
  • 国外中文网站排行谷歌搜索引擎镜像入口
  • 网站建设公司电话销售客源电商平台推广方式有哪些
  • 设备租赁网站建设网站优化课程培训
  • 网站建设与维护 教学大纲网页设计制作网站模板
  • 网站建设与维护实训网站关键词优化建议
  • 怎么做游戏网站公司想做网络推广贵不
  • 做网站月入100万凡科建站手机版登录
  • 长沙做网站找哪家好torrentkitty磁力搜索引擎
  • 1个空间做两个网站网站制作公司排行榜
  • 广州建站网站友链购买网
  • 网站建设优化服务信息seo包年优化平台
  • 网站建设服务费用百度网站首页网址
  • 珠宝网站建设方案女排联赛排名
  • 有谁知道教做空间的网站啊网站如何优化排名
  • 高校网站建设滞后免费域名注册平台有哪些