Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to stochastic_physics.F90: variable size of in/out surface perturbation namelist arrays #48

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions stochastic_physics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in
real(kind=kind_dbl_prec), intent(in) :: ak(:), bk(:)
logical, intent(out) :: use_zmtnblck_out
integer, intent(out) :: skeb_npass_out
character(len=3), dimension(max_n_var_lndp), intent(out) :: lndp_var_list_out
real(kind=kind_dbl_prec), dimension(max_n_var_lndp), intent(out) :: lndp_prt_list_out
character(len=3), dimension(:), intent(out) :: lndp_var_list_out
real(kind=kind_dbl_prec), dimension(:), intent(out) :: lndp_prt_list_out


! Local variables
Expand Down Expand Up @@ -107,11 +107,9 @@ subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in
else if (lndp_type_in /= lndp_type) then
write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', &
& ' namelist settings lndp_type in physics and nam_sfcperts'
print*,'lndp_type',lndp_type_in,lndp_type
iret = 20
return
else if (n_var_lndp_in /= n_var_lndp) then
print*,'n_var_lndp',n_var_lndp_in , n_var_lndp
write(0,'(*(a))') 'Logic error in stochastic_physics_init: incompatible', &
& ' namelist settings n_var_lndp in physics nml, and lndp_* in nam_sfcperts'
iret = 20
Expand All @@ -120,8 +118,10 @@ subroutine init_stochastic_physics(levs, blksz, dtp, sppt_amp, input_nml_file_in
! update remaining model configuration parameters from namelist
use_zmtnblck_out=use_zmtnblck
skeb_npass_out=skeb_npass
lndp_var_list_out=lndp_var_list
lndp_prt_list_out=lndp_prt_list
if (n_var_lndp>0) then
lndp_var_list_out=lndp_var_list(1:n_var_lndp)
lndp_prt_list_out=lndp_prt_list(1:n_var_lndp)
endif
if ( (.NOT. do_sppt) .AND. (.NOT. do_shum) .AND. (.NOT. do_skeb) .AND. (lndp_type==0) ) return
allocate(sl(levs))
do k=1,levs
Expand Down