From 5c916bc68bc461c19aee365dc9b9b5c75332e850 Mon Sep 17 00:00:00 2001 From: Golnesa Date: Mon, 22 Apr 2024 14:09:19 +0200 Subject: [PATCH] set_friction_vegetation_values fix --- threedigrid_builder/grid/cross_section_definitions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/threedigrid_builder/grid/cross_section_definitions.py b/threedigrid_builder/grid/cross_section_definitions.py index ed2eb345..796f8a50 100644 --- a/threedigrid_builder/grid/cross_section_definitions.py +++ b/threedigrid_builder/grid/cross_section_definitions.py @@ -376,11 +376,11 @@ def set_friction_vegetation_values( ): """Convert friction and vegetation properties from list into arrays, if available, and add to yz""" - if friction_values is not None: + if friction_values: fric = np.array([float(x) for x in friction_values.split(" ")]) yz[:-1, 2] = fric - if vegetation_drag_coefficients is not None: + if vegetation_drag_coefficients: veg_stemden = np.array([float(x) for x in vegetation_stem_densities.split(" ")]) veg_stemdia = np.array([float(x) for x in vegetation_stem_diameters.split(" ")]) veg_hght = np.array([float(x) for x in vegetation_heights.split(" ")])