From 40c1307fc3aedd8d59f7d0555e9b4adccf38264d Mon Sep 17 00:00:00 2001 From: Ping-Gin Chiu Date: Fri, 27 Sep 2024 11:00:42 +0200 Subject: [PATCH] Use if-else for ntasks_ocn --- cime_config/buildcpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cime_config/buildcpp b/cime_config/buildcpp index 7a46859e..02bb27ce 100644 --- a/cime_config/buildcpp +++ b/cime_config/buildcpp @@ -36,7 +36,10 @@ def create_dimmod(case): comp_root_dir_ocn = case.get_value("COMP_ROOT_DIR_OCN") ocn_grid = case.get_value("OCN_GRID") blom_vcoord = case.get_value("BLOM_VCOORD") - ntasks_ocn = case.get_value("NTASKS_PER_INST_OCN") + if case.get_value("NINST_OCN") > 1: + ntasks_ocn = case.get_value("NTASKS_OCN") + else: + ntasks_ocn = case.get_value("NTASKS_PER_INST_OCN") objroot = case.get_value("OBJROOT") gridconf_dir = os.path.join(comp_root_dir_ocn, "bld", ocn_grid)