[MITgcm-support] Specifying a space dependent vertical diffusivity coefficient for temperature

Dimitris Menemenlis dmenemenlis at gmail.com
Mon Feb 17 11:15:53 EST 2025


It looks like the mitgcmuv executable that you are using has not been compiled with “#define ALLOW_3D_DIFKR”.  Does your STDOUT or output.txt file say that ALLOW_3D_DIFKR is defined?

Try deleting everything in your build directory then recompiling from scratch, genmake2, make depend, and make.  After that, make sure that the CPP_OPTIONS.h file in your build directory contains the “#define ALLOW_3D_DIFKR”.

You should not get the error messages below if you compiled with “#define ALLOW_3D_DIFKR” and are using the correct executable.

The diffKrFile will be used for temperature and salinity. And by default, unless you request otherwise, also for ptracers.

> On Feb 17, 2025, at 3:06 AM, Vanderborght, E.Y.P. (Elian) <e.y.p.vanderborght at uu.nl> wrote:
> 
> 
> Dear MITgcm Community,
> I am encountering an issue related to specifying a space-dependent (longitude-latitude-depth) vertical diffusivity coefficient for temperature in MITgcm. Based on my understanding, this should be possible by enabling the ALLOW_3D_DIFFKR flag in the CPP_OPTIONS.h file. After changing #undef ALLOW_3D_DIFFKR to #define ALLOW_3D_DIFFKR and copying the modified file to my code directory, I recompiled the code using the following command:
> $base_dir/tools/genmake2 -mods $base_dir/$code_dir -mpi -of=$OPTFILE_PATH
> This successfully generates the Makefile and the executable mitgcmuv. In my data script, I specify the variable diffusion coefficient with PARAMS05 as follows:
> diffKrFile='diffKrFile.bin'
> However, when I run the model, I encounter the following error message:
> (PID.TID 0000.0001) *** ERROR *** CONFIG_CHECK: diffKrFile is set but never used.
> (PID.TID 0000.0001) *** ERROR *** CONFIG_CHECK: Re-compile with: "#define ALLOW_3D_DIFFKR"
> (PID.TID 0000.0001) *** ERROR *** CONFIG_CHECK: detected  1 fatal error(s)
> (PID.TID 0000.0001) *** ERROR *** S/R ALL_PROC_DIE: ending the run
> This suggests that the diffKrFile is not being loaded and the #define ALLOW_3D_DIFFKR flag is not being recognized. Despite verifying that the flag is correctly enabled (see attached), I still receive this error. Could I be overlooking something? Is there any additional configuration or package that I need to include for this feature to work?
> For context, my PACKAGES section is as follows:
> &PACKAGES
>   useDiagnostics = .TRUE.,
>   useGMRedi      = .TRUE.,
>   useRBCS        = .TRUE.,
> &
> Finally, once the diffKrFile is loaded, will it only affect temperature as an active tracer, or could it also apply to other tracers if they are included in the model?
> I look forward to any insights you may have.
> Best regards,
> Elian
> <CPP_OPTIONS.h>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250217/43d879b0/attachment.html>


More information about the MITgcm-support mailing list