Skip to content

Commit

Permalink
Improvements to crgyrodb -- refresh now works without cgyro -t
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Dec 5, 2024
1 parent dbb0144 commit c2b9f01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cgyro/bin/cgyrodb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ meta = {}
if (not ref) and (not json) and (not db):
print('Type "cgyrodb -h" for help')
sys.exit()

def gendict(sim,doflux):

mydict = {}
Expand All @@ -76,7 +76,7 @@ def gendict(sim,doflux):

if doflux:
sim.getflux()
y = np.sum(sim.ky_flux,axis=(2,3))
y = np.sum(sim.ky_flux,axis=(2,3))
for ispec in range(sim.n_species):
g = average(y[ispec,0,:],sim.t,0.5,0.0)
q = average(y[ispec,1,:],sim.t,0.5,0.0)
Expand All @@ -98,7 +98,8 @@ if ref:
# Run through directories and update
for mdir in y:
print('Refreshing '+mdir)
os.system('cgyro -t '+mdir)
os.system('cd '+mdir+' ; python $GACODE_ROOT/cgyro/bin/cgyro_parse.py')
os.system('cd '+mdir+' ; $GACODE_ROOT/cgyro/src/cgyro ')

if json:
# Run through directories and update
Expand Down

0 comments on commit c2b9f01

Please sign in to comment.