diff --git a/src/physics/cam/clubb_intr.F90 b/src/physics/cam/clubb_intr.F90 index 223ff0e5b5..57b220d2a5 100644 --- a/src/physics/cam/clubb_intr.F90 +++ b/src/physics/cam/clubb_intr.F90 @@ -1844,13 +1844,15 @@ subroutine clubb_ini_cam(pbuf2d) call addfld ( 'edmf_qtflx' , (/ 'ilev' /), 'A', 'W/m2' , 'qt flux (EDMF)' ) end if -#ifndef SILHS - ! hm_metadata is set up by calling init_pdf_hydromet_arrays_api in subcol_init_SILHS. - ! So if we are not using silhs, we allocate the parts of hm_metadata that need allocating - ! in order to making intel debug tests happy. - allocate( hm_metadata%hydromet_list(1) ) - allocate( hm_metadata%l_mix_rat_hm(1) ) -#endif + if ( trim(subcol_scheme) .ne. 'SILHS' ) then + ! hm_metadata is set up by calling init_pdf_hydromet_arrays_api in subcol_init_SILHS. + ! So if we are not using silhs, we allocate the parts of hm_metadata that need allocating + ! in order to making intel debug tests happy. + allocate( hm_metadata%hydromet_list(1), ierr) + if( ierr /= 0 ) call endrun( 'clubb_ini_cam: Unable to allocate hm_metadata%hydromet_list' ) + allocate( hm_metadata%l_mix_rat_hm(1), ierr) + if( ierr /= 0 ) call endrun( 'clubb_ini_cam: Unable to allocate hm_metadata%l_mix_rat_hm' ) + end if ! Initialize statistics, below are dummy variables dum1 = 300._r8