Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Error compiling prep_chem_src

Hi again.

Even when we cannot run your script directly, we have followed it try to solve the problems. I made two changes:

1) Change from prep_chem 1.8 beta to 1.5. This solved a lot of problems related with subrouitnes .F
2) Change the path to the netCDF compiler. I was setting:

Code:
NETCDF=/dragofs/sw/foss/0.2/software/netCDF/4.8.1-gompi-2021b
NETCDF_INC=-I$(NETCDF)/include
NETCDF_LIBS=-L/dragofs/sw/foss/0.2/software/netCDF-Fortran/4.5.3-gompi-2021b/lib64 -lnetcdff -lnetcdf[

Now I use netCDF-Fortran everywhere:

Code:
NETCDF=/dragofs/sw/foss/0.2/software/netCDF-Fortran/4.5.3-gompi-2021b
NETCDF_INC=-I$(NETCDF)/include
NETCDF_LIBS=-L/dragofs/sw/foss/0.2/software/netCDF-Fortran/4.5.3-gompi-2021b/lib64 -lnetcdff -lnetcdf

In addition, I was using mpifort. Now I use gfortran.

After introducing all these changes in order to try following your script, I get this error message:

Code:
/include -I/dragofs/sw/foss/0.2/software/netCDF-Fortran/4.5.3-gompi-2021b/include -I/dragofs/sw/foss/0.2/software/HDF5/1.12.1-gompi-2021b/include  edgar_emissions.f90
edgar_emissions.f90:841:15:

  841 |         'AGRICULTURE',&
      |                      1
Error: Different CHARACTER lengths (11/6) in array constructor at (1)
edgar_emissions.f90:894:61:

  894 |       filename=trim(edgar_data_dir)//"/"//trim(PREFIX)//trim(setor(isetor))//trim(suffix)
      |                                                             1
Error: Function 'setor' at (1) has no IMPLICIT type
edgar_emissions.f90:916:16:

  916 |                if(trim(setor(isetor)) .eq. 'AGRICULTURE' .and. trim(spc_name(ispc)) .ne. 'NH3') cycle
      |                       1
Error: Function 'setor' at (1) has no IMPLICIT type
edgar_emissions.f90:923:30:

  923 |                   print*,trim(setor(isetor)),"   ",trim(dsetname),i, " MAX ",maxval(src_dummy(:,:,i))
      |                              1
Error: Function 'setor' at (1) has no IMPLICIT type
edgar_emissions.f90:924:30:

  924 |                   print*,trim(setor(isetor)),"   ",trim(dsetname),i, " MIN ",minval(src_dummy(:,:,i))
      |                              1
Error: Function 'setor' at (1) has no IMPLICIT type

Is this maybe another problem related with GCC or GFORTRAN versions?
That's the gcc gfortran version 11 error.

Try adding -fallow-argument-mismatch to fflags
 
Hi again,

the code is already compiled! I solves the previous problem by adding blank spaces to the names in the list so that all of them have the same length.

Then, a problem appeared during the compilation of "convert_bioge_to_RACM_REAC.f90". I read in another forum that the line use_chem has to be commented. I did it, and the code has now compiled.

Thank you for your help. I would not have been able to compile the code without your suppo

If everything is working for you. Can you please change your title of your post from

"Error compiling prep_chem_src"

to

"Error compiling prep_chem_src (Solved)"

That way future users can see the solution and know that it works.
 
Top