tools.geetools
- class tools.geetools.CMIPDownloader(var, starty, endy, shape, processes=10, dir='./')[source]
Class to download spatially averaged CMIP6 data for a given period, variable, and spatial subset.
- class tools.geetools.CMIPProcessor(var, file_dir='.')[source]
Class to read and pre-process CSV files downloaded by the CMIPDownloader class.
- append_df(var, file_dir='.', hist=True)[source]
Reads CMIP6 CSV files of individual years and concatenates them into dataframes for the full downloaded period. Historical and scenario datasets are treated separately. Converts precipitation unit to mm.
- get_results()[source]
Concatenates historical and scenario data to combined dataframes of the full downloaded period. Arranges the models in alphabetical order.
- tools.geetools.authenticate_and_initialize_ee(cloud_project)[source]
Robustly authenticates and initializes Earth Engine for local/notebook environments.
It attempts to initialize Earth Engine: 1. Using existing credentials if available and valid for the project. 2. If a permission error occurs, it forces a new interactive browser-based
authentication suitable for notebooks.
- Parameters:
cloud_project (str) – The Google Cloud Project ID to use for Earth Engine.
- Raises:
RuntimeError – If Earth Engine initialization ultimately fails after retries.