Exemple #1
0
#plt.plot(psi0,te,'x',label='electron temp')
#plt.plot(psi0,ti,'r.',label='ion temp')
#plt.legend()
#plt.show()

rhot0 = rho_tor_spl(psi0 * (psisep - psiax) + psiax)

ni_obmp = interp(psi0, ni, psip_n_obmp)
ti_obmp = interp(psi0, ti, psip_n_obmp)
ne_obmp = interp(psi0, ne, psip_n_obmp)
te_obmp = interp(psi0, te, psip_n_obmp)

Er_file = 'Er1120907032.01010_v20140623'
shift_Er = True  #Shift Er profile in poloidal flux coord
Er_shift = 0.005  #Shift in poloidal flux coord
psi0_Er, Er, Er_error = read_Er(Er_file, shift_Er, Er_shift)
Er = Er * 1E03

# psi0_Er starts from 0.9 to 1.055, psip_obmp goes from 0 to 1.06
# high end of psip_n_obmp has to be outside of high end of psi0_Er
# conversion makes Er outside the original range not useful
psi_Er_f = np.argmin(abs(psip_n_obmp - psi0_Er[0]))
psi_Er_l = np.argmin(abs(psip_n_obmp - psi0_Er[-1]))
Er_obmp = interp(psi0_Er, Er, psip_n_obmp[psi_Er_f:psi_Er_l + 1])

#plt.plot(psi0_Er,Er,'x')
#plt.plot(psip_n_obmp[psi_Er_f:psi_Er_l+1],Er_obmp,'r.')
#plt.ylabel('Er')
#plt.show()

p_obmp = interp(psip_n, p, psip_n_obmp)
Exemple #2
0
rhot0=rho_tor_spl(psi0*(psisep-psiax)+psiax)

ni_obmp = interp(psi0,ni,psip_n_obmp)
ti_obmp = interp(psi0,ti,psip_n_obmp)
ne_obmp = interp(psi0,ne,psip_n_obmp)
te_obmp = interp(psi0,te,psip_n_obmp)

rhotp_obmp = interp(psi0,rhot0,psip_n_obmp)
q_obmp = interp(psip_n, qpsi, psip_n_obmp)

### read from Er file
### Er is in the unit of kV/m
Er_file = 'Er1120907032.01010_v20140623'
shift_Er = True   #Shift Er profile in poloidal flux coord
Er_shift = 0.005  #Shift in poloidal flux coord
psi0_Er, Er, Er_error = read_Er(Er_file,shift_Er,Er_shift)
Er = Er*1E03

# psi0_Er starts from 0.9 to 1.055, psip_obmp goes from 0 to 1.06 
# high end of psip_n_obmp has to be outside of high end of psi0_Er
# conversion makes Er outside the original range not useful  
psi_Er_f = np.argmin(abs(psip_n_obmp-psi0_Er[0]))
psi_Er_l = np.argmin(abs(psip_n_obmp-psi0_Er[-1]))
Er_obmp = interp(psi0_Er,Er,psip_n_obmp[psi_Er_f:psi_Er_l+1])

### read from iterdb file
### te, ti are in the unit of ev
### ne, ni are in the unit of m^(-3)
rhot_idb, te_idb, ti_idb, ne_idb, ni_idb, nb_idb, vrot_idb = read_iterdb_file(iterdb_filename)

#psip_idb = interp(rhot_n,psip_n,rhot_idb)