c Copyright (C) 2008-2014 Vincent Eymet c c KDISTRIBUTION is free software; you can redistribute it and/or modify c it under the terms of the GNU General Public License as published by c the Free Software Foundation; either version 3, or (at your option) c any later version. c KDISTRIBUTION is distributed in the hope that it will be useful, c but WITHOUT ANY WARRANTY; without even the implied warranty of c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the c GNU General Public License for more details. c You should have received a copy of the GNU General Public License c along with KDISTRIBUTION; if not, see c subroutine generate_kfile(base,i,kfile) implicit none include 'max.inc' include 'formats.inc' c c Purpose: to generate the path name to the kspectrum output file c c Inputs: c + base: character string that contains the base path to the folder that c contains kspectrum output files c + i: index of the kspectrum output file c c Outputs: c + kfile: path name to the required kspectrum output file c integer i character*(Nchar_mx) base,kfile,kf character*3 ich c label integer strlen character*(Nchar_mx) label label='subroutine generate_kfile' 21 format(a20) call add_slash_if_absent(base) call num2str3(i,ich) c call idx2str(i,ich) kf='k'//ich(1:strlen(ich)) kfile=base(1:strlen(base))//kf(1:strlen(kf)) c Debug c write(*,*) 'kfile=',kfile(1:strlen(kfile)) c Debug return end