IOAPI_3.2 compiling error

Our supercomputer has updated the OS with the gcc 11.3.0. I tried to recompile the IOAPI_3.2 to support CMAQ compiling, but met the following error. It didn’t show this format problem when using the old version of gcc 9.4.0. It should be related to the grammar of new compiler. Any suggestion to solve this problem?

login-2.zaratan.umd.edu{haohe}2745: make
cd /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/Linux2_x86_64gfort; gfortran -c -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -O3 -ffast-math -funroll-loops -m64 -fopenmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -I/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/m3utilio.f
cd /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/Linux2_x86_64gfort; gfortran -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -O3 -ffast-math -funroll-loops -m64 -fopenmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -I/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi -c /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modgctp.f90
cd /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/Linux2_x86_64gfort; gfortran -DF90=1 -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -O3 -ffast-math -funroll-loops -m64 -fopenmp -DAUTO_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -I/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi -c /home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90
/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90:2351:60:

2351 | ISTAT = NF_GET_VARA_DOUBLE( FID, VID, DIMS, DELS, GRID )
| 1

7086 | ISTAT = NF_GET_VARA_DOUBLE( FID, VID, DIMS, DELS, GRID )
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90:2259:58:

2259 | ISTAT = NF_GET_VARA_INT1( FID, VID, DIMS, DELS, GRID )
| 1

6930 | ISTAT = NF_GET_VARA_INT1( FID, VID, DIMS, DELS, GRID )
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90:2167:58:

2167 | ISTAT = NF_GET_VARA_INT2( FID, VID, DIMS, DELS, GRID )
| 1

6774 | ISTAT = NF_GET_VARA_INT2( FID, VID, DIMS, DELS, GRID )
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90:2075:57:

2075 | ISTAT = NF_GET_VARA_INT( FID, VID, DIMS, DELS, GRID )
| 1

6618 | ISTAT = NF_GET_VARA_INT( FID, VID, DIMS, DELS, GRID )
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
/home/haohe/scratch/CMAQv5.5/lib/ioapi_3.2/ioapi/modncfio.F90:1983:58:

1983 | ISTAT = NF_GET_VARA_REAL( FID, VID, DIMS, DELS, GRID )
| 1

6462 | ISTAT = NF_GET_VARA_REAL( FID, VID, DIMS, DELS, GRID )
| 2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make: *** [Makefile:290: modncfio.mod] Error 1

See the I/OI API Troubleshooting Page on gfortran versions 10 or later https://cjcoats.github.io/ioapi/ERRORS.html#gfort10:

These versiona of gfortran take a particularly idiosyncratic interpretation of the (latest) Fortran-2018 Standard.
As of July 12, 2020, the relevant ioapi/Makeinclude.${BIN} files have been modified to add Fortran compile-flag
-std=legacy
so that this interpretation does not cause a compile-error.
However, using this compiler version will cause the generation of a huge number of spurious warning-messages, as the compiler is still trying to enforce its version of the Fortran-2018 (not Fortran-90, not Fortran-95, not Fortran-2008) Standard.

Thanks to Mrs. Indumathi S Iyer, (SO/D), BARC, for pointing out this compiler-problem and help with testing the fix.—CJC

See ioapi/Makeinclude.Linux2_x86_64gfort10

Solved my problem, thanks!