From a36f2a10aa6ab30db7da5074d9881835200e71b9 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <olivier.sauter@epfl.ch> Date: Tue, 1 Nov 2016 11:25:04 +0000 Subject: [PATCH] add rtc and add option to specify NRout and NZout in eqdsk, set -1,-1 to get original LIUQE nb of points (nrz_out parameter) git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@6677 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx/TCV/gdat_tcv.m | 17 +++++++++++++++-- crpptbx/TCV/tcv_help_parameters.m | 1 + crpptbx/test_all_requestnames.m | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m index 9224a7a4..ce971e50 100644 --- a/crpptbx/TCV/gdat_tcv.m +++ b/crpptbx/TCV/gdat_tcv.m @@ -277,7 +277,13 @@ if do_mdsopen_mdsclose if liuqe_version==-1 ishot = mdsopen('pcs', shot); else - ishot = mdsopen(shot); % if ishot equal to shot, then mdsclose at the end + if length(data_request_eff)>7 && strcmp(data_request_eff(1:6),'\rtc::') + ishot = mdsopen('rtc',shot); % sub-tree + data_request_eff = data_request_eff(7:end); + mapping_for_tcv.expression = data_request_eff; + else + ishot = mdsopen(shot); % if ishot equal to shot, then mdsclose at the end + end end if isempty(ishot) || ishot~=shot if gdat_params.nverbose>=1; warning(['cannot open shot= ' num2str(shot)]); end @@ -735,10 +741,17 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') gdat_data.gdat_params.zshift = zshift; end gdat_data.gdat_params.zshift = zshift; + nrz_out = [129,129]; + if isfield(gdat_data.gdat_params,'nrz_out') && ~isempty(gdat_data.gdat_params.nrz_out) + nrz_out = gdat_data.gdat_params.nrz_out; + else + gdat_data.gdat_params.nrz_out = nrz_out; + end + gdat_data.gdat_params.nrz_out = nrz_out; for itime=1:length(time) time_eff = time(itime); % use read_results updated to effectively obtain an eqdsk with sign correct with COCOS=2 - [fnames_readresults]=read_results_for_chease(shot,time_eff,liuqe_version,3,[],[],[],zshift,0,1); + [fnames_readresults]=read_results_for_chease(shot,time_eff,liuqe_version,3,[],[],[],zshift,0,1,nrz_out); if isempty(fnames_readresults) if gdat_params.nverbose>=1; warning(['could not create eqdsk file from read_results_for_chease with data_request= ' data_request_eff]); diff --git a/crpptbx/TCV/tcv_help_parameters.m b/crpptbx/TCV/tcv_help_parameters.m index 472eab63..f2fda0d7 100644 --- a/crpptbx/TCV/tcv_help_parameters.m +++ b/crpptbx/TCV/tcv_help_parameters.m @@ -34,6 +34,7 @@ help_struct_all.time = 'time(s) value(s) if relevant, for example eqdsk is provi help_struct_all.zshift = 'vertical shift of equilibrium, either for eqdsk (1 to shift to zaxis=0) or for mapping measurements on to rho surfaces [m]'; help_struct_all.cocos = ['cocos value desired in output, uses eqdsk_cocos_transform. Note should use latter if a specific Ip and/or B0 sign' ... 'is wanted. See O. Sauter et al Comput. Phys. Commun. 184 (2013) 293']; +help_struct_all.nrz_out = 'Nb of radial and vertical points in output eqdsk, default is [129,129], set to [-1,-1] to get original meshes'; help_struct_all.edge = '0 (default), 1 to get edge Thomson values'; help_struct_all.fit = '0, no fit profiles, 1 (default) if fit profiles desired as well, relevant for _rho profiles. See also fit_type'; help_struct_all.fit_type = 'provenance of fitted profiles ''conf'' (default) from conf nodes, ''avg'' or ''local'' for resp. proffit: nodes'; diff --git a/crpptbx/test_all_requestnames.m b/crpptbx/test_all_requestnames.m index 0faaa283..70ebcc95 100644 --- a/crpptbx/test_all_requestnames.m +++ b/crpptbx/test_all_requestnames.m @@ -12,5 +12,5 @@ istart=1; for irequest=istart:length(all_request_names) request=all_request_names{irequest} ab_test_all{irequest} = gdat(shot,request,'machine',machine,'doplot',1); - pause + pause(0.3) end -- GitLab