From c28b83ad955c68fd328891a90a2f2b6524fee4b8 Mon Sep 17 00:00:00 2001 From: Julia Sloan Date: Thu, 23 May 2024 15:31:01 -0700 Subject: [PATCH] set job_id when interactive --- experiments/ClimaEarth/run_amip.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/experiments/ClimaEarth/run_amip.jl b/experiments/ClimaEarth/run_amip.jl index 7205db1f04..11c57d5416 100644 --- a/experiments/ClimaEarth/run_amip.jl +++ b/experiments/ClimaEarth/run_amip.jl @@ -92,17 +92,18 @@ We can additionally pass the configuration dictionary to the component model ini include("cli_options.jl") parsed_args = parse_commandline(argparse_settings()) -## the unique job id should be passed in via the command line -job_id = parsed_args["job_id"] -@assert !isnothing(job_id) "job_id must be passed in via the command line" - ## modify parsed args for fast testing from REPL #hide if isinteractive() parsed_args["config_file"] = isnothing(parsed_args["config_file"]) ? joinpath(pkg_dir, "config/ci_configs/interactive_debug.yml") : parsed_args["config_file"] + parsed_args["job_id"] = "interactive_debug" end +## the unique job id should be passed in via the command line +job_id = parsed_args["job_id"] +@assert !isnothing(job_id) "job_id must be passed in via the command line" + ## read in config dictionary from file, overriding the coupler defaults in `parsed_args` config_dict = YAML.load_file(parsed_args["config_file"]) config_dict = merge(parsed_args, config_dict)