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

Vanderborght, E.Y.P. (Elian) e.y.p.vanderborght at uu.nl
Mon Feb 17 06:05:55 EST 2025


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250217/d576ebc5/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CPP_OPTIONS.h
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20250217/d576ebc5/attachment.h>


More information about the MITgcm-support mailing list