MEGAN 3.2 Error While Running and Compiling

Thank you so much @cjcoats for your elaborate instructions.

This existed in the readpar.f file as you have mentioned.
About the “LFIRST”, I tried implicit none which produced even more errors:

 -I/home/fernando/Build_CMAQ/src/ioapi/ioapi/fixed_src -I/home/fernando/Build_CMAQ/LIBRARIES/netcdf/include -I/home/fernando/megan32/MEGANv3.2_Dec_2021/src/MET2MGN/INCLDIR readmcip.f
readmcip.f:16:132:

   16 |       implicit none
      |                                                                                                                                    1
Error: IMPLICIT NONE statement at (1) cannot follow COMMON statement at (2)
readmcip.f:243:12:

  243 |         do i=1,nx
      |            1
Error: Symbol ‘i’ at (1) has no IMPLICIT type
readmcip.f:78:12:

   78 |       ietime = etime/100
      |            1
Error: Symbol ‘ietime’ at (1) has no IMPLICIT type; did you mean ‘etime’?
readmcip.f:77:12:

   77 |       istime = stime/100
      |            1
Error: Symbol ‘istime’ at (1) has no IMPLICIT type; did you mean ‘stime’?
readmcip.f:242:12:

  242 |         do j=1,ny
      |            1
Error: Symbol ‘j’ at (1) has no IMPLICIT type
readmcip.f:131:17:

  131 |         isoilm = INDEX1('SOIM1',NVARS3D,VNAME3D)
      |                 1
Error: Function ‘index1’ at (1) has no IMPLICIT type
readmcip.f:132:17:

  132 |         isoilt = INDEX1('SOIT1',NVARS3D,VNAME3D)
      |                 1
Error: Function ‘index1’ at (1) has no IMPLICIT type
readmcip.f:133:19:

  133 |         isoiltyp = INDEX1('SLTYP',NVARS3D,VNAME3D)
      |                   1
Error: Function ‘index1’ at (1) has no IMPLICIT type
make: *** [makefile:43: readmcip.o] Error 1

I tried this too, and it produced the same error.

Then I did something which don’t think is the right approach to these problems, but it worked. I changed “LFIRST” from logical to integer and changed the code to this:

        if((sdate+2000000).eq.jdate.and.(stime*100).eq.jtime) then
          lfirst = 100
        else
          lfirst = 50
        endif 
        if (lfirst==100) then

LFIRST is only used in this part of the code so I don’t think that there will be a problem with this change (I really have no idea whether I am write or wrong here).

I believe that if someone like you tells the MEGAN developers to change their codes to something which isn’t obsolete, they’ll probably listen to your words. I am just a simple user who wants to get his job done, but your experience in this field is something that they should try to listen to.

Again, thank you for your helps