fre.pp.checkout_script module
Description: Checkout script which accounts for 4 different scenarios: 1. branch not given, folder does not exist, 2. branch given, folder does not exist, 3. branch not given, folder exists, 4. branch given and folder exists
- fre.pp.checkout_script.checkout_template(experiment=None, platform=None, target=None, branch=None)
Create a directory and checkout the workflow template files from the repo
- Parameters:
experiment (str) – One of the postprocessing experiment names from the yaml displayed by fre list exps -y $yamlfile (e.g. c96L65_am5f4b4r0_amip), default None
platform (str) – The location + compiler that was used to run the model (e.g. gfdl.ncrc5-deploy), default None
target (str) – Options used for the model compiler (e.g. prod-openmp), default None
branch (str) – which git branch to pull from, default None
- Raises:
OSError – why checkout script was not able to be created
ValueError – -if experiment or platform or target is None -if branch argument cannot be found as a branch or tag