将netCDF数据存储到couchbase

时间:2017-05-11 15:02:01

标签: python mysql couchbase netcdf

我试图通过python脚本将netCDF文件数据存储到沙发基础(NOSQL数据库)。我环顾四周,谷歌得到一些例子,但我无法取得任何成功。 我的netCDF文件或变量看起来像这样

float32 pressure(time, range)
long_name: pressure
units: m/s
yrange: [ 0.  3.]
db: 0
unlimited dimensions: time
current shape = (2809, 478)
filling off 
), 
(u'pressure', <type 'netCDF4._netCDF4.Variable'>
float32 temp(time, range)
long_name: temperature
units:  
yrange: [-35.   5.]
db: 1
unlimited dimensions: time
current shape = (2809, 478)
filling off
), (u'temperature', <type 'netCDF4._netCDF4.Variable'>

我可以将netCDF数据存储为MySQL中的blob并且我很成功但我不知道如何存储在NOSQL数据库中 有人可以指导我或指出一些例子如何将netCDF数据存储在沙发基础中,并在python中使用简单的示例。

我将不胜感激。

1 个答案:

答案 0 :(得分:0)

Couchbase可以直接存储JSON文档或简单的二进制文件。看看Start Using page on Python in the Documentation。您还会看到指向API参考的链接,其中包含有关upsert()如何used with different formats的更多信息。

相关问题