Skip to content

Advanced Topics

BinLi-NOAA edited this page Nov 22, 2019 · 7 revisions
  1. Turning on debug in compilation
  2. Turning off ESMF PET logs
  3. Using ESMF in debug mode

Turning on debug in compilation

Use the following settings to turn on debug/traceback options:

For NEMS and FV3:
In conf/configure.fv3.{machine} in the FLAGS section set: 
DEBUG = Y

For CICE:
In CICE/bld/Macros.Linux.NEMS.$MACHINE_ID update the FFLAGS:
FFLAGS     := -g -O0 -fp-model precise -convert big_endian -assume byterecl -ftz -traceback   -xHost -I$(NETCDF)/include

For MOM6:
In MOM6/src/mkmf/templates/{$MACHINE_ID}-intel.mk in the FLAGS section set: 
DEBUG = Y

Turning off ESMF PET logs

In parm/model_configure.IN, ESMF PET logs are turned on automatically. To turn off ESMF PET logs, change

print_esmf: .true.

to

print_esmf: .false.

Using ESMF in debug mode

To do this you need to change the loaded ESMF module. The module file location can be found by looking in the conf/before_components.mk file at the CHOSEN_MODULE variable. For computing system Hera, the location is modulefiles/hera.intel/fv3_coupled. To use ESMF in debug mode, change

module load esmf/8.0.0

to

module load esmf/8.0.0g