chem.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:faampy 作者: ncasuk 项目源码 文件源码
def read_fgga_na(ifile):
    """
    Reads the FGGA data

    :param ifile: nasaAmes input filename"""
    try:
        import nappy
    except:
        sys.stdout.write('Can not import nappy ...\n')
        return
    ds = nappy.openNAFile(ifile)
    ds.readData()

    timestamp = netCDF4.num2date(ds.X, ds.getIndependentVariable(0)[1])
    from collections import OrderedDict

    dict = OrderedDict()
    dict['timestamp'] = timestamp
    for i, v in enumerate(['co2_ppm', 'co2_flag', 'ch4_ppb', 'ch4_flag']):
        dict[v] = ds.V[i]
    df = pd.DataFrame(dict)
    df = df.set_index('timestamp')
    return df
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号