In the latest version of CROCO (v2.1.3), I encountered a compilation error when using the CPP key DIAGNOSTICS_TS_MLD_DENS (activated along with DIAGNOSTICS_TS_MLD).
The compiler failed because the variable kbl1 was not declared in several routines. Trying to include diagnostics.h or mixing.h did not solve the issue as it created dimension redundancy errors for other variables (like TXadv and TYadv).
To fix this and successfully compile the code, I had to manually declare the array:
integer kbl1(GLOBAL_2D_ARRAY)
inside the following files: init_arrays.F, step3d_t.F, and t3dmix_spg.F.
I cannot reproduce the error locally with the BENGUELA_LR case using tag v2.1.3.
Note that mixing.h is already included in init_arrays.F, step3d_t.F, and t3dmix_spg.F, so there should be no need to add it manually.
Could you share your param.h, cppdefs.h, and the compilation log showing the error? This should help us understand what is happening and identify the cause.
I am note sure I am allowed to share the configuration files here.
@slegac : Since the system functions properly with other configurations, there may be a conflict with the CPP keys. I have forwarded the files to you via email.
@swapnil : I resolved the issue by adding the declaration directly into the Fortran files.