diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m index 269a3fb267f4063d1e9cd217304970e5da76d21f..3b3aed5cf67f255378ac108f081a4d4385f43925 100644 --- a/crpptbx/TCV/gdat_tcv.m +++ b/crpptbx/TCV/gdat_tcv.m @@ -231,6 +231,8 @@ error_status = 6; % at least reached this level liuqe_version = 1; if isfield(gdat_data.gdat_params,'liuqe') && ~isempty(gdat_data.gdat_params.liuqe) liuqe_version = gdat_data.gdat_params.liuqe; +else + gdat_data.gdat_params.liuqe = liuqe_version; end substr_liuqe = ''; if liuqe_version==2 || liuqe_version==3 @@ -520,6 +522,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') if isfield(params_eff,'fit') && params_eff.fit>0 sub_nodes_eff = sub_nodes_fit; else + params_eff.fit = 0; sub_nodes_eff = sub_nodes; end @@ -544,6 +547,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') if isfield(gdat_data.gdat_params,'time') && ~isempty(gdat_data.gdat_params.time) time = gdat_data.gdat_params.time; else + gdat_data.gdat_params.time = time; disp(['"time" is expected as an option, choose default time = ' num2str(time)]); end gdat_data.gdat_params.time = time; @@ -551,6 +555,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') zshift = 0.; if isfield(gdat_data.gdat_params,'zshift') && ~isempty(gdat_data.gdat_params.zshift) zshift = gdat_data.gdat_params.zshift; + else + gdat_data.gdat_params.zshift = zshift; end gdat_data.gdat_params.zshift = zshift; for itime=1:length(time) @@ -572,6 +578,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') cocos_out = 17; if isfield(gdat_data.gdat_params,'cocos') && ~isempty(gdat_data.gdat_params.cocos) cocos_out = gdat_data.gdat_params.cocos; + else + gdat_data.gdat_params.cocos = cocos_out; end [eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdsk_cocos_in,[cocos_in cocos_out]); % for several times, use array of structure for eqdsks, @@ -630,6 +638,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') gdat_data.gdat_params.edge>0 edge_str_ = '_edge'; edge_str_dot = '.edge'; + else + gdat_data.gdat_params.edge = 0; end nodenameeff=['\results::thomson' edge_str_dot ':' data_request_eff]; tracetdi=tdi(nodenameeff); @@ -694,6 +704,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') gdat_data.gdat_params.edge>0 edge_str_ = '_edge'; edge_str_dot = '.edge'; + else + gdat_data.gdat_params.edge = 0; end % if nete_rho, do first ne, then Te later (so fir stuff already done) if strcmp(data_request_eff,'ne_rho') || strcmp(data_request_eff,'nete_rho')