diff --git a/openmc/filter.py b/openmc/filter.py index 676bc66e17..526ee52e5a 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -777,9 +777,12 @@ class MeshFilter(Filter): # Find mesh dimensions - use 3D indices for simplicity if len(self.mesh.dimension) == 3: nx, ny, nz = self.mesh.dimension - else: + elif len(self.mesh.dimension) == 2: nx, ny = self.mesh.dimension nz = 1 + else: + nx = self.mesh.dimension + ny = nz = 1 # Generate multi-index sub-column for x-axis filter_bins = np.arange(1, nx + 1) diff --git a/src/nuclide_header.F90 b/src/nuclide_header.F90 index ed4a9a0a6c..ea6eab328f 100644 --- a/src/nuclide_header.F90 +++ b/src/nuclide_header.F90 @@ -224,11 +224,12 @@ module nuclide_header call sort(temps_available) ! If only one temperature is available, revert to nearest temperature - if (size(temps_available) == 1 .and. & - method == TEMPERATURE_INTERPOLATION .and. master) then - call warning("Cross sections for " // trim(this % name) // " are only & - &available at one temperature. Reverting to nearest temperature & - &method.") + if (size(temps_available) == 1 .and. method == TEMPERATURE_INTERPOLATION) then + if (master) then + call warning("Cross sections for " // trim(this % name) // " are only & + &available at one temperature. Reverting to nearest temperature & + &method.") + end if method = TEMPERATURE_NEAREST end if diff --git a/src/physics.F90 b/src/physics.F90 index a946c161b2..d1e9921ef6 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -481,7 +481,11 @@ contains ! Sample scattering angle select type (dist => rxn % products(1) % distribution(1) % obj) type is (UncorrelatedAngleEnergy) - mu_cm = dist % angle % sample(E) + if (allocated(dist % angle % energy)) then + mu_cm = dist % angle % sample(E) + else + mu_cm = TWO*prn() - ONE + end if end select ! Determine direction cosines in CM