AGRIF+Sediment

Hi,

I am getting the following errors while compiling CROCO with AGRIF+Sediment module
Is there a missing flag for the compilation?

OPENMP

RIF_MODELFILES/main.F > main_.f
gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 -IAGRIF -fopenmp main_.f -o main.o
main_.f:1397:53:

   integer(4), parameter :: NST = NSAND+NMUD+NGRAV
                                                 1

Error: Symbol ‘ngrav’ at (1) has no IMPLICIT type
main_.f:1398:45:

   integer(4), parameter :: ntrc_sed = NST
                                         1

Error: Symbol ‘nst’ at (1) has no IMPLICIT type
main_.f:1404:12:

and with MPI

RIF_MODELFILES/main.F > main_.f
mpif90 -c -O3 -fdefault-real-8 -fdefault-double-8 -IAGRIF main_.f -o main.o
main_.f:1420:53:

   integer(4), parameter :: NST = NSAND+NMUD+NGRAV
                                                 1

Error: Symbol ‘ngrav’ at (1) has no IMPLICIT type
main_.f:1421:45:

   integer(4), parameter :: ntrc_sed = NST
                                         1

Hi Andres

I. Agrif seems to struggle with defining NST as the sum of others parameters at line

   parameter (NST=NSAND+NMUD+NGRAV)

As a workaround you can force it with an explicit declaration of the number of sediment, for instance

   parameter (NST=2)

if you have NSAND=2, NMUD=0 and NGRAV=0. I have no idea why there is such behavour

II. Then I found an other issue if BBL is not activated, Agrif_lev_sedim is not declared, in param.h again :

 #if defined BBL && defined AGRIF
   integer Agrif_lev_sedim 
   parameter (Agrif_lev_sedim=0) 
  #endif 

You can just suppress the reference to BBL :

 #if defined AGRIF
    integer Agrif_lev_sedim
    parameter (Agrif_lev_sedim=0)
 #endif

With these two changes, I’m able to compile BENGUELA with AGRIF and SEDIMENT activated. I haven’t try to run it though… Attached the modified param.h

regards

Rachid

param.h

Thanks, that works (compiles). I will test a run.