Skip to content
Snippets Groups Projects
Commit 4b02143f authored by Antonia Frank's avatar Antonia Frank
Browse files

Add vacuum toroidal field and change homogeneous time flag to 0

parent 14cd8d17
Branches
Tags
1 merge request!137Add quantities to ids for MRE
...@@ -14,10 +14,11 @@ tens_rho = -0.1; ...@@ -14,10 +14,11 @@ tens_rho = -0.1;
if exist('gdat_params','var') if exist('gdat_params','var')
[ids_core_sources, params_core_sources] = ... [ids_core_sources, params_core_sources] = ...
tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','gdat_params',gdat_params,varargin{:}); tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','gdat_params',gdat_params,...
'homogeneous_time',0,varargin{:});
else else
[ids_core_sources, params_core_sources] = ... [ids_core_sources, params_core_sources] = ...
tcv_ids_headpart(shot,ids_equil_empty,'cores_sources',varargin{:}); tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','homogeneous_time',0,varargin{:});
aa=gdat_tcv; aa=gdat_tcv;
gdat_params = aa.gdat_params; % to get default params gdat_params = aa.gdat_params; % to get default params
end end
...@@ -27,14 +28,23 @@ try params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no sou ...@@ -27,14 +28,23 @@ try params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no sou
% initialize description % initialize description
ids_core_sources_description = []; ids_core_sources_description = [];
%% fill vacuum_toroidal field
params_eff = params_eff_ref; params_eff.data_request='b0';
b0_gdat=gdat(params_core_sources.shot,params_eff);
ids_core_sources.vacuum_toroidal_field.r0 = b0_gdat.r0;
ids_core_sources.vacuum_toroidal_field.b0 = b0_gdat.data;
ids_core_sources_description.vacuum_toroidal_field = b0_gdat.request_description;
ids_core_sources.time = b0_gdat.t;
%% %%
% save source template to fill for differnet source options % save source template to fill for differnet source options
source_template = ids_core_sources.source{1}; source_template = ids_core_sources.source{1};
profiles_template = source_template.profiles_1d{1}; profiles_template = source_template.profiles_1d{1};
globals_template = source_template.global_quantities{1}; globals_template = source_template.global_quantities{1};
%% get time grid and data from gdat %% get time grid and data from gdat
ohm_gdat = gdat(shot,'ohm_data'); params_eff = params_eff_ref; params_eff.data_request='ohm_data';
powers_gdat = gdat(shot,'powers'); ohm_gdat = gdat(params_core_sources.shot,params_eff);
params_eff = params_eff_ref; params_eff.data_request='powers';
powers_gdat = gdat(params_core_sources.shot,params_eff);
% fix time grid to ohm time grid, same as bs % fix time grid to ohm time grid, same as bs
last_index = 0; last_index = 0;
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
% As a general rule, for a new substructure under the main ids, construct a local structure like: % As a general rule, for a new substructure under the main ids, construct a local structure like:
% "global_quantities" with subfields being the relevant data to get and a local structure: % "global_quantities" with subfields being the relevant data to get and a local structure:
% "global_quantities_desc" which contains the same subfields themselves containing the gdat string aftre shot used % "global_quantities_desc" which contains the same subfields themselves containing the gdat string after shot used
% %
% vacuum_toroidal_field and time, using homogeneous % vacuum_toroidal_field and time, using homogeneous
% %
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment