用于将非标准格式转换为woudc扩展csv格式的python库
woudc-formats的Python项目详细描述
[![构建状态](https://travis-ci.org/woudc/woudc-formats.png?branch=master)(https://travis ci.org/woudc/woudc格式)
[![构建状态](https://ci.appveyor.com/api/projects/status/02koln2pe4ap5kvd/branch/master?svg=true)(https://ci.appveyor.com/project/tomkralidis/woudc格式)
[![本月在pypi上下载](https://img.shields.io/pypi/dm/woudc formats.svg)](http://pypi.python.org/pypi/woudc formats)
[![最新版本](https://img.shields.io/pypi/v/woudc formats.svg)(http://pypi.python.org/pypi/woudc formats)
[![许可证](https://img.shields.io/github/license/woudc/woudc formats.svg)(https://github.com/woudc/woudc formats)
nasa ames files,维萨拉。
作者:woudc totalozone[每日摘要](https://woudc.org/archive/summaries/totalozone/daily廑u summary/fileformat廑dv.txt)(主文件)。
[皮沙多兹](https://github.com/wmo-et-wdc/pyshadoz)而[woudc-extcsv](https://github.com/woudc/woudc-extcsv/woudc-extcsv)则
<<
依赖关系
见“requirements.txt `
-[pywoudc(https://github.com/woudc/pywoudc/pywoudc/pywoudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc-extcsv]
-[pyshadoz](https://github.com/www.com/wmo-et-et-et-et-wdc/pyshadhbr/>``` bash
git克隆http://github.com/woudc/woudc-formats.git&&&;cd woudc formats
python setup.py install
`` `
` ` ` ` ` `用法
` ` ` ` ` ` bash
用法:woudc-formats.py--format{shadoz,bas,ames-2160,维萨拉,toto臭氧层主文件}--inpath/filename--logfile-logfile-logfile-logfile-logfile-logfile-logfile ` ` ` ` ` ` ` ` ` ` ` ` ` `级别{调试,严重,错误,warning,info,debug,notset}
必需参数:
--格式:指示输入文件格式
--inpath:导入文件名和路径,对于shadoz、bas、vaisala和ames-2160
--日志文件:日志文件的路径,包括文件名
--log level:定义日志记录的日志级别
信息
例如:{“inst type”:“ecc”,“inst number”:“xx xxx”,“sa”:“xx”,“id”:“xxx”,“country”:“xxx”,“gaw_id”:“xxx”}
重要性:
对于AMES-2160格式,需要代理参数才能处理文件。
对于维萨拉格式,需要代理参数,-station和--代理参数以及“id”,“gaw_id”,“country”,和元数据中的“sa”参数是处理文件所必需的。
``````
``` bash
`` bash ``用法:
import woudc
ecsv=woudc_格式。load(用``格式,输入`文件路径,站,局)
ecsv=woudc_格式。load(用`格式,输入`文件路径,站,站,局)
>如果ecsv不是ecsv:woudc格式。dump(ecsv,输出`文件路径)dump(ecsv,输出`文件路径)
或
或
使用打开(输入文件路径)作为ff
ff.read()
ecsv=woudc_format s.loads(格式为s)
如果ecsv不是none:
woudc_formats.dump(ecsv,输出文件路径)
可选方法:
woudc_formats.loads(格式为,输入文件路径,站点,代理,元数据):获取输入文件路径并返回ext csv对象,ames需要代理维萨拉需要文件和元数据,有关详细信息,请参阅命令行界面的可选参数。
woudc_formats.loads(in_format,string_of_input_file,station,agency,metadata):获取输入文件的字符串表示并返回ext csv对象。AMES文件需要站点和代理,维萨拉需要元数据,有关详细信息,请参见命令行界面的可选参数。
woudc_formats.dump(ecsv,output_file_path):获取ext csv对象并生成输出文件。
woudc_formats.dumps(ecsv):获取ext csv对象并打印到屏幕上。
``````
``````````````````
``示例
``bash
woudc-formats.py--格式shadoz--inpath./bin/sample.dat--输出路径/bin/sample.csv--日志文件/bin/log.log--日志级调试
woudc-formats.py--格式totalozone主文件--inpath<;指向totalozone快照的完整本地或Web路径>;--outpath<;output path>;--log level<;log level>;--log file<;log file>;
woudc-formats.py--format ames-2160--inpath<;指向ames文件的完整本地路径>;--outpath<;output path>;--loglevel<;log level>;--logfile<;log file>;--代理xxx——元数据{“sa”:“xxx”,“inst type”:“ecc”,“inst number”:“6a3412”}
代理“awi-nm”:
woudc-formats.py——格式ames-2160——inpath——日志文件log.log——日志级调试——代理awi-nm
``
[![构建状态](https://ci.appveyor.com/api/projects/status/02koln2pe4ap5kvd/branch/master?svg=true)(https://ci.appveyor.com/project/tomkralidis/woudc格式)
[![本月在pypi上下载](https://img.shields.io/pypi/dm/woudc formats.svg)](http://pypi.python.org/pypi/woudc formats)
[![最新版本](https://img.shields.io/pypi/v/woudc formats.svg)(http://pypi.python.org/pypi/woudc formats)
[![许可证](https://img.shields.io/github/license/woudc/woudc formats.svg)(https://github.com/woudc/woudc formats)
nasa ames files,维萨拉。
作者:woudc totalozone[每日摘要](https://woudc.org/archive/summaries/totalozone/daily廑u summary/fileformat廑dv.txt)(主文件)。
[皮沙多兹](https://github.com/wmo-et-wdc/pyshadoz)而[woudc-extcsv](https://github.com/woudc/woudc-extcsv/woudc-extcsv)则
<<
依赖关系
见“requirements.txt `
-[pywoudc(https://github.com/woudc/pywoudc/pywoudc/pywoudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc/woudc-extcsv]
-[pyshadoz](https://github.com/www.com/wmo-et-et-et-et-wdc/pyshadhbr/>``` bash
git克隆http://github.com/woudc/woudc-formats.git&&&;cd woudc formats
python setup.py install
`` `
` ` ` ` ` `用法
` ` ` ` ` ` bash
用法:woudc-formats.py--format{shadoz,bas,ames-2160,维萨拉,toto臭氧层主文件}--inpath/filename--logfile-logfile-logfile-logfile-logfile-logfile-logfile ` ` ` ` ` ` ` ` ` ` ` ` ` `级别{调试,严重,错误,warning,info,debug,notset}
必需参数:
--格式:指示输入文件格式
--inpath:导入文件名和路径,对于shadoz、bas、vaisala和ames-2160
--日志文件:日志文件的路径,包括文件名
--log level:定义日志记录的日志级别
信息
例如:{“inst type”:“ecc”,“inst number”:“xx xxx”,“sa”:“xx”,“id”:“xxx”,“country”:“xxx”,“gaw_id”:“xxx”}
重要性:
对于AMES-2160格式,需要代理参数才能处理文件。
对于维萨拉格式,需要代理参数,-station和--代理参数以及“id”,“gaw_id”,“country”,和元数据中的“sa”参数是处理文件所必需的。
``````
``` bash
`` bash ``用法:
import woudc
ecsv=woudc_格式。load(用``格式,输入`文件路径,站,局)
ecsv=woudc_格式。load(用`格式,输入`文件路径,站,站,局)
>如果ecsv不是ecsv:woudc格式。dump(ecsv,输出`文件路径)dump(ecsv,输出`文件路径)
或
或
使用打开(输入文件路径)作为ff
ff.read()
ecsv=woudc_format s.loads(格式为s)
如果ecsv不是none:
woudc_formats.dump(ecsv,输出文件路径)
可选方法:
woudc_formats.loads(格式为,输入文件路径,站点,代理,元数据):获取输入文件路径并返回ext csv对象,ames需要代理维萨拉需要文件和元数据,有关详细信息,请参阅命令行界面的可选参数。
woudc_formats.loads(in_format,string_of_input_file,station,agency,metadata):获取输入文件的字符串表示并返回ext csv对象。AMES文件需要站点和代理,维萨拉需要元数据,有关详细信息,请参见命令行界面的可选参数。
woudc_formats.dump(ecsv,output_file_path):获取ext csv对象并生成输出文件。
woudc_formats.dumps(ecsv):获取ext csv对象并打印到屏幕上。
``````
``````````````````
``示例
``bash
woudc-formats.py--格式shadoz--inpath./bin/sample.dat--输出路径/bin/sample.csv--日志文件/bin/log.log--日志级调试
woudc-formats.py--格式totalozone主文件--inpath<;指向totalozone快照的完整本地或Web路径>;--outpath<;output path>;--log level<;log level>;--log file<;log file>;
woudc-formats.py--format ames-2160--inpath<;指向ames文件的完整本地路径>;--outpath<;output path>;--loglevel<;log level>;--logfile<;log file>;--代理xxx——元数据{“sa”:“xxx”,“inst type”:“ecc”,“inst number”:“6a3412”}
代理“awi-nm”:
woudc-formats.py——格式ames-2160——inpath——日志文件log.log——日志级调试——代理awi-nm
``