Closed mgduda closed 2 months ago
This bugfix PR depends on PR #1207 to add the necessary broadcast routine for R4KIND
real arrays.
This is quite interesting. I had actually done this in the past (adding a mpas_dmpar_bcast_real4s) for exactly that reason but never made a PR since we now mostly use single precision. Totally forgot to test compiling MPAS using double precision. I, of course, approve this PR. Thanks.
This PR corrects double-precision build failures of
mpas_atmphys_init_microphysics.F
in MPAS-A v8.2.0.The
mpas_atmphys_init_microphysics
module contains a routine,table_ccnAct
, that broadcasts anR4KIND
real array,tnccn_act
, from the Thompson microphysics scheme. This broadcast was previously performed by a call tompas_dmpar_bcast_reals
through the macroDM_BCAST_MACRO
. However, because thempas_dmpar_bcast_reals
routine broadcasts arrays of kindRKIND
, when MPAS-A is compiled with double-precision reals, thempas_dmpar_bcast_reals
routine can no longer be used with thetnccn_act
array.With this PR, the
DM_BCAST_MACRO
inmpas_atmphys_init_microphysics.F
has been defined tompas_dmpar_bcast_real4s
, which broadcasts arrays ofR4KIND
reals. This works for both single- and double-precision builds of MPAS-A, since the kind type of thetnccn_act
array is independent of the MPAS-A build precision.