As of 2022/03/27, all debug runs fail on macOS with gcc+gfortran with
An error occurred in ccpp_physics_init: Detected size mismatch for variable physics%Model%input_nml_file in group physics before cires_ugwp_init, expected 0 but got 1. Exiting...
This is because Fortran thinks that the uninitialized array
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
has length one and not length zero.
I am not sure if this is the case with other compilers/on other systems, therefore the best way to fix this is to add an active attribute in GFS_typedefs.meta (last line below):
[input_nml_file_length]
standard_name = number_of_lines_in_internal_namelist
long_name = lines in namelist file for internal file reads
units = count
dimensions = ()
type = integer
[input_nml_file]
standard_name = filename_of_internal_namelist
long_name = namelist filename for internal file reads
units = none
dimensions = (number_of_lines_in_internal_namelist)
type = character
kind = len=256
active = (number_of_lines_in_internal_namelist > 0)
This tells the debug checks in the autogenerated caps to bypass filename_of_internal_namelist if number_of_lines_in_internal_namelist == 0.
As of 2022/03/27, all debug runs fail on macOS with gcc+gfortran with
This is because Fortran thinks that the uninitialized array
has length one and not length zero.
I am not sure if this is the case with other compilers/on other systems, therefore the best way to fix this is to add an
active
attribute inGFS_typedefs.meta
(last line below):This tells the debug checks in the autogenerated caps to bypass
filename_of_internal_namelist
ifnumber_of_lines_in_internal_namelist == 0
.