python - 绘制一个未知的 netcdf 文件(没有 ncview)
问题描述
我从 python 中的 netcdf 开始,我想知道更多选项来以友好的方式查看 netcdf
在光栅情况(2D 或 3D)中,我可以使用 ncview,但有些情况只给我经度、纬度和其他变量(例如高度)或保存多边形轮廓或线条,我想以一种友好的方式可视化(如在 QGis 格式中)以便有更好的数据概览
import netCDF4
src = netCDF4.Dataset(file)
var_names = src.variables.keys()
float32 nav_lat(y, x)
units: degrees_north
long_name: Latitude
unlimited dimensions:
current shape = (10800, 21600)
float32 upst(y, x)
axis: TYX
units: m2
long_name: area
associate: nav_lat nav_lon
coordinates: nav_lat nav_lon
unlimited dimensions:
current shape = (10800, 21600)
解决方案
You could try it with ncplot (https://pypi.org/project/ncplot/) which provides ncview style auto-plotting in Python.:
from ncplot import view
view(file)
Though if ncview cannot automatically plot it, there may be some data issues.ncview should be able to handle almost anything.
推荐阅读
- sql - 查询显示不正确的排序
- asp.net-core - 如何在每个操作的基础上覆盖 RouteOptions.LowercaseUrls?
- sql-server - SSRS 用户访问特定文件夹
- android - 更新 targetSdkVersion 28(非市场)中的 APK 问题
- c# - WPF UserControl:绑定不起作用,更新相关属性的问题和不可编辑的文本框
- json - 在 React 中循环和更新数据
- sql-server - 在 SQL Server 中执行 sp_executesql 超出长度
- php - Laravel Voyager 图像在服务器上传后损坏
- asp.net-mvc - 如何提高服务器平衡?
- epub - EPUB 验证,需要规范