From f131c2eee82bfa18dd587545880aaa69c3ba91a3 Mon Sep 17 00:00:00 2001 From: "David Jean du Preez (local)" Date: Fri, 14 Oct 2022 13:19:17 +0200 Subject: [PATCH] fix vars without chem --- dynamic/palm_dynamic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dynamic/palm_dynamic.py b/dynamic/palm_dynamic.py index 81ae4a0..ec2fbab 100644 --- a/dynamic/palm_dynamic.py +++ b/dynamic/palm_dynamic.py @@ -132,7 +132,7 @@ if grid_from_static: th = np.ceil(terrain_rel / dz) # building height if 'buildings_3d' in ncs.variables.keys(): - print(np.argmax(a != 0, axis=0)) + #print(np.argmax(a != 0, axis=0)) bh3 = ncs.variables['buildings_3d'][:] # minimum index of nonzeo value along inverted z bh = np.argmax(bh3[::-1], axis=0) @@ -364,6 +364,8 @@ for wrf_file in wrf_files_proc: # add chemical species if included if len(wrfchem_spec)>0: wrfchem_variables = wrfchem_dynamic + wrfchem_spec + else: + wrfchem_variables = wrfchem_dynamic # add aerosol species if included N_avr = 6.022e23 # Avargardo constant -- GitLab