What is rex?
January 22, 2026 ยท View on GitHub
Welcome to The REsource eXtraction (rex) tool!
|Docs| |Tests| |Linter| |PyPi| |PythonV| |Conda| |Licence| |CodeCov| |Zeonodo|
.. |Docs| image:: https://github.com/NatLabRockies/rex/workflows/Documentation/badge.svg :target: https://natlabrockies.github.io/rex/
.. |Tests| image:: https://github.com/NatLabRockies/rex/workflows/Pytests/badge.svg :target: https://github.com/NatLabRockies/rex/actions?query=workflow%3A%22Pytests%22
.. |Linter| image:: https://github.com/NatLabRockies/rex/workflows/Lint%20Code%20Base/badge.svg :target: https://github.com/NatLabRockies/rex/actions?query=workflow%3A%22Lint+Code+Base%22
.. |PyPi| image:: https://img.shields.io/pypi/pyversions/NLR-rex.svg :target: https://pypi.org/project/NLR-rex/
.. |PythonV| image:: https://badge.fury.io/py/NLR-rex.svg :target: https://badge.fury.io/py/NLR-rex
.. |Conda| image:: https://anaconda.org/nrel/nrel-rex/badges/version.svg :target: https://anaconda.org/nrel/nrel-rex
.. |Licence| image:: https://anaconda.org/nrel/nrel-rex/badges/license.svg :target: https://anaconda.org/nrel/nrel-rex
.. |CodeCov| image:: https://codecov.io/gh/natlabrockies/rex/branch/main/graph/badge.svg?token=WQ95L11SRS :target: https://codecov.io/gh/natlabrockies/rex
.. |Zeonodo| image:: https://zenodo.org/badge/253541811.svg :target: https://zenodo.org/badge/latestdoi/253541811
.. inclusion-intro
What is rex?
rex stands for REsource eXtraciton tool.
rex enables the efficient and scalable extraction, manipulation, and
computation with NLRs 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 NLR's datasets, see the primer on NLR Renewable Energy Resource Data <https://natlabrockies.github.io/rex/misc/examples.nlr_data.html>_ or the
installation instructions <https://natlabrockies.github.io/rex/#installing-rex>_.
You might also want to check out the basic Resource Class <https://natlabrockies.github.io/rex/_autosummary/rex.resource.Resource.html>_ that
can be used to efficiently query NLR data, or our various example use cases <https://natlabrockies.github.io/rex/misc/examples.html>_.
Installing rex
NOTE: The installation instruction below assume that you have python installed
on your machine and are using conda <https://docs.conda.io/en/latest/index.html>_
as your package/environment manager.
Option 1: Install from PIP or Conda (recommended for analysts):
-
Create a new environment:
conda create --name rex -
Activate directory:
conda activate rex -
Basic
rexinstall:pip install NLR-rex -
Install for users outside of NLR that want to access data via HSDS or S3 as per the instructions
here <https://natlabrockies.github.io/rex/misc/examples.nlr_data.html#data-location-external-users>_:pip install NLR-rex[hsds]for more performant access of the data on HSDS with slightly more setup as perthis hsds example <https://natlabrockies.github.io/rex/misc/examples.hsds.html>_. Note that the highest version of Python currently supported byhsdsis Python 3.11.
Option 2: Clone repo (recommended for developers)
-
from home dir,
git clone git@github.com:NatLabRockies/rex.git -
Create
rexenvironment and install package- Create a conda env:
conda create -n rex - Run the command:
conda activate rex - cd into the repo cloned in 1.
- prior to running
pipbelow, make sure the branch is correct (install from main!) - Install
rexand its dependencies by running:pip install .(orpip install -e .if running a dev branch or working on the source code)
- Create a conda env:
-
Check that
rexwas installed successfully-
From any directory, run the following commands. This should return the help pages for the CLI's.
rexNSRDBXWINDXUS-wave
-
rex command line tools
rex <https://natlabrockies.github.io/rex/_cli/rex.html#rex>_NSRDBX <https://natlabrockies.github.io/rex/_cli/NSRDBX.html#NSRDBX>_WINDX <https://natlabrockies.github.io/rex/_cli/WINDX.html#WINDX>_US-wave <https://natlabrockies.github.io/rex/_cli/US-wave.html#US-wave>_WaveX <https://natlabrockies.github.io/rex/_cli/WaveX.html#Wavex>_MultiYearX <https://natlabrockies.github.io/rex/_cli/MultiYearX.html#MultiYearX>_rechunk <https://natlabrockies.github.io/rex/_cli/rechunk.html#rechunk>_temporal-stats <https://natlabrockies.github.io/rex/_cli/temporal-stats.html#temporal-stats>_wind-rose <https://natlabrockies.github.io/rex/_cli/wind-rose.html#wind-rose>_