+ diff --exclude=.git --exclude=version_clubb_core.txt --exclude=version_silhs.txt -r clubb clubb_release
diff '--exclude=.git' '--exclude=version_clubb_core.txt' '--exclude=version_silhs.txt' -r clubb/src/SILHS/latin_hypercube_driver_module.F90 clubb_release/src/SILHS/latin_hypercube_driver_module.F90
561c561
< r_status = curandGenerate(cu_gen, rand_pool(:,:,2:nz,:), ngrdcol*num_samples*(nz-1)*(pdf_dim+d_uniform_extra))
---
> r_status = curandGenerate(cu_gen, rand_pool, ngrdcol*num_samples*nz*(pdf_dim+d_uniform_extra))
576c576
< do k = 2, nz
---
> do k = 1, nz
591d590
< rand_pool(:,:,1,:) = 0.5_core_rknd ! ghost level value (not used)
919,920c918
< cloud_frac_min, & ! Constants
< zero
---
> cloud_frac_min ! Constant
970,976c968
< if ( any( rcm_pdf(i,:) > zero ) ) then
< k_lh_start_rcm_in_cloud = maxloc( rcm_pdf(i,:) / max( cloud_frac_pdf, cloud_frac_min ), 1 )
< else
< ! When clouds aren't found at any level, set k_lh_start_rcm_in_cloud
< ! to the middle of the vertical domain.
< k_lh_start_rcm_in_cloud = ( nz - 1 ) / 2 + 1
< endif
---
> k_lh_start_rcm_in_cloud = maxloc( rcm_pdf(i,:) / max( cloud_frac_pdf, cloud_frac_min ), 1 )
980,986c972
< if ( any( rcm_pdf(i,:) > zero ) ) then
< k_lh_start_rcm = maxloc( rcm_pdf(i,:), 1 )
< else
< ! When clouds aren't found at any level, set k_lh_start_rcm to the
< ! middle of the vertical domain.
< k_lh_start_rcm = ( nz - 1 ) / 2 + 1
< endif
---
> k_lh_start_rcm = maxloc( rcm_pdf(i,:), 1 )
1006a993,999
> ! If there's no cloud k_lh_start appears to end up being 1. Check if
> ! k_lh_start is 1 or nz and set it to the middle of the domain in that
> ! case.
> if ( k_lh_start(i) == nz .or. k_lh_start(i) == 1 ) then
> k_lh_start(i) = nz / 2
> end if
>