数值数据的处理和分析
项目描述
Paegan - Python气象/海洋数据CDM
===========
[](https://travis-ci.org/asascience-open/paegan)
Paegan旨在填补对于存储在netCDF文件中或通过OPeNDAP分布式的高层次通用数据模型(CDM)库的需求。
通用数据集函数
------------------
### 网格/UGrids
```python
from paegan.cdm.dataset import CommonDataset
url = "http://thredds.axiomalaska.com/thredds/dodsC/PWS_DAS.nc"
pd = CommonDataset.open(url)
```
#### 子集
#####Bbox
```python
pd.restrict_bbox((-74, 40, -70, 42))
```
#####时间
```python
from datetime import datetime,timedelta
ending = datetime.utcnow()
starting = ending - timedelta(hours=12)
pd.restrict_time((starting, ending))
```
#####深度
```python
pd.restrict_depth((3,50))
```
#####变量
```python
pd.restrict_vars(("u","v"))
```
#### 最近的子集
#####时间
```python
from datetime import datetime
import pytz
now = datetime.utcnow().replace(tzinfo=pytz.utc)
pd.nearest_time(now)
```
#####深度
```python
pd.nearest_depth(5)
```
#### 重网格
##### 即将推出
### 离散采样几何形状
#### 即将推出
设置
------------------
您正在使用`virtualenv`,对吗?
1. 安装[virtualenv-burrito](https://github.com/brainsik/virtualenv-burrito)
2. 创建名为"paegan-dev"的虚拟环境:`mkvirtualenv -p your_python_binary paegan-dev`
3. 开始使用新的虚拟环境:`workon paegan-dev`
安装
-------------
Paegan需要python 2.7.x,并在PyPI上可用。
安装Paegan的最佳方式是通过pip
```bash
pip install paegan
```
Paegan需要以下Python库,这些库将通过`pip`下载和安装
* numpy>=1.7.0
* scipy
* netCDF4>=1.0.2 (需要netcdf和hdf5 C库)
* Shapely>=1.2.15 (需要geos C库)
* pytz
* python-dateutil>=1.5
如果您的NetCDF4和HDF5库不在典型位置,您需要将这些位置传递给`pip`命令
```bash
NETCDF4_DIR=path HDF5_DIR=path pip install paegan
```
似乎在通过`pip`安装numpy时存在问题,因此您可能需要在执行上述操作之前安装numpy
```bash
pip install numpy==1.7.0
```
路线图
--------
* 更好的网格支持
* 重网格工具
模块
--------
其他利用Paegan的模块
* [paegan-transport](https://github.com/asascience-open/paegan-transport) - 用于NetCDF/OPeNDAP数据的并行拉格朗日传输模型
* [paegan-viz](https://github.com/asascience-open/paegan-viz) - NetCDF/OPeNDAP数据的可视化工具
故障排除
---------------
如果您在使用Paegan的任何功能时遇到困难,请尝试运行测试
```bash
git clone git@github.com:asascience-open/paegan.git`
cd paegan
python setup.py test
```
如果您要运行数据集、时间变量、深度变量或ROMS测试,您需要编辑测试文件,以包含适用于您系统的路径。
某些测试需要大文件,这些文件不在源代码管理中。您可以从这里获取它们
* ETOPO1全球水深([ETOPO1_Bed_g_gmt4.grd](http://s3.amazonaws.com/paegan/resources/ETOPO1_Bed_g_gmt4.grd))
* HFRadar网格样本([marcooshfradar20120331.nc](https://s3.amazonaws.com/paegan/resources/marcooshfradar20120331.nc))
* NCOM网格表面样本([ncom_glb_sfc8_hind_2012033100.nc](http://s3.amazonaws.com/paegan/resources/ncom_glb_sfc8_hind_2012033100.nc))
* POM网格3D样本([m201310100.out3.nc](http://s3.amazonaws.com/paegan/resources/m201310100.out3.nc))
* ROMS C-GRID 3D样本([ocean_avg_synoptic_seg22.nc](http://s3.amazonaws.com/paegan/resources/ocean_avg_synoptic_seg22.nc))
* 常规网格样本([pws_L2_2012040100.nc](http://s3.amazonaws.com/paegan/resources/pws_L2_2012040100.nc))
它们应该位于`/data/lm/tests`,如果不是,您可以在此目录中创建符号链接。
贡献者
----------------
* Kyle Wilcox <kyle@axiomdatascience.com> - [@kwilcox](http://github.com/kwilcox)
* Alex Crosby <crosbyar@gmail.com> - [@acrosby](http://github.com/acrosby)
* Brian McKenna <bmckenna@asascience.com>
===========
[](https://travis-ci.org/asascience-open/paegan)
Paegan旨在填补对于存储在netCDF文件中或通过OPeNDAP分布式的高层次通用数据模型(CDM)库的需求。
通用数据集函数
------------------
### 网格/UGrids
```python
from paegan.cdm.dataset import CommonDataset
url = "http://thredds.axiomalaska.com/thredds/dodsC/PWS_DAS.nc"
pd = CommonDataset.open(url)
```
#### 子集
#####Bbox
```python
pd.restrict_bbox((-74, 40, -70, 42))
```
#####时间
```python
from datetime import datetime,timedelta
ending = datetime.utcnow()
starting = ending - timedelta(hours=12)
pd.restrict_time((starting, ending))
```
#####深度
```python
pd.restrict_depth((3,50))
```
#####变量
```python
pd.restrict_vars(("u","v"))
```
#### 最近的子集
#####时间
```python
from datetime import datetime
import pytz
now = datetime.utcnow().replace(tzinfo=pytz.utc)
pd.nearest_time(now)
```
#####深度
```python
pd.nearest_depth(5)
```
#### 重网格
##### 即将推出
### 离散采样几何形状
#### 即将推出
设置
------------------
您正在使用`virtualenv`,对吗?
1. 安装[virtualenv-burrito](https://github.com/brainsik/virtualenv-burrito)
2. 创建名为"paegan-dev"的虚拟环境:`mkvirtualenv -p your_python_binary paegan-dev`
3. 开始使用新的虚拟环境:`workon paegan-dev`
安装
-------------
Paegan需要python 2.7.x,并在PyPI上可用。
安装Paegan的最佳方式是通过pip
```bash
pip install paegan
```
Paegan需要以下Python库,这些库将通过`pip`下载和安装
* numpy>=1.7.0
* scipy
* netCDF4>=1.0.2 (需要netcdf和hdf5 C库)
* Shapely>=1.2.15 (需要geos C库)
* pytz
* python-dateutil>=1.5
如果您的NetCDF4和HDF5库不在典型位置,您需要将这些位置传递给`pip`命令
```bash
NETCDF4_DIR=path HDF5_DIR=path pip install paegan
```
似乎在通过`pip`安装numpy时存在问题,因此您可能需要在执行上述操作之前安装numpy
```bash
pip install numpy==1.7.0
```
路线图
--------
* 更好的网格支持
* 重网格工具
模块
--------
其他利用Paegan的模块
* [paegan-transport](https://github.com/asascience-open/paegan-transport) - 用于NetCDF/OPeNDAP数据的并行拉格朗日传输模型
* [paegan-viz](https://github.com/asascience-open/paegan-viz) - NetCDF/OPeNDAP数据的可视化工具
故障排除
---------------
如果您在使用Paegan的任何功能时遇到困难,请尝试运行测试
```bash
git clone git@github.com:asascience-open/paegan.git`
cd paegan
python setup.py test
```
如果您要运行数据集、时间变量、深度变量或ROMS测试,您需要编辑测试文件,以包含适用于您系统的路径。
某些测试需要大文件,这些文件不在源代码管理中。您可以从这里获取它们
* ETOPO1全球水深([ETOPO1_Bed_g_gmt4.grd](http://s3.amazonaws.com/paegan/resources/ETOPO1_Bed_g_gmt4.grd))
* HFRadar网格样本([marcooshfradar20120331.nc](https://s3.amazonaws.com/paegan/resources/marcooshfradar20120331.nc))
* NCOM网格表面样本([ncom_glb_sfc8_hind_2012033100.nc](http://s3.amazonaws.com/paegan/resources/ncom_glb_sfc8_hind_2012033100.nc))
* POM网格3D样本([m201310100.out3.nc](http://s3.amazonaws.com/paegan/resources/m201310100.out3.nc))
* ROMS C-GRID 3D样本([ocean_avg_synoptic_seg22.nc](http://s3.amazonaws.com/paegan/resources/ocean_avg_synoptic_seg22.nc))
* 常规网格样本([pws_L2_2012040100.nc](http://s3.amazonaws.com/paegan/resources/pws_L2_2012040100.nc))
它们应该位于`/data/lm/tests`,如果不是,您可以在此目录中创建符号链接。
贡献者
----------------
* Kyle Wilcox <kyle@axiomdatascience.com> - [@kwilcox](http://github.com/kwilcox)
* Alex Crosby <crosbyar@gmail.com> - [@acrosby](http://github.com/acrosby)
* Brian McKenna <bmckenna@asascience.com>
项目详情
关闭
paegan-1.1.4.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a9d7308315274734738ff32e09611e2799c6136ad41f0b1f1865a7b8db693ba6 |
|
MD5 | b535ca51296e7071d6d5771c5eefed92 |
|
BLAKE2b-256 | 5ad4c5b35a83df0e11b5bc0c33dbbd6ade2a35d6b099c714caed775150e302eb |