diff --git a/src/physics/cam/clubb_intr.F90 b/src/physics/cam/clubb_intr.F90 index 8159d1d63d..223ff0e5b5 100644 --- a/src/physics/cam/clubb_intr.F90 +++ b/src/physics/cam/clubb_intr.F90 @@ -53,18 +53,12 @@ module clubb_intr type (stats_metadata_type) :: & stats_metadata -!$omp threadprivate(stats_metadata) - type (hm_metadata_type) :: & hm_metadata -!$omp threadprivate(hm_metadata) - type (sclr_idx_type) :: & sclr_idx -!$omp threadprivate(sclr_idx) - #endif private @@ -100,7 +94,7 @@ module clubb_intr real(r8), dimension(nparams), public :: clubb_params_single_col ! Adjustable CLUBB parameters (C1, C2 ...) #endif - ! These are zero by default, but will be set by SILHS before + ! These are zero by default, but will be set by SILHS before they are used by subcolumns integer :: & hydromet_dim = 0, & pdf_dim = 0 diff --git a/src/physics/cam/subcol_SILHS.F90 b/src/physics/cam/subcol_SILHS.F90 index af039a254a..c373ed6b3e 100644 --- a/src/physics/cam/subcol_SILHS.F90 +++ b/src/physics/cam/subcol_SILHS.F90 @@ -373,7 +373,7 @@ subroutine subcol_init_SILHS(pbuf2d) iiNi, & ! Hydrometeor array index for ice concentration, Ni iiNg ! Hydrometeor array index for graupel concentration, Ng - integer :: l ! Loop variable + integer :: l, ierr=0 ! Loop variable, error check ! Set CLUBB's debug level ! This is called in module clubb_intr; no need to do it here. @@ -474,8 +474,8 @@ subroutine subcol_init_SILHS(pbuf2d) !------------------------------- ! Set up hydrometeors and correlation arrays for SILHS !------------------------------- - allocate(corr_array_n_cloud(pdf_dim,pdf_dim)) - allocate(corr_array_n_below(pdf_dim,pdf_dim)) + allocate( corr_array_n_cloud(pdf_dim,pdf_dim), corr_array_n_below(pdf_dim,pdf_dim), stat=ierr) + if( ierr /= 0 ) call endrun(' subcol_init_SILHS: failed to allocate corr_array fields ') corr_file_path_cloud = trim( subcol_SILHS_corr_file_path )//trim( subcol_SILHS_corr_file_name )//cloud_file_ext corr_file_path_below = trim( subcol_SILHS_corr_file_path )//trim( subcol_SILHS_corr_file_name )//below_file_ext