@@ -20,6 +20,7 @@ module subcol_SILHS
20
20
use clubb_intr, only: &
21
21
clubb_config_flags, &
22
22
clubb_params, &
23
+ stats_metadata, &
23
24
stats_zt, stats_zm, stats_sfc, &
24
25
pdf_params_chnk
25
26
@@ -473,7 +474,7 @@ subroutine subcol_init_SILHS(pbuf2d)
473
474
corr_file_path_below = trim ( subcol_SILHS_corr_file_path )// trim ( subcol_SILHS_corr_file_name )// below_file_ext
474
475
475
476
call setup_corr_varnce_array_api( corr_file_path_cloud, corr_file_path_below, &
476
- getnewunit (iunit), &
477
+ newunit (iunit), &
477
478
clubb_config_flags% l_fix_w_chi_eta_correlations )
478
479
479
480
!- ------------------------------
@@ -603,8 +604,6 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
603
604
604
605
setup_pdf_parameters_api, &
605
606
606
- l_stats_samp, &
607
-
608
607
hydromet_pdf_parameter, &
609
608
610
609
zm2zt_api, setup_grid_heights_api, &
@@ -664,7 +663,6 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
664
663
real (r8 ), parameter :: qsmall = 1.0e-18_r8 ! Microphysics cut-off for cloud
665
664
666
665
integer :: i, j, k, ngrdcol, ncol, lchnk, stncol
667
- integer :: begin_height, end_height ! Output from setup_grid call
668
666
real (r8 ) :: sfc_elevation(state% ngrdcol) ! Surface elevation
669
667
670
668
real (r8 ), dimension (state% ngrdcol,pverp- top_lev+1 ) :: zt_g, zi_g ! Thermo & Momentum grids for clubb
@@ -957,7 +955,7 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
957
955
call setup_grid_api( pverp+1 - top_lev, ncol, sfc_elevation(1 :ncol), l_implemented, & ! intent(in)
958
956
grid_type, zi_g(1 :ncol,2 ), zi_g(1 :ncol,1 ), zi_g(1 :ncol,pverp+1 - top_lev), & ! intent(in)
959
957
zi_g(1 :ncol,:), zt_g(1 :ncol,:), & ! intent(in)
960
- gr, begin_height, end_height )
958
+ gr )
961
959
962
960
! Calculate the distance between grid levels on the host model grid,
963
961
! using host model grid indices.
@@ -1135,7 +1133,7 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
1135
1133
Nc_in_cloud, cld_frac_in, khzm, & ! In
1136
1134
ice_supersat_frac_in, hydromet, wphydrometp, & ! In
1137
1135
corr_array_n_cloud, corr_array_n_below, & ! In
1138
- pdf_params_chnk(lchnk), l_stats_samp, & ! In
1136
+ pdf_params_chnk(lchnk), & ! In
1139
1137
clubb_params, & ! In
1140
1138
clubb_config_flags% iiPDF_type, & ! In
1141
1139
clubb_config_flags% l_use_precip_frac, & ! In
@@ -1144,6 +1142,7 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
1144
1142
clubb_config_flags% l_calc_w_corr, & ! In
1145
1143
clubb_config_flags% l_const_Nc_in_cloud, & ! In
1146
1144
clubb_config_flags% l_fix_w_chi_eta_correlations, & ! In
1145
+ stats_metadata, & ! In
1147
1146
stats_zt, stats_zm, stats_sfc, & ! In
1148
1147
hydrometp2, & ! Inout
1149
1148
mu_x_1, mu_x_2, & ! Out
@@ -1231,7 +1230,8 @@ subroutine subcol_gen_SILHS(state, tend, state_sc, tend_sc, pbuf)
1231
1230
clubb_config_flags% l_tke_aniso, & ! In
1232
1231
clubb_config_flags% l_standard_term_ta, & ! In
1233
1232
vert_decorr_coef, & ! In
1234
- stats_lh_zt, stats_lh_sfc, & ! intent(inout)
1233
+ stats_metadata, & ! In
1234
+ stats_lh_zt, stats_lh_sfc, & ! InOut
1235
1235
X_nl_all_levs, X_mixt_comp_all_levs, & ! Out
1236
1236
lh_sample_point_weights) ! Out
1237
1237
@@ -4125,12 +4125,12 @@ end subroutine subcol_SILHS_hydromet_conc_tend_lim
4125
4125
! small function to get an unused stream identifier to send to setup_corr_varnce_array_api
4126
4126
! or any other silhs/clubb functions that require a unit number argument
4127
4127
! This comes directly from the Fortran wiki
4128
- integer function getnewunit (unit )
4128
+ integer function newunit (unit )
4129
4129
integer , intent (out ), optional :: unit
4130
4130
4131
4131
integer , parameter :: LUN_MIN= 10 , LUN_MAX= 1000
4132
4132
logical :: opened
4133
- integer :: lun, newunit
4133
+ integer :: lun
4134
4134
4135
4135
newunit=- 1
4136
4136
do lun= LUN_MIN,LUN_MAX
@@ -4141,6 +4141,6 @@ integer function getnewunit(unit)
4141
4141
end if
4142
4142
end do
4143
4143
if (present (unit)) unit= newunit
4144
- end function getnewunit
4144
+ end function newunit
4145
4145
4146
4146
end module subcol_SILHS
0 commit comments