From eaace73f7095aa52c86133e47a23ab60cfaf6f8e Mon Sep 17 00:00:00 2001 From: Antony Lewis Date: Mon, 25 Mar 2024 09:06:30 +0000 Subject: [PATCH] fix for bispectrum output --- fortran/SeparableBispectrum.f90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fortran/SeparableBispectrum.f90 b/fortran/SeparableBispectrum.f90 index 41f1221b..6b4c77d4 100644 --- a/fortran/SeparableBispectrum.f90 +++ b/fortran/SeparableBispectrum.f90 @@ -742,7 +742,7 @@ subroutine GetBispectrum(State,CTrans) if (BispectrumParams%Slice_Base_L>0 .or. BispectrumParams%FullOutputFile/='') then !write out slice in (muK)^3 units - allocate(bispectrum_files(nbispectra* BispectrumParams%ndelta)) + allocate(bispectrum_files(nbispectra* max(1, BispectrumParams%ndelta))) Bscale=(COBE_CMBTemp*1d6)**3/InternalScale**2; do bispectrum_type=1,nbispectra if (BispectrumParams%Slice_Base_L>0) then @@ -757,8 +757,9 @@ subroutine GetBispectrum(State,CTrans) end do end if if (BispectrumParams%FullOutputFile/='') then - call bispectrum_files(bispectrum_type)%CreateFile(concat(output_root,BispectrumParams%FullOutputFile, & - '_', BispectrumNames(bispectrum_type), file_tag, '.dat')) + call bispectrum_files(bispectrum_type)%CreateFile(concat(trim(output_root), & + BispectrumParams%FullOutputFile, '_', BispectrumNames(bispectrum_type), & + file_tag, '.dat')) end if end do do il1= 1, SampleL%nl