Python 读取MODIS叶绿素-a浓度.nc文件

36 篇文章 24 订阅
27 篇文章 18 订阅

 从nasa MODIS官方网站通过FTP获取的日数据,用于分析海洋叶绿素浓度,其数据格式为 .nc文件,

This algorithm returns the near-surface concentration of chlorophyll-a (chlor_a) in mg m-3, calculated using an empirical relationship derived from in situ measurements of chlor_a and blue-to-green band ratios of in situ remote sensing reflectances (Rrs). Implementation is contingent on the availability three or more sensor bands spanning the 440 - 570 nm spectral regime. The algorithm is applicable to all current ocean color sensors.

这种文件格式需要进行转换,和空间位置匹配,通过ArcGIS或者ENVI,可以实现,但是日数据进行月合成、季度合成,就显得力不从心了。图下为ArcGIS和ENVI打开图示:

.nc文件为HDF5/NetCDF4格式文件,在python使用h5py或者netCDF4包进行解析。

解析过程如下:


、通过h5py获取叶绿素波段数据:

in_ds = h5py.File(nc_path)
chlor_a = in_ds['//geophysical_data/chlor_a'].value

、通过netCDF4获取基本信息:

coordinate = Dataset(nc_path)
coordinate.groups

、结果显示:

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值