Skip to content
Snippets Groups Projects
Commit 6cf09f89 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 24/11/2016: lfi2cdf: bug correction: correct name for output file

parent 1789949e
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ subroutine read_commandline(options,hinfile,houtfile,runmode) ...@@ -31,7 +31,7 @@ subroutine read_commandline(options,hinfile,houtfile,runmode)
character(len=:),allocatable,intent(out) :: houtfile character(len=:),allocatable,intent(out) :: houtfile
integer,intent(out) :: runmode integer,intent(out) :: runmode
integer :: idx, ji, nbargs, status, sz integer :: idx, nbargs, status, sz
logical :: finished logical :: finished
character(len=:),allocatable :: command, fullcommand character(len=:),allocatable :: command, fullcommand
...@@ -80,30 +80,13 @@ subroutine read_commandline(options,hinfile,houtfile,runmode) ...@@ -80,30 +80,13 @@ subroutine read_commandline(options,hinfile,houtfile,runmode)
call check_options(options,hinfile,runmode) call check_options(options,hinfile,runmode)
houtfile = options(OPTOUTPUT)%cvalue
!Remove level in the filename if merging LFI splitted files !Remove level in the filename if merging LFI splitted files and output name not set by option
if (.NOT.options(OPTOUTPUT)%set) then if (.NOT.options(OPTOUTPUT)%set) then
if (options(OPTMERGE)%set .AND. .NOT.options(OPTSPLIT)%set) then if (options(OPTMERGE)%set) then
houtfile=houtfile(1:len(houtfile)-9)//houtfile(len(houtfile)-3:) houtfile=hinfile(1:len(hinfile)-9)
end if end if
if (.NOT.options(OPTMERGE)%set .AND. options(OPTSPLIT)%set) then
if (options(OPTCDF4)%set) then
ji=4
else
ji=3
end if
houtfile=houtfile(1:len(houtfile)-ji)
end if
if (options(OPTMERGE)%set .AND. options(OPTSPLIT)%set) then
if (options(OPTCDF4)%set) then
ji=9
else
ji=8
end if
houtfile=houtfile(1:len(houtfile)-ji)
end if
else
houtfile = options(OPTOUTPUT)%cvalue
end if end if
end subroutine read_commandline end subroutine read_commandline
......
...@@ -1268,7 +1268,7 @@ END DO ...@@ -1268,7 +1268,7 @@ END DO
outfiles%files(idx)%format = LFI_FORMAT outfiles%files(idx)%format = LFI_FORMAT
outfiles%files(idx)%status = WRITING outfiles%files(idx)%status = WRITING
ilu = outfiles%files(idx)%lun_id ilu = outfiles%files(idx)%lun_id
CALL LFIOUV(iresp,ilu,ltrue,houtfile,'NEW' ,lfalse,lfalse,iverb,inap,inaf) CALL LFIOUV(iresp,ilu,ltrue,TRIM(houtfile)//'.lfi','NEW' ,lfalse,lfalse,iverb,inap,inaf)
outfiles%files(idx)%opened = .TRUE. outfiles%files(idx)%opened = .TRUE.
END IF END IF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment