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

lfi2cdf: BUG corrections: uninitialised variables + incorrect conversion

parent b5e55706
No related branches found
No related tags found
No related merge requests found
......@@ -297,8 +297,6 @@ END SUBROUTINE init_sysfield
END IF
END DO
write(clevel,'(I4.4)') level
IF (.NOT. found) THEN
! Next, search in user field tab
IF (ALLOCATED(userfield)) THEN
......@@ -331,6 +329,7 @@ END SUBROUTINE init_sysfield
ELSE IF (level>-1) THEN
!Maybe it is a z-level splitted field
!Warning: false positives are possible (but should be rare)
write(clevel,'(I4.4)') level
iposx = INDEX(hfname,clevel)
IF (iposx /= 0) THEN
IF (hfname(:iposx-1)==sysfield(ji)%name) THEN
......
......@@ -59,6 +59,7 @@ subroutine LFI2CDFMAIN(hinfile,iiflen,ooutname,houtfile,ioflen,hvarlist,ivlen,o
! by counting commas, = and +
nbvar_tbr = 0
nbvar_calc = 0
nbvar_tbw = 0
DO ji=1,ivlen
IF (hvarlist(ji:ji) == ',' .OR.hvarlist(ji:ji) == '+') THEN
nbvar_tbr = nbvar_tbr+1
......
......@@ -72,6 +72,7 @@ CONTAINS
!
IF (len /= 1) THEN
IF (gforce) THEN
count = 0
NULLIFY(tmp)
ELSE
count = 1
......
......@@ -53,10 +53,13 @@ int main(int argc, char **argv)
cmd++;
l2c_flag = strcmp(cmd, "lfi2cdf") == 0 ? 1 : 0;
compress_flag = 0;
list_flag = 0;
hdf5_flag = 0;
help_flag = 0;
outname_flag = 0;
reduceprecision_flag = 0;
compress_flag = 0;
split_flag = 0;
p = buff;
*p = '\0';
......
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