MCIP compile mcoutcom_mod.o

I am building CMAQv5.2.1 and cannot compile MCIP. The issue is related to one of the .f90 files, so I’m not sure how to address it. Thank you for any help.

Here is a portion of my Makefile:

#gfortran
FC = mpif90
FFLAGS = $(myFRFLAGS) -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files
-I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include
LIBS = -L/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/lib -lioapi
-L/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/lib -lnetcdf -lnetcdff

And here is the log file:

make[1]: Entering directory `/central/groups/seinfeldgroup/CMAQ_REPO/PREP/mcip/src’
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c const_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c const_pbl_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c coord_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c date_time_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c date_pack_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c files_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c groutcom_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c luoutcom_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c luvars_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c mcipparm_mod.f90
mpif90 -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/ioapi/include_files -I/central/groups/seinfeldgroup/CMAQ_EAP_5.2.1/lib/x86_64/gcc/netcdf/include -c mcoutcom_mod.f90
mcoutcom_mod.f90:146:58:

    'SNOCOV',     'VEG   ',     'LAI   ',     'SEAICE',      &
                                                      1

Error: Different CHARACTER lengths (6/5) in array constructor at (1)
mcoutcom_mod.f90:157:62:

    'DECIMAL   ', 'DECIMAL   ', 'AREA/AREA ', 'FRACTION  ',  &
                                                          1

Error: Different CHARACTER lengths (10/1) in array constructor at (1)
make[1]: *** [mcoutcom_mod.o] Error 1
make[1]: Leaving directory `/central/groups/seinfeldgroup/CMAQ_REPO/PREP/mcip/src’
make: *** [all] Error 2

Try adding one space after ‘SNOWH’ and nine spaces after ‘M’ so that they are the same length as the other strings. They should probably all be of length 16 to match the declaration CHARACTER(LEN=16).

'SNOWH '  /)
'M         '  /)

Thanks! That worked.

I also had to use the same fix for the following error:
mosoutcom_mod.f90:50:17:

 (/ 'LUFRAC2', 'MOSCAT  ',  'LAI_MOS ',   'RAI_MOS ',     &
             1

Error: Different CHARACTER lengths (7/8) in array constructor at (1)

The issue with the sensitivity to truncated character strings by some compilers is corrected throughout MCIP for the forthcoming release.

These types of mistakes can be caught if the developers ran any sort of unit tests or continuous integration.