diff --git a/cgyro/bin/cgyro_json b/cgyro/bin/cgyro_json index 45b05fc2b..b2f07c487 100755 --- a/cgyro/bin/cgyro_json +++ b/cgyro/bin/cgyro_json @@ -1,6 +1,6 @@ #!/usr/bin/env python -import os.path +import os import sys import json import numpy as np @@ -8,6 +8,8 @@ from pygacode.cgyro import data sim = data.cgyrodata('./') +myroot = os.environ['GACODE_ROOT'] + # Sanity check: if not os.path.isfile('input.cgyro.gen'): print('cgyro_json: (ERROR) input.cgyro.gen missing') @@ -36,7 +38,7 @@ for i in range(sim.n_species): d = {} -with open('/home/candy/GIT/gacode/cgyro/bin/input.json','r') as file: +with open(myroot+'/cgyro/bin/input.json','r') as file: default = json.load(file) # Determine non-default values in input.cgyro