项目作者: Yefee

项目描述 :
python package for cesm output diagnosis
高级语言: Python
项目地址: git://github.com/Yefee/xcesm.git
创建时间: 2017-03-18T03:08:20Z
项目社区:https://github.com/Yefee/xcesm

开源协议:Apache License 2.0

下载


About xcesm

Xcesm tries to provide an easy-to-use plugin for xarray to better handle CESM output in python.

Features

Xcesm is still in developing, right now it has the following features:

  • quick plot on global map (quickmap)
  • regrid pop output to linear grids (regrid, nearest interpolation)
  • compute global mean (gbmean, gbmeanpop)
  • diagnose AMOC, PRECP, d18O(only support for iCESM), Heat transport etc.
  • truncate ocean as several main basins (ocean_region)

More feature will be added in the future.

How to install

via git

  1. git clone https://github.com/Yefee/xcesm.git
  2. cd xcesm
  3. python setup.py install

How to use

regrid

  1. import xarray as xr
  2. import xcesm
  3. ds = xr.open_dataset('/examples/data/salt.nc')
  4. # defalut to 1x1 degree
  5. salt_rgd = ds.SALT.utils.regrid()
  6. print(ds.SALT.shape)
  7. (384, 320)
  8. print(salt_rgd.shape)
  9. (181, 361)

quick plot

  1. salt_rgd.utils.quickmap()

salt_distribution

And more

I don’t have time to write documentation recently, but it will be released in this summer!