Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable using the distributed scheduler from the diagnostic script #3787

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion esmvaltool/diag_scripts/shared/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,11 @@ def main(cfg):
logger.info("Removing %s from previous run.", provenance_file)
os.remove(provenance_file)

if not args.no_distributed and 'scheduler_address' in cfg:
use_distributed = not (
args.no_distributed
or cfg.get('no_distributed', False)
)
if use_distributed and 'scheduler_address' in cfg:
try:
client = distributed.Client(cfg['scheduler_address'])
except OSError as exc:
Expand Down
3 changes: 3 additions & 0 deletions esmvaltool/recipes/recipe_eady_growth_rate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ diagnostics:
scripts:
annual_eady_growth_rate:
script: primavera/eady_growth_rate/eady_growth_rate.py
no_distributed: true
time_statistic: 'annual_mean'


Expand All @@ -63,6 +64,7 @@ diagnostics:
scripts:
summer_eady_growth_rate:
script: primavera/eady_growth_rate/eady_growth_rate.py
no_distributed: true
time_statistic: 'seasonal_mean'

winter_egr:
Expand All @@ -76,5 +78,6 @@ diagnostics:
scripts:
winter_eady_growth_rate:
script: primavera/eady_growth_rate/eady_growth_rate.py
no_distributed: true
time_statistic: 'seasonal_mean'
plot_levels: [70000]