Skip to content

Commit

Permalink
Add option to disable using distributed from the diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
bouweandela committed Oct 21, 2024
1 parent c8d0ffb commit 70f7d57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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]

0 comments on commit 70f7d57

Please sign in to comment.