I have been trying to run TEMPO regression tests after updating ccpp-physics to ensure all CCPP hooks for the existing TEMPO-based suite definition file (SDF) have been implemented correctly, see ccpp-physics Issue 330.
@AndersJensen-NOAA suggested a series of changes within Issue 330, which I have synthesized into a ccpp-physics branch in my repository.
The problem is, when the tracers get updated to add two extra for hail (lthailaware = .true.) -- cf. GFS_PBL_generic_common.F90 (scroll down to Line 47, where the imp_physics_tempo flag gets added), if both ltaerosol and lthailaware are true, then the number of tracers increases to 14.
Unfortunately, the current logic on Line 1206 of ccpp/data/CCPP_typedefs.F90 is unable to handle the case of TEMPO with lthailaware (in fact, Model%lthailaware does not exist in this file).
Thus, if I make the modifications to CCPP as described above and then run the TEMPO regression tests with the ufsatm code as-is, I will get runs that do not crash for:
1.) control_p8_ugwpv1_tempo_intel
2.) control_p8_ugwpv1_tempo_aerosol_intel
BUT, I will get a crash for:
3.) control_p8_ugwpv1_tempo_aerosol_hail_intel
Because in that case, the value of Interstitial%nvdiff should be equal to 14, but it is not set correctly on Line 1206 of ccpp/data/CCPP_typedefs.F90.
My proposed fix is to separate TEMPO out into its own elseif block such that Line 1206 is only for Thompson, and then (at Line 1215), the TEMPO elseif block can set up the value of Interstitial%nvdiff correctly.
Specifically, my proposed fix in ccpp/data/CCPP_typedefs.F90 would be:
elseif ( Model%imp_physics == Model%imp_physics_tempo) then
Interstitial%nvdiff = 9
if (Model%ltaerosol) then
Interstitial%nvdiff = Interstitial%nvdiff + 3
endif
if (Model%lthailaware) then
Interstitial%nvdiff = Interstitial%nvdiff + 2
endif
if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1
This would have to be done in tandem with Issue 330 in ccpp-physics, and a new baseline for the TEMPO tests (at least, the control_p8_ugwpv1_tempo_aerosol_hail_intel test) would be made.
I would appreciate feedback from @AndersJensen-NOAA and @dustinswales. My fear is that there are other TEMPO-specific issues like this lurking around in ufsatm.
I have been trying to run TEMPO regression tests after updating ccpp-physics to ensure all CCPP hooks for the existing TEMPO-based suite definition file (SDF) have been implemented correctly, see ccpp-physics Issue 330.
@AndersJensen-NOAA suggested a series of changes within Issue 330, which I have synthesized into a ccpp-physics branch in my repository.
The problem is, when the tracers get updated to add two extra for hail (lthailaware = .true.) -- cf. GFS_PBL_generic_common.F90 (scroll down to Line 47, where the imp_physics_tempo flag gets added), if both
ltaerosolandlthailawareare true, then the number of tracers increases to 14.Unfortunately, the current logic on Line 1206 of ccpp/data/CCPP_typedefs.F90 is unable to handle the case of TEMPO with
lthailaware(in fact,Model%lthailawaredoes not exist in this file).Thus, if I make the modifications to CCPP as described above and then run the TEMPO regression tests with the ufsatm code as-is, I will get runs that do not crash for:
1.) control_p8_ugwpv1_tempo_intel
2.) control_p8_ugwpv1_tempo_aerosol_intel
BUT, I will get a crash for:
3.) control_p8_ugwpv1_tempo_aerosol_hail_intel
Because in that case, the value of
Interstitial%nvdiffshould be equal to 14, but it is not set correctly on Line 1206 of ccpp/data/CCPP_typedefs.F90.My proposed fix is to separate TEMPO out into its own
elseifblock such that Line 1206 is only for Thompson, and then (at Line 1215), the TEMPOelseifblock can set up the value ofInterstitial%nvdiffcorrectly.Specifically, my proposed fix in ccpp/data/CCPP_typedefs.F90 would be:
elseif ( Model%imp_physics == Model%imp_physics_tempo) thenInterstitial%nvdiff = 9if (Model%ltaerosol) thenInterstitial%nvdiff = Interstitial%nvdiff + 3endifif (Model%lthailaware) thenInterstitial%nvdiff = Interstitial%nvdiff + 2endifif (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1This would have to be done in tandem with Issue 330 in ccpp-physics, and a new baseline for the TEMPO tests (at least, the
control_p8_ugwpv1_tempo_aerosol_hail_inteltest) would be made.I would appreciate feedback from @AndersJensen-NOAA and @dustinswales. My fear is that there are other TEMPO-specific issues like this lurking around in ufsatm.