Modules

Command Line Interface

THORR has a command line interface (CLI) that allows you to interact with the the package from the terminal. The CLI provides a number of commands that can be used to create new projects, manage existing projects and run other THORR services. The CLI is accessible by running the python -m thorr command from the terminal. For example, to create a new project with the new-project command, run the following command from the terminal:

python -m thorr new-project NAME [DIR]

The following commands are available:

thorr new-project

Create a new project with the specified name and directory. The project directory will be created in the current working directory if no directory is specified.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr new-project [OPTIONS] NAME [DIR]

Arguments:
  NAME   Name of the new project  [required]
  [DIR]  Directory of the new project  [default: .]

Options:
  --new-config / --no-new-config  Create a new config file  [default: new-
                                  config]
  --get-data / --no-get-data      Download data including trained THORR models
                                  [default: no-get-data]
  --region TEXT                   Region of the project  [default: global]
  --help                          Show this message and exit.

thorr get-thorr-data

Download data from the specified source and save it to the specified directory. THORR’s data includes trained machine learning models and GIS data for the various regions.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr get-thorr-data [OPTIONS] [DOWNLOAD_FOLDER]

Arguments:
  [DOWNLOAD_FOLDER]  Folder to download data to  [default: .]

Options:
  --region TEXT  Region of the project  [default: global]
  --help         Show this message and exit.

thorr database-setup

Create the database tables required by THORR to store project data. The database system must be running and accessible to the THORR project.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr database-setup [OPTIONS] CONFIG_PATH

Arguments:
  CONFIG_PATH  Path to the configuration file  [required]

Options:
  --upload-gis / --no-upload-gis  Upload GIS data to the database  [default:
                                  no-upload-gis]
  --help                          Show this message and exit.

thorr retrieve-data

Retrieve satellite data from Google Earth Engine (GEE) and save it to a specified database.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr retrieve-data [OPTIONS] CONFIG_PATH

Arguments:
  CONFIG_PATH  Path to the configuration file  [required]

Options:
  --element-type TEXT  Type of element to retrieve (reaches or reservoirs)
                       [default: reaches]
  --help               Show this message and exit.

thorr estimate-temperature

Estimate water temperature using a trained machine learning model.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr estimate-temperature [OPTIONS] CONFIG_PATH

Arguments:
  CONFIG_PATH  Path to the configuration file  [required]

Options:
  --element-type TEXT  Type of element to retrieve (reaches or reservoirs)
                       [default: reaches]
  --help               Show this message and exit.

thorr retrieve-data

Retrieve satellite data from Google Earth Engine (GEE) and save it to a specified database.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr retrieve-data [OPTIONS] CONFIG_PATH

Arguments:
  CONFIG_PATH  Path to the configuration file  [required]

Options:
  --element-type TEXT  Type of element to retrieve (reaches or reservoirs)
                       [default: reaches]
  --help               Show this message and exit.

thorr estimate-temperature

Estimate water temperature using a trained machine learning model.

/home/docs/checkouts/readthedocs.org/user_builds/thorr/envs/latest/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.17) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Usage: python -m thorr estimate-temperature [OPTIONS] CONFIG_PATH

Arguments:
  CONFIG_PATH  Path to the configuration file  [required]

Options:
  --element-type TEXT  Type of element to retrieve (reaches or reservoirs)
                       [default: reaches]
  --help               Show this message and exit.