diff --git a/scripts/time_dependent_d3d/run_time_dependent_d3d.jl b/scripts/time_dependent_d3d/run_time_dependent_d3d.jl index eda4a34..3514e00 100644 --- a/scripts/time_dependent_d3d/run_time_dependent_d3d.jl +++ b/scripts/time_dependent_d3d/run_time_dependent_d3d.jl @@ -10,64 +10,50 @@ using ArgParse function main() s = ArgParseSettings() @add_arg_table! s begin - """ - shot - """ + "shot" help = "Shot number" arg_type = Int required = true - """ - --EFIT_TREE - """ + "--EFIT_TREE" help = "Source of LCFS shape" arg_type = String - default = "EFIT02" + default = "EFIT01" """ --PROFILES_TREE """ help = "Source of profile data" arg_type = String default = "ZIPFIT01" - """ - --CER_ANALYSIS_TYPE - """ + "--CER_ANALYSIS_TYPE" help = "CER analysis type, either CERQUICK, CERAUTO, CERFAST" arg_type = String - default = "CERQUICK" + default = "CERAUTO" """ --EFIT_RUN_ID """ help = "Run ID for EFIT Tree, only last two digits" arg_type = String default = "" - """ - --PROFILES_RUN_ID - """ + "--PROFILES_RUN_ID" help = "Run ID for OMFIT_PROFS Tree, only last three digits" arg_type = String default = "" - """ - --RECONSTRUCTION - """ + "--RECONSTRUCTION" help = "Run time dependent simulation in reconstruction mode" arg_type = Bool default = true - """ - --FIT_PROFILES - """ + "--FIT_PROFILES" help = "Let FUSE fit the raw data into profiles" arg_type = Bool default = true - """ - --USE_LOCAL_CACHE - """ + "--USE_LOCAL_CACHE" help = "Use local data cache" arg_type = Bool default = true end args = parse_args(s) - sty = FUSE.study_parameters(:Postdictive) + sty = FUSE.study_parameters(:PredictiveRT) sty.server = get(ENV, "FUSE_SERVER", "localhost") sty.n_workers = 0 sty.release_workers_after_run = true @@ -75,6 +61,8 @@ function main() sty.device = :D3D sty.shots = [args["shot"]] sty.reconstruction = args["RECONSTRUCTION"] + sty.redirect_output = false + sty.verbose = false sty.kw_case_parameters=Dict{Symbol,Any}( :use_local_cache=>args["USE_LOCAL_CACHE"], @@ -85,9 +73,15 @@ function main() :EFIT_run_id=>args["EFIT_RUN_ID"], :PROFILES_run_id=>args["PROFILES_RUN_ID"]) + study = FUSE.StudyPredictiveRT(sty) + FUSE.run(study) +end + +try @everywhere import FUSE @everywhere ProgressMeter = FUSE.ProgressMeter - - study = FUSE.StudyPostdictive(sty) - FUSE.run(study) + main() +finally + # Remove PIDs + Distributed.rmprocs(Distributed.workers()) end