Skip to content

Commit

Permalink
Merge pull request #816 from CliMA/js/jobid-fix
Browse files Browse the repository at this point in the history
set job_id for interactive runs
  • Loading branch information
juliasloan25 authored May 25, 2024
2 parents b50c102 + c28b83a commit ca57cad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca57cad

Please sign in to comment.