Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gdat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
gdat
Commits
a2fcdbf9
Commit
a2fcdbf9
authored
1 year ago
by
Antonia Frank
Browse files
Options
Downloads
Patches
Plain Diff
Add core transport ids
parent
8d39fd16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!137
Add quantities to ids for MRE
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_core_transport.m
+86
-0
86 additions, 0 deletions
matlab/TCV_IMAS/tcv_get_ids_core_transport.m
with
86 additions
and
0 deletions
matlab/TCV_IMAS/tcv_get_ids_core_transport.m
0 → 100644
+
86
−
0
View file @
a2fcdbf9
function
[
ids_core_transport
,
ids_core_transport_description
,
varargout
]
=
...
tcv_get_ids_core_transport
(
shot
,
ids_equil_empty
,
gdat_params
,
varargin
)
%
% [ids_core_profiles,ids_core_profiles_description,varargout] = ...
% tcv_get_ids_core_profiles(shot,ids_equil_empty,gdat_params,varargin);
%
%
% gdat_params: gdat_data.gdat_params to get all params passed from original call
%
machine
=
'tcv'
;
tens_time
=
-
1
;
tens_rho
=
-
0.1
;
if
exist
(
'gdat_params'
,
'var'
)
[
ids_core_transport
,
params_core_transport
]
=
...
tcv_ids_headpart
(
shot
,
ids_equil_empty
,
'cores_profiles'
,
'gdat_params'
,
gdat_params
,
varargin
{:});
else
[
ids_core_transport
,
params_core_transport
]
=
...
tcv_ids_headpart
(
shot
,
ids_equil_empty
,
'cores_profiles'
,
varargin
{:});
aa
=
gdat_tcv
;
gdat_params
=
aa
.
gdat_params
;
% to get default params
end
params_eff_ref
=
gdat_params
;
params_eff_ref
.
doplot
=
0
;
try
params_eff_ref
=
rmfield
(
params_eff_ref
,
'source'
);
catch
;
end
% make sure no source (from ids def)
% initialize description
ids_core_transport_description
=
[];
%%
% setup empty model structs (up to 3 for now)
ids_core_transport
.
model
(
1
:
3
)
=
ids_core_transport
.
model
(
1
);
% fill model(3) [name: transport solver, desc: output from transport solver]
% setup model and profiles_1d
comment
=
'Output from a transport solver'
;
ids_core_transport
.
model
{
3
}
.
comment
=
comment
;
ids_core_transport
.
model
{
3
}
.
name
=
comment
;
ids_core_transport
.
model
{
3
}
.
identifier
.
index
=
2
;
ids_core_transport
.
model
{
3
}
.
name
=
'transport_solver'
;
% read data and setup time
params_eff
.
data_request
=
'\results::conf:chie'
;
temp_1d
.
chie
=
gdat
(
params_core_transport
.
shot
,
params_eff
.
data_request
);
temp_1d_desc
.
chie
=
params_eff
.
data_request
;
if
isempty
(
temp_1d
.
chie
.
t
)
warning
(
'no data in chie node, might need to rerun anaprofs'
)
return
end
ids_core_transport
.
time
=
temp_1d
.
chie
.
t
;
ids_core_transport_description
.
time
=
[
'from node'
params_eff
.
data_request
];
ct
.
cids_core_transport
.
model
{
3
}
.
profiles_1d
(
1
:
length
(
ids_core_transport
.
time
))
=
...
ids_core_transport
.
model
{
3
}
.
profiles_1d
(
1
);
%% fill profiles_1d
for
it
=
1
:
length
(
ids_core_transport
.
time
)
ids_core_transport
.
model
{
3
}
.
profiles_1d
{
it
}
.
time
=
ids_core_transport
.
time
(
it
);
ids_core_transport
.
model
{
3
}
.
profiles_1d
{
it
}
.
conductivity_parallel
=
temp_1d
.
chie
.
data
(:,
it
);
temp_1d_desc
.
conductivity_parallel
=
temp_1d
.
chie
.
label
;
end
%% add descriptions for profiles_1d
ids_core_transport_description
.
profiles_1d
=
temp_1d_desc
;
%%
if
nargin
<=
2
ids_core_transport
.
code
.
name
=
[
'tcv_get_ids_core_transport, within gdat, with shot= '
num2str
(
params_core_transport
.
shot
)
];
else
ids_core_transport
.
code
.
name
=
[
'tcv_get_ids_core_transport, within gdat, with shot= '
num2str
(
params_core_transport
.
shot
)
'; varargin: '
varargin
{:}];
end
ids_core_transport_description
.
code
.
name
=
ids_core_transport
.
code
.
name
;
ids_core_transport
.
code
.
output_flag
=
zeros
(
size
(
ids_core_transport
.
time
));
% cocos automatic transform
if
~
isempty
(
which
(
'ids_generic_cocos_nodes_transformation_symbolic'
))
[
ids_core_transport
,
cocoscoeff
]
=
ids_generic_cocos_nodes_transformation_symbolic
(
ids_core_transport
,
'core_transport'
,
gdat_params
.
cocos_in
,
...
gdat_params
.
cocos_out
,
gdat_params
.
ipsign_out
,
gdat_params
.
b0sign_out
,
gdat_params
.
ipsign_in
,
gdat_params
.
b0sign_in
,
...
gdat_params
.
error_bar
,
gdat_params
.
nverbose
);
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment