Skip to content

Commit

Permalink
Fixes to python strings. Added NU_EE to localdump
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Nov 25, 2024
1 parent d38a87b commit bf49aa6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
4 changes: 4 additions & 0 deletions cgyro/bin/cgyro_json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ d['MACH'] = sim.mach
d['GAMMA_E'] = sim.gamma_e
d['GAMMA_P'] = sim.gamma_p
d['BETAE_UNIT'] = sim.betae_unit
d['NU_EE'] = sim.nu[ielec]

d['ZMAG'] = sim.zmag
d['DZMAG'] = sim.dzmag
Expand Down Expand Up @@ -164,6 +165,9 @@ print('cgyro_json: wrote out.cgyro.localdump')

nmax = nmax+1

if nmax < 3:
nmax = 3

# Reference dimensions in CGYRO units
lref=sim.rmaj
vthref = np.sqrt(2.0)
Expand Down
34 changes: 17 additions & 17 deletions f2py/pygacode/cgyro/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,19 @@ def getgeo(self):
print('INFO: (data.py) Read data in '+fmt+'.cgyro.geo '+t)
self.geo = np.reshape(data,(self.n_theta,nfunc),'F')

tags = ['\theta',
'G_\\theta',
'|B|',
'\omega_\mathrm{stream}',
'\omega_\mathrm{trap}',
'\omega_\mathrm{rdrift}',
'\omega_\mathrm{adrift}',
'\omega_\mathrm{aprdrift}',
'\omega_\mathrm{cdrift}',
'\omega_\mathrm{crdrift}',
'\omega_\mathrm{gammap',
'k_\perp',
'\Theta']
tags = [r'\theta',
r'G_\theta',
r'|B|',
r'\omega_\mathrm{stream}',
r'\omega_\mathrm{trap}',
r'\omega_\mathrm{rdrift}',
r'\omega_\mathrm{adrift}',
r'\omega_\mathrm{aprdrift}',
r'\omega_\mathrm{cdrift}',
r'\omega_\mathrm{crdrift}',
r'\omega_\mathrm{gammap',
r'k_\perp',
r'\Theta']

self.geotag = []
for i in range(nfunc):
Expand Down Expand Up @@ -531,7 +531,7 @@ def getnorm(self,norm):
self.kystr = r'$k_\theta \rho_s$'

self.qc = 1.0
self.gbnorm = '_\mathrm{GBD}'
self.gbnorm = r'_\mathrm{GBD}'

print('INFO: (getnorm) Using deuterium norm (rho_s = rho_sD, c_s = c_sD, etc)')

Expand All @@ -550,10 +550,10 @@ def getnorm(self,norm):
vc = np.sqrt(self.temp[i]/te/self.mass[i])

self.tnorm = self.t*vc
self.tstr = r'$(v_'+str(i)+'/a) \, t$'
self.tstr = r'$(v_'+str(i)+r'/a) \, t$'

self.fnorm = self.freq/vc
self.fstr = [r'$(a/v_'+str(i)+') \, \omega$',r'$(a/v_'+str(i)+') \, \gamma$']
self.fstr = [r'$(a/v_'+str(i)+r') \, \omega$',r'$(a/v_'+str(i)+r') \, \gamma$']

# Convert rho_sD=csD/Omega_i to rho_i=vi/Omega_i
rhoc = vc/(self.z[i]/self.mass[i])
Expand All @@ -568,7 +568,7 @@ def getnorm(self,norm):

# Convert Q_GBD to Q_GBi
self.qc = vc*(self.temp[i]/te)*rhoc**2
self.gbnorm = '_\mathrm{GB'+str(i)+'}'
self.gbnorm = r'_\mathrm{GB'+str(i)+'}'

print('INFO: (getnorm) Using species '+norm+' norm')

Expand Down

0 comments on commit bf49aa6

Please sign in to comment.