Installation

Required dependencies

  • Python 3.5 or 3.6
  • xarray (0.9.1 or later)
  • pandas (0.19.0 or later)
  • numba (0.31.0 or later)

Optional dependencies

For netCDF and IO

  • netCDF4: recommended if you want to use xarray for reading or writing netCDF files
  • scipy: used as a fallback for reading/writing netCDF3
  • pydap: used as a fallback for accessing OPeNDAP
  • h5netcdf: an alternative library for reading and writing netCDF4 files that does not use the netCDF-C libraries
  • pynio: for reading GRIB and other geoscience specific file formats

For accelerating xarray and metsim

  • bottleneck: speeds up NaN-skipping and rolling window aggregations by a large factor (1.0 or later)
  • cyordereddict: speeds up most internal operations with xarray data structures (for python versions < 3.5)

For parallel computing

For plotting

Instructions

metsim itself is a pure Python package, but its dependencies are not. The easiest way to get everything installed is to use conda. To install metsim with its recommended dependencies using the conda command line tool:

$ conda install metsim

We recommend using the community maintained conda-forge channel if you need difficult-to-build dependencies such as cartopy or pynio:

$ conda install -c conda-forge metsim

New releases may also appear in conda-forge before being updated in the default channel.

If you don’t use conda, be sure you have the required dependencies (numba and xarray) installed first. Then, install metsim with pip:

$ pip install metsim

To run the test suite after installing metsim, install py.test (pip install pytest) and run py.test --verbose.