爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4394|回复: 1

MeteoInfoLab脚本示例:格点插值到格点

[复制链接]

新浪微博达人勋

发表于 2019-6-27 09:03:04 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 MeteoInfo 于 2022-3-30 09:14 编辑

格点数据有时需要插值到另一个范围和分辨率的网格上,可以用 linint2 函数来插值。

  1. fn = os.path.join(migl.get_sample_folder(), 'GrADS', 'model.ctl')
  2. f = addfile(fn)
  3. ps = f['PS'][:]
  4. ps = ps[:,'10:60','60:140']
  5. lon = arange(50, 141, 2.5)
  6. lat = arange(5, 66, 2.5)

  7. #Interpolate
  8. nps = interpolate.linint2(ps, lon, lat)

  9. #Plot
  10. levs = arange(500, 1021, 20)
  11. subplot(2,1,1,axestype='map')
  12. geoshow('continent', edgecolor=(0,0,255))
  13. imshow(ps[1,:,:], levs)
  14. title('Pressure - origin')
  15. colorbar()

  16. subplot(2,1,2,axestype='map')
  17. geoshow('continent', edgecolor=(0,0,255))
  18. imshow(lon, lat, nps[1,:,:], levs)
  19. title('Pressure - linint2')
  20. colorbar()


linint2.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-6-27 10:25:20 | 显示全部楼层
{:eb502:}{:eb502:}
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表