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

Philippe 20/03/2018: lfi2cdf:

* improvements
* split option works again
parent 55a83cfd
No related branches found
No related tags found
No related merge requests found
...@@ -109,15 +109,15 @@ program LFI2CDF ...@@ -109,15 +109,15 @@ program LFI2CDF
IF (runmode == MODELFI2CDF) THEN IF (runmode == MODELFI2CDF) THEN
! Conversion LFI -> NetCDF ! Conversion LFI -> NetCDF
IF (options(OPTSPLIT)%set) call open_split_ncfiles_out(outfiles,houtfile,nbvar_tbw,tzreclist,options)
CALL parse_infiles(infiles,outfiles,nbvar_infile,nbvar_tbr,nbvar_calc,nbvar_tbw,tzreclist,ibuflen,options) CALL parse_infiles(infiles,outfiles,nbvar_infile,nbvar_tbr,nbvar_calc,nbvar_tbw,tzreclist,ibuflen,options)
IF (options(OPTSPLIT)%set) call open_split_ncfiles_out(outfiles,houtfile,nbvar,tzreclist,options)
CALL def_ncdf(outfiles,tzreclist,nbvar,options) CALL def_ncdf(outfiles,tzreclist,nbvar,options)
CALL fill_ncdf(infiles,outfiles,tzreclist,nbvar,ibuflen,options) CALL fill_ncdf(infiles,outfiles,tzreclist,nbvar,ibuflen,options)
ELSE IF (runmode == MODECDF2CDF) THEN ELSE IF (runmode == MODECDF2CDF) THEN
! Conversion netCDF -> netCDF ! Conversion netCDF -> netCDF
IF (options(OPTSPLIT)%set) call open_split_ncfiles_out(outfiles,houtfile,nbvar_tbw,tzreclist,options)
CALL parse_infiles(infiles,outfiles,nbvar_infile,nbvar_tbr,nbvar_calc,nbvar_tbw,tzreclist,ibuflen,options) CALL parse_infiles(infiles,outfiles,nbvar_infile,nbvar_tbr,nbvar_calc,nbvar_tbw,tzreclist,ibuflen,options)
IF (options(OPTSPLIT)%set) call open_split_ncfiles_out(outfiles,houtfile,nbvar,tzreclist,options)
CALL def_ncdf(outfiles,tzreclist,nbvar,options) CALL def_ncdf(outfiles,tzreclist,nbvar,options)
CALL fill_ncdf(infiles,outfiles,tzreclist,nbvar,ibuflen,options) CALL fill_ncdf(infiles,outfiles,tzreclist,nbvar,ibuflen,options)
......
...@@ -83,11 +83,15 @@ subroutine read_commandline(options,hinfile,houtfile,runmode) ...@@ -83,11 +83,15 @@ subroutine read_commandline(options,hinfile,houtfile,runmode)
call remove_suffix(hinfile) call remove_suffix(hinfile)
!Determine outfile name if not given !Determine outfile name if not given
if (.NOT.options(OPTOUTPUT)%set) then if (.NOT.options(OPTOUTPUT)%set .AND. .NOT.options(OPTSPLIT)%set) then
idx = index(hinfile,'/',back=.true.) idx = index(hinfile,'/',back=.true.)
options(OPTOUTPUT)%cvalue = hinfile(idx+1:len_trim(hinfile))//'_merged' options(OPTOUTPUT)%cvalue = hinfile(idx+1:len_trim(hinfile))//'_merged'
end if end if
if (.NOT.options(OPTOUTPUT)%set .AND. options(OPTSPLIT)%set) then
idx = index(hinfile,'/',back=.true.)
options(OPTOUTPUT)%cvalue = trim(hinfile)
end if
houtfile = options(OPTOUTPUT)%cvalue houtfile = options(OPTOUTPUT)%cvalue
call remove_suffix(houtfile) call remove_suffix(houtfile)
......
This diff is collapsed.
...@@ -87,6 +87,8 @@ INTEGER, PARAMETER :: NFILENAMELGTMAX = 32 ! Maximum length of a file name (must ...@@ -87,6 +87,8 @@ INTEGER, PARAMETER :: NFILENAMELGTMAX = 32 ! Maximum length of a file name (must
INTEGER, PARAMETER :: NFILENAMELGTMAXLFI = 28 ! Maximum length of a file name in LFI file (this is necessary INTEGER, PARAMETER :: NFILENAMELGTMAXLFI = 28 ! Maximum length of a file name in LFI file (this is necessary
! to keep backward compatibility), MUST BE 28 ! to keep backward compatibility), MUST BE 28
! !
INTEGER, PARAMETER :: NLFIMAXCOMMENTLENGTH = 100 ! Length of comments in LFI files
!
INTEGER, PARAMETER :: JPLIMACCNMAX = 10 ! Maximum allowed number of CCN modes in LIMA INTEGER, PARAMETER :: JPLIMACCNMAX = 10 ! Maximum allowed number of CCN modes in LIMA
INTEGER, PARAMETER :: JPLIMAIFNMAX = 10 ! Maximum allowed number of IFN modes in LIMA INTEGER, PARAMETER :: JPLIMAIFNMAX = 10 ! Maximum allowed number of IFN modes in LIMA
! !
......
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