Skip to content

NREL/rex

Repository files navigation

Welcome to The REsource eXtraction (rex) tool!

Docs Tests Linter PyPi PythonV Conda Licence CodeCov Zeonodo

What is rex?

rex stands for REsource eXtraciton tool.

rex enables the efficient and scalable extraction, manipulation, and computation with NRELs flagship renewable resource datasets such as: the Wind Integration National Dataset (WIND Toolkit), the National Solar Radiation Database (NSRDB), the Ocean Surface Wave Hindcast (US Wave) Data, and the High-resolution downscaled climate change data (Sup3rCC).

To get started accessing NREL's datasets, see the primer on NREL Renewable Energy Resource Data or the installation instructions.

You might also want to check out the basic Resource Class that can be used to efficiently query NREL data, or our various example use cases.

Installing rex

NOTE: The installation instruction below assume that you have python installed on your machine and are using conda as your package/environment manager.

Option 1: Install from PIP or Conda (recommended for analysts):

  1. Create a new environment:
    conda create --name rex
  2. Activate directory:
    conda activate rex
  3. Basic rex install:
    1. pip install NREL-rex
    2. or conda install nrel-rex --channel=nrel
  4. Install for users outside of NREL that want to access data via HSDS or S3 as per the instructions here:
    1. pip install NREL-rex[s3] for easy no-setup direct access of the data on S3 via fsspec as per this s3 example
    2. or pip install NREL-rex[hsds] for more performant access of the data on HSDS with slightly more setup as per this hsds example

Option 2: Clone repo (recommended for developers)

  1. from home dir, git clone [email protected]:NREL/rex.git

  2. Create rex environment and install package
    1. Create a conda env: conda create -n rex
    2. Run the command: conda activate rex
    3. cd into the repo cloned in 1.
    4. prior to running pip below, make sure the branch is correct (install from main!)
    5. Install rex and its dependencies by running: pip install . (or pip install -e . if running a dev branch or working on the source code)
  3. Check that rex was installed successfully
    1. From any directory, run the following commands. This should return the help pages for the CLI's.

      • rex
      • NSRDBX
      • WINDX
      • US-wave

rex command line tools