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
3d216872
Commit
3d216872
authored
8 months ago
by
Antonia Frank
Browse files
Options
Downloads
Patches
Plain Diff
add rhotor to all time slices and fix nbi rhotor
parent
c7d35459
No related branches found
No related tags found
1 merge request
!165
Core sources tcv2ids2database
Pipeline
#206412
passed
8 months ago
Stage: test
Stage: post-test
Changes
1
Pipelines
15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+8
-5
8 additions, 5 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
with
8 additions
and
5 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+
8
−
5
View file @
3d216872
...
@@ -322,14 +322,16 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
...
@@ -322,14 +322,16 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
% interpolate the rho_pol & rho_tor on ec_powers_tgrid
% interpolate the rho_pol & rho_tor on ec_powers_tgrid
interp_rho_pol
=
zeros
(
n_rho
,
nt_ec_out
);
interp_rho_pol
=
zeros
(
n_rho
,
nt_ec_out
);
interp_rho_tor
=
zeros
(
n_rho
,
nt_ec_out
);
interp_rho_tor
=
repmat
(
rho_tor_norm
(:,
1
),
1
,
nt_ec_out
);
for
irho
=
1
:
n_rho
for
irho
=
1
:
n_rho
interp_rho_pol
(
irho
,
3
:
end
-
2
)
=
interpos
(
21
,
ec_tgrid_toray
,
rho_pol_norm
(
irho
,:),
ec_tgrid_out
(
3
:
end
-
2
));
interp_rho_pol
(
irho
,
3
:
end
-
2
)
=
interpos
(
21
,
ec_tgrid_toray
,
rho_pol_norm
(
irho
,:),
ec_tgrid_out
(
3
:
end
-
2
));
interp_rho_tor
(
irho
,
3
:
end
-
2
)
=
interpos
(
21
,
ec_tgrid_toray
,
rho_tor_norm
(
irho
,:),
ec_tgrid_out
(
3
:
end
-
2
));
%
interp_rho_tor(irho,3:end-2) = interpos(21,ec_tgrid_toray,rho_tor_norm(irho,:),ec_tgrid_out(3:end-2));
end
end
% fill rho_pol just outside of TORAY times(zero power) with the known profiles one time slice after/before
% fill rho_pol just outside of TORAY times(zero power) with the known profiles one time slice after/before
interp_rho_pol
(:,
2
)
=
interp_rho_pol
(:,
3
);
interp_rho_pol
(:,
end
-
1
)
=
interp_rho_pol
(:,
end
-
2
);
interp_rho_pol
(:,
2
)
=
interp_rho_pol
(:,
3
);
interp_rho_pol
(:,
end
-
1
)
=
interp_rho_pol
(:,
end
-
2
);
%interp_rho_tor(:,2) = interp_rho_tor(:,3); interp_rho_tor(:,end-1) = interp_rho_tor(:,end-2);
% normalised & interpolated profiles * p_ec_injected on interp_tgrid
% normalised & interpolated profiles * p_ec_injected on interp_tgrid
interp_p_dens
=
zeros
(
n_rho
,
nb_launchers
+
1
,
nt_ec_out
);
interp_p_dens
=
zeros
(
n_rho
,
nb_launchers
+
1
,
nt_ec_out
);
interp_p_integrated
=
zeros
(
n_rho
,
nb_launchers
+
1
,
nt_ec_out
);
interp_p_integrated
=
zeros
(
n_rho
,
nb_launchers
+
1
,
nt_ec_out
);
...
@@ -347,6 +349,7 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
...
@@ -347,6 +349,7 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
for
ii
=
1
:
nt_ec_out
for
ii
=
1
:
nt_ec_out
% 1d_profiles
% 1d_profiles
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
{
ii
}
.
time
=
ec_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
{
ii
}
.
time
=
ec_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
{
ii
}
.
grid
.
rho_tor_norm
=
interp_rho_tor
(:,
ii
);
% grids (do not fill for first and last time slice)
% grids (do not fill for first and last time slice)
if
ii
~=
1
||
ii
~=
nt_ec_out
if
ii
~=
1
||
ii
~=
nt_ec_out
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
{
ii
}
.
grid
.
rho_tor_norm
=
interp_rho_tor
(:,
ii
);
ids_core_sources
.
source
{
last_index
+
i_lau
}
.
profiles_1d
{
ii
}
.
grid
.
rho_tor_norm
=
interp_rho_tor
(:,
ii
);
...
@@ -422,7 +425,7 @@ if numel(active_nbi)>0
...
@@ -422,7 +425,7 @@ if numel(active_nbi)>0
p_nbi_injected_tmp
=
interpos
(
nbi_powers_tgrid
,
powers_gdat
.
(
nbi_names
{
i_nbi
})
.
data
,
nbi_tgrid_out
);
p_nbi_injected_tmp
=
interpos
(
nbi_powers_tgrid
,
powers_gdat
.
(
nbi_names
{
i_nbi
})
.
data
,
nbi_tgrid_out
);
for
ii
=
1
:
nt_nbi_out
for
ii
=
1
:
nt_nbi_out
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
profiles_1d
{
ii
}
.
time
=
nbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
profiles_1d
{
ii
}
.
time
=
nbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
profiles_1d
{
ii
}
.
rho_tor_norm
=
rho_test
;
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
profiles_1d
{
ii
}
.
grid
.
rho_tor_norm
=
rho_test
;
% globals
% globals
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
global_quantities
{
ii
}
.
time
=
nbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
global_quantities
{
ii
}
.
time
=
nbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
global_quantities
{
ii
}
.
power
=
p_nbi_injected_tmp
(
ii
);
ids_core_sources
.
source
{
last_index
+
i_nbi
}
.
global_quantities
{
ii
}
.
power
=
p_nbi_injected_tmp
(
ii
);
...
@@ -463,7 +466,7 @@ if ~isempty(powers_gdat.dnbi)
...
@@ -463,7 +466,7 @@ if ~isempty(powers_gdat.dnbi)
p_dnbi_injected
=
interpos
(
dnbi_powers_tgrid
,
powers_gdat
.
dnbi
.
data
,
dnbi_tgrid_out
);
p_dnbi_injected
=
interpos
(
dnbi_powers_tgrid
,
powers_gdat
.
dnbi
.
data
,
dnbi_tgrid_out
);
for
ii
=
1
:
nt_dnbi_out
for
ii
=
1
:
nt_dnbi_out
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
time
=
dnbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
time
=
dnbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
rho_tor_norm
=
rho_test
;
ids_core_sources
.
source
{
last_index
+
1
}
.
profiles_1d
{
ii
}
.
grid
.
rho_tor_norm
=
rho_test
;
% globals
% globals
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
time
=
dnbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
time
=
dnbi_tgrid_out
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
power
=
p_dnbi_injected
(
ii
);
ids_core_sources
.
source
{
last_index
+
1
}
.
global_quantities
{
ii
}
.
power
=
p_dnbi_injected
(
ii
);
...
...
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