Skip to content

run_neon --overwrite is ignored #2884

@samsrabin

Description

@samsrabin

Brief summary of bug

run_neon --overwrite option is ignored. I also think the error message needs to be reworked.

General bug information

CTSM version you are using: ctsm5.3.012

Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: All

Details of bug

The following patch fixes it:

diff --git a/python/ctsm/site_and_regional/neon_site.py b/python/ctsm/site_and_regional/neon_site.py
index 70414d9e5..ced4c4c64 100755
--- a/python/ctsm/site_and_regional/neon_site.py
+++ b/python/ctsm/site_and_regional/neon_site.py
@@ -47,7 +47,8 @@ class NeonSite(TowerSite):
             user_mods_dirs = [
                 os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "NEON", self.name)
             ]
-        case_path = super().build_base_case(cesmroot, output_root, res, compset, user_mods_dirs)
+        case_path = super().build_base_case(cesmroot, output_root, res, compset, user_mods_dirs,
+                                            overwrite=overwrite)

         return case_path

Important details of your setup / configuration so we can reproduce the bug

Tested on Derecho.

# Interrupt this after "base case created"
python tools/site_and_regional/run_neon --neon-sites ABBY --setup-only

# Then try again with --overwrite:
python tools/site_and_regional/run_neon --neon-sites ABBY --setup-only --overwrite

Important output or errors that show the problem

---- building a base case -------
ERROR: Existing base case is a historical type and should not be
                        --rerun with the --overwrite option

Bit about --rerun seems irrelevant, since I don't see that checked anywhere in the call stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething is working incorrectly

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions