Skip to content

Morrison C++ path does not wire cumulus tendency inputs into QRCU1D/QSCU1D/QICU1D #3052

@asalmgren

Description

@asalmgren

Location

  • Source/Microphysics/Morrison/ERF_AdvanceMorrison.cpp:1080-1082
  • Fortran reference: Source/Microphysics/Morrison/ERF_module_mp_morr_two_moment.F90:818-820

Problem

In the C++ port, the 1D cumulus tendency fields are assigned from internal morr_arr(..., qrcuten_arr/qscuten_arr/qicuten_arr) slots:

morr_arr(..., MORRInd::qrcu1d) = morr_arr(..., MORRInd::qrcuten_arr);
morr_arr(..., MORRInd::qscu1d) = morr_arr(..., MORRInd::qscuten_arr);
morr_arr(..., MORRInd::qicu1d) = morr_arr(..., MORRInd::qicuten_arr);

Those morr_arr tendency slots are not populated from the actual input arrays before use, so they remain zero-initialized in this path.

Why this is a bug

The Fortran implementation explicitly copies qrcuten/qscuten/qicuten input arrays into qrcu1d/qscu1d/qicu1d before the microphysics call. With the current C++ wiring, cumulus detrainment sources are effectively disabled in the C++ path, causing physics divergence from Fortran whenever those tendencies are nonzero.

Suggested patch

Copy directly from the incoming cumulus tendency arrays (as Fortran does), rather than from uninitialized/zeroed morr_arr slots.

--- a/Source/Microphysics/Morrison/ERF_AdvanceMorrison.cpp
+++ b/Source/Microphysics/Morrison/ERF_AdvanceMorrison.cpp
@@
-            morr_arr(i,j,k,MORRInd::qrcu1d) = morr_arr(i,j,k,MORRInd::qrcuten_arr);
-            morr_arr(i,j,k,MORRInd::qscu1d) = morr_arr(i,j,k,MORRInd::qscuten_arr);
-            morr_arr(i,j,k,MORRInd::qicu1d) = morr_arr(i,j,k,MORRInd::qicuten_arr);
+            morr_arr(i,j,k,MORRInd::qrcu1d) = qrcuten_arr(i,j,k);
+            morr_arr(i,j,k,MORRInd::qscu1d) = qscuten_arr(i,j,k);
+            morr_arr(i,j,k,MORRInd::qicu1d) = qicuten_arr(i,j,k);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions