Skip to content
Open
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
49 changes: 19 additions & 30 deletions scripts/time_dependent_d3d/run_time_dependent_d3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,39 @@ 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"
"""
--PROFILES_TREE
"""
"--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"
"""
--EFIT_RUN_ID
"""
"--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
Expand All @@ -75,6 +57,7 @@ function main()
sty.device = :D3D
sty.shots = [args["shot"]]
sty.reconstruction = args["RECONSTRUCTION"]
sty.redirect_output = false

sty.kw_case_parameters=Dict{Symbol,Any}(
:use_local_cache=>args["USE_LOCAL_CACHE"],
Expand All @@ -85,9 +68,15 @@ function main()
:EFIT_run_id=>args["EFIT_RUN_ID"],
:PROFILES_run_id=>args["PROFILES_RUN_ID"])

@everywhere import FUSE
@everywhere ProgressMeter = FUSE.ProgressMeter

study = FUSE.StudyPostdictive(sty)
FUSE.run(study)
end

try
@everywhere import FUSE
@everywhere ProgressMeter = FUSE.ProgressMeter
main()
finally
# Remove PIDs
Distributed.rmprocs(Distributed.workers())
end