Skip to content
Snippets Groups Projects
Commit 68595c2b authored by Mireille Schneider's avatar Mireille Schneider
Browse files

Add flexibility to read/write ddv3 or ddv4

parent 52af49da
No related tags found
1 merge request!75Feature/muscle3
......@@ -19,7 +19,8 @@ shot: 134173
run_in: 106
input_user_or_path: public
input_database: ITER
input_backend: HDF5
input_backend: HDF5
input_ddv: 3
# -----------------------------------
# PARAMETERS TO SAVE THE OUTPUT DATA
......
export FC=ifort
module purge
module load IMAS INTERPOS XMLlib iWrap MUSCLE3 iWrap-plugins-MUSCLE3 yMMSL-dot
module load IMAS/4.0.0-2024.12-intel-2023b
module load INTERPOS XMLlib iWrap MUSCLE3 iWrap-plugins-MUSCLE3 yMMSL-dot
export PYTHONPATH=$PWD/..:$PYTHONPATH
export IMAS_AL_DISABLE_OBSOLESCENT_WARNING=1
#export IMAS_AL_DISABLE_OBSOLESCENT_WARNING=1
#export IMAS_AL_DISABLE_VALIDATE=1
......@@ -119,14 +119,14 @@ def run_chease_iwrap_choices() -> None:
# READ INPUT IDSS
print('=> Open input datafile')
input = imas.DBEntry(get_backend_id(cc['input_backend']),cc['input_database'],cc['shot'],cc['run_in'],cc['input_user_or_path'])
input = imas.DBEntry(get_backend_id(cc['input_backend']),cc['input_database'],cc['shot'],cc['run_in'],cc['input_user_or_path'],data_version=str(cc['input_ddv']))
input.open()
# READ FULL TIME VECTOR OF EQUILIBRIUM IDS TO GET THE TIME BASE
time_array,it,ntimes = time_compute(input,cc['time_slice'],cc['ntimes'],cc['dt_required'])
# IF LOCAL DATABASE DOES NOT EXIST: CREATE IT
local_database = os.getenv("HOME") + "/public/imasdb/" + cc['output_database'] + "/3/0"
local_database = os.getenv("HOME") + "/public/imasdb/" + cc['output_database'] + '/'+imas.al_dd_version.split(".")[0]+'/0'
if os.path.isdir(local_database) == False:
print("-- Create local database " + local_database)
os.makedirs(local_database)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment