fre.pp package

Subpackages

Submodules

Module contents

fre.pp.make_workflow_name(experiment: str | None = None, platform: str | None = None, target: str | None = None) str

Function that takes in a triplet of tags for a model experiment, platform, and target, and returns a directory name for the corresponding pp workflow. Because this is often given by user to the shell being used by python, we split/reform the string to remove semi-colons or spaces that may be used to execute an arbitrary command with elevated privileges.

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

Returns:

string created in specific format from the input strings

Return type:

str

Note

if any arguments are None, then “None” will appear in the workflow name