From b3cf22107e3f802bbb356fb86ffdee4134d74104 Mon Sep 17 00:00:00 2001 From: lkugler <lukas.kugler@gmail.com> Date: Tue, 12 Sep 2023 13:56:06 +0200 Subject: [PATCH] avoid to write lists like [""] --- dartwrf/dart_nml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dartwrf/dart_nml.py b/dartwrf/dart_nml.py index dded83a..f541930 100644 --- a/dartwrf/dart_nml.py +++ b/dartwrf/dart_nml.py @@ -289,10 +289,10 @@ def write_namelist(just_prior_values=False): nml['&obs_kind_nml']['assimilate_these_obs_types'] = [list_obstypes_all] nml['&obs_kind_nml']['evaluate_these_obs_types'] = [[]] - # write localization variables nml['&assim_tools_nml']['special_localization_obs_types'] = [list_obstypes_all] nml['&assim_tools_nml']['special_localization_cutoffs'] = [list_loc_horiz_rad] + if len(vert_norm_obs_types) > 0: # avoid to write lists like [""] nml['&location_nml']['special_vert_normalization_obs_types'] = [vert_norm_obs_types] nml['&location_nml']['special_vert_normalization_heights'] = [vert_norm_heights] nml['&location_nml']['special_vert_normalization_scale_heights'] = [vert_norm_scale_heights] -- GitLab