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
76d351b6
Commit
76d351b6
authored
8 months ago
by
Antonia Frank
Browse files
Options
Downloads
Patches
Plain Diff
Correct global quantities that should be not saved as cell array in core_sources
parent
b7a29de5
No related branches found
No related tags found
1 merge request
!137
Add quantities to ids for MRE
Pipeline
#201979
passed
8 months ago
Stage: test
Stage: post-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+9
-11
9 additions, 11 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
with
9 additions
and
11 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+
9
−
11
View file @
76d351b6
...
...
@@ -47,7 +47,7 @@ id_ohm.index = 7; id_ohm.name = 'ohmic';
ids_core_sources
.
source
{
last_index
+
1
}
=
source_template
;
ids_core_sources
.
source
{
last_index
+
1
}
.
identifier
=
id_ohm
;
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
(
1
:
ohm_n_t
)
=
{
profiles_template
};
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
(
1
:
ohm_n_t
)
=
{
globals_template
}
;
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
=
globals_template
;
ohm_data
=
ohm_gdat
.
ohm
.
ohm_data
;
%fill profiles for times n t_grid
...
...
@@ -58,10 +58,10 @@ for ii = 1:ohm_n_t
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
time
=
ohm_t_grid
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
j_parallel
=
...
ohm_data
.
cd_dens
.
data
(:,
ii
)
'
;
% globals
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
time
=
ohm_t_grid
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
power
=
powers_gdat
.
ohm
.
data
(
ii
);
end
% globals
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
.
time
=
ohm_t_grid
;
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
.
power
=
powers_gdat
.
ohm
.
data
;
last_index
=
last_index
+
1
;
% add if statement to only increment if ohmic source has been added
...
...
@@ -74,7 +74,7 @@ id_bs.index = 13; id_bs.name = 'bootstrap_current';
ids_core_sources
.
source
{
last_index
+
1
}
=
source_template
;
ids_core_sources
.
source
{
last_index
+
1
}
.
identifier
=
id_bs
;
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
(
1
:
ohm_n_t
)
=
{
profiles_template
};
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
(
1
:
ohm_n_t
)
=
{
globals_template
}
;
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
=
globals_template
;
% fill profiles for times n t_grid
...
...
@@ -110,7 +110,7 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
ids_core_sources
.
source
{
last_index
+
i_lau
}
=
source_template
;
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
identifier
=
id_ec
;
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
(
1
:
nt_ec_powers
)
=
{
profiles_template
};
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
(
1
:
nt_ec_powers
)
=
{
globals_template
}
;
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
=
globals_template
;
end
% get data for globals from gdat powers and fill in ids_structure
...
...
@@ -120,11 +120,9 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
ec_total_cur
(
isnan
(
ec_total_cur
))
=
0
;
for
i_lau
=
active_launchers
for
ii
=
1
:
nt_ec_powers
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
{
ii
}
.
time
=
ec_powers_tgrid
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
{
ii
}
.
power
=
ec_total_pow
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
{
ii
}
.
current_parallel
=
ec_total_cur
(
ii
);
end
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
.
time
=
ec_powers_tgrid
;
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
.
power
=
ec_total_pow
;
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
global_quantities
.
current_parallel
=
ec_total_cur
;
end
% interpoating p_dens profiles from 'ec_data_tgrid' grid (toray tgrid) to 'ec_powers_tgrid' (powers tgrid)
...
...
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