Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SPC
gdat
Commits
74771037
Commit
74771037
authored
Oct 21, 2021
by
Matteo Vallar
Browse files
Now warning user if nverbose>=3 when no NB1/Nb2 are present
parent
1821cc28
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/TCV/gdat_tcv.m
View file @
74771037
...
...
@@ -2464,6 +2464,9 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
%
if
any
(
strmatch
(
'nbi1'
,
gdat_data
.
gdat_params
.
source
))
nodenameeff
=
'\results::NBH:POWR_TCV'
;
if
shot
<
70811
nodenameeff
=
'\results::NBH:POWR_TCV'
;
end
nbh_data_tdi
=
tdi
(
nodenameeff
);
if
~
isempty
(
nbh_data_tdi
.
data
)
&&
~
ischar
(
nbh_data_tdi
.
data
)
&&
~
isempty
(
nbh_data_tdi
.
dim
)
nbi_neutral_power_tot
=
nbh_data_tdi
.
data
.*
1e6
;
% in W
...
...
@@ -2487,6 +2490,20 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data
.
data
(:,
end
+
1
)
=
interpos
(
-
21
,
gdat_data
.
nbi1
.
t
(
ij
),
gdat_data
.
nbi1
.
data
(
ij
),
gdat_data
.
t
);
gdat_data
.
x
(
end
+
1
)
=
size
(
gdat_data
.
data
,
2
);
gdat_data
.
label
{
end
+
1
}
=
gdat_data
.
nbi1
.
label
;
else
if
gdat_params
.
nverbose
>=
3
fprintf
(
'No NB1 data in MDS+ nodes for shot %i\n'
,
shot
);
model_signame
=
'\ATLAS::NB1.DATA.MODEL:POWR_NEUTRAL'
;
if
shot
<
70811
nodenameeff
=
'\ATLAS::NB1.DATA.MODEL:POWR_NEUTRAL'
;
end
model_data
=
tdi
(
model_signame
);
if
isempty
(
model_data
.
dim
)
fprintf
(
'And it was NOT requested \n'
);
else
fprintf
(
'And it was requested. Check if plasma was a blip or if NB1 did not work \n'
);
end
end
end
end
%
...
...
@@ -2515,10 +2532,10 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
end
%
if
any
(
strmatch
(
'nbi2'
,
gdat_data
.
gdat_params
.
source
))
% NB2
nodenameeff
=
'\results::NB2:POWR_TCV'
;
% NB2
nodenameeff
=
'\results::NB2:POWR_TCV'
;
nb2_data_tdi
=
tdi
(
nodenameeff
);
if
~
isempty
(
nb2_data_tdi
.
d
ata
)
&&
~
ischar
(
nb2_data_tdi
.
data
)
&&
~
isempty
(
nb2_data_tdi
.
dim
)
if
~
isempty
(
nb2_data_tdi
.
d
im
)
&&
~
ischar
(
nb2_data_tdi
.
data
)
&&
~
isempty
(
nb2_data_tdi
.
dim
)
nbi_neutral_power_tot
=
nb2_data_tdi
.
data
.*
1e6
;
% in W
ij
=
nbi_neutral_power_tot
<
100
;
nbi_neutral_power_tot
(
ij
)
=
0.
;
...
...
@@ -2540,8 +2557,20 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data
.
data
(:,
end
+
1
)
=
interpos
(
-
21
,
gdat_data
.
nbi2
.
t
(
ij
),
gdat_data
.
nbi2
.
data
(
ij
),
gdat_data
.
t
);
gdat_data
.
x
(
end
+
1
)
=
size
(
gdat_data
.
data
,
2
);
gdat_data
.
label
{
end
+
1
}
=
gdat_data
.
nbi2
.
label
;
end
else
if
gdat_params
.
nverbose
>=
3
fprintf
(
'No NB2 data in MDS+ nodes for shot %i\n'
,
shot
);
model_signame
=
'\ATLAS::NB2.DATA.MODEL:POWR_NEUTRAL'
;
model_data
=
tdi
(
model_signame
);
if
isempty
(
model_data
.
dim
)
fprintf
(
'And it was NOT requested \n'
);
else
fprintf
(
'And it was requested. Check if plasma was a blip or if NB1 did not work \n'
);
end
end
end
end
if
any
(
strmatch
(
'dnbi'
,
gdat_data
.
gdat_params
.
source
))
% NB2
nodenameeff
=
'\RESULTS::DNBI:POWR_TCV'
;
...
...
@@ -2675,7 +2704,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
end
case
{
'phi_tor'
,
'phitor'
,
'toroidal_flux'
}
% Phi(LCFS) = int(Bphi dSphi), can use Eq.(11) of "Tokamak coordinate conventions: COCOS" paper:
% O. Sauter, S.Yu. Medvedev, Comput. Phys. Commun. 184 (2013) 293
–
302
% O. Sauter, S.Yu. Medvedev, Comput. Phys. Commun. 184 (2013) 293
???
302
% since cocos=17 for LIUQE we get:
% q = -dPhi/dpsi => Phi = - int(q*dpsi) which should always have the sign of B0
% need to get q_rho but to avoid loop for rhotor in grids_1d, get q_rho explicitely here
...
...
@@ -2897,7 +2926,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case
{
'rhotor_edge'
,
'rhotor'
,
'rhotor_norm'
}
% Phi(LCFS) = int(Bphi dSphi), can use Eq.(11) of "Tokamak coordinate conventions: COCOS" paper:
% O. Sauter, S.Yu. Medvedev, Comput. Phys. Commun. 184 (2013) 293
–
302
% O. Sauter, S.Yu. Medvedev, Comput. Phys. Commun. 184 (2013) 293
???
302
% since cocos=17 for LIUQE we get:
% q = -dPhi/dpsi => Phi = - int(q*dpsi) which should always have the sign of B0
% need to get q_rho but to avoid loop for rhotor in grids_1d, get q_rho explicitely here
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment