c kspectrum (http://www.meso-star.com/en_Products.html) - This file is part of kspectrum c Copyright (C) 2008-2015 - Méso-Star - Vincent Eymet c c This file must be used under the terms of the CeCILL license. c This source file is licensed as described in the file COPYING, which c you should have received as part of this distribution. The terms c are also available at c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt c subroutine save_temp(Nlnc,ncl_indexes) implicit none include 'max.inc' include 'formats.inc' c Input integer Nlnc integer ncl_indexes(1:Nline_mx) c temp integer l open(12,file='./optimizations/ncl_indexes.tmp') write(12,*) Nlnc do l=1,Nlnc write(12,*) ncl_indexes(l) enddo close(12) return end subroutine save_tmpdata(Nlines,index,isotope,nu0, & Sref,gamma_air,gamma_self,Elow,n_air,delta_air) implicit none include 'max.inc' include 'formats.inc' c Input integer Nlines integer index(1:Nline_mx) integer isotope(1:Nline_mx) double precision nu0(1:Nline_mx) double precision Sref(1:Nline_mx) double precision gamma_air(1:Nline_mx) double precision gamma_self(1:Nline_mx) double precision Elow(1:Nline_mx) double precision n_air(1:Nline_mx) double precision delta_air(1:Nline_mx) c temp integer l open(14,file='./optimizations/sdata.tmp') write(14,*) Nlines do l=1,Nlines write(14,50) index(l),isotope(l),nu0(l),Sref(l),gamma_air(l), & gamma_self(l),Elow(l),n_air(l),delta_air(l) enddo close(14) return end subroutine read_tmpdata(Nlnc,ncl_indexes,Nlines,index,isotope, & nu0,Sref,gamma_air,gamma_self,Elow,n_air,delta_air) implicit none include 'max.inc' include 'formats.inc' c Input integer Nlnc integer ncl_indexes(1:Nline_mx) integer Nlines integer index(1:Nline_mx) integer isotope(1:Nline_mx) double precision nu0(1:Nline_mx) double precision Sref(1:Nline_mx) double precision gamma_air(1:Nline_mx) double precision gamma_self(1:Nline_mx) double precision Elow(1:Nline_mx) double precision n_air(1:Nline_mx) double precision delta_air(1:Nline_mx) c temp integer l integer ios character*(Nchar_mx) tfile c label integer strlen character*(Nchar_mx) label label='subroutine read_tmpdata' tfile='./optimizations/ncl_indexes.tmp' open(12,file=tfile(1:strlen(tfile)) & ,status='old',iostat=ios) if (ios.ne.0) then ! list_file not found call error(label) write(*,*) 'File could not be found:' write(*,*) tfile(1:strlen(tfile)) stop else read(12,*) Nlnc do l=1,Nlnc read(12,*) ncl_indexes(l) enddo close(12) endif ! ios tfile='./optimizations/sdata.tmp' open(14,file=tfile(1:strlen(tfile)) & ,status='old',iostat=ios) if (ios.ne.0) then ! list_file not found call error(label) write(*,*) 'File could not be found:' write(*,*) tfile(1:strlen(tfile)) stop else read(14,*) Nlines do l=1,Nlines read(14,50) index(l),isotope(l),nu0(l),Sref(l),gamma_air(l), & gamma_self(l),Elow(l),n_air(l),delta_air(l) enddo close(14) endif ! ios return end