From 734ec9c1b6d71cc05edf060a5a91d7c9e83e38eb Mon Sep 17 00:00:00 2001 From: Min Xu Date: Wed, 23 Oct 2024 06:50:54 -0700 Subject: [PATCH 1/2] skip three files when staging refcase files to avoid the rmtree error --- CIME/case/check_input_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CIME/case/check_input_data.py b/CIME/case/check_input_data.py index 5bff3823d7c..1ac3817496b 100644 --- a/CIME/case/check_input_data.py +++ b/CIME/case/check_input_data.py @@ -350,7 +350,8 @@ def stage_refcase(self, input_data_root=None, data_list_dir=None): for rcfile in glob.iglob(os.path.join(refdir, "*")): rcbaseline = os.path.basename(rcfile) - if not os.path.exists("{}/{}".format(rundir, rcbaseline)): + skipfiles = 'timing' in rcbaseline or 'spio_stats' in rcbaseline or 'memory.' in rcbaseline + if not os.path.exists("{}/{}".format(rundir, rcbaseline)) and not skipfiles: logger.info("Staging file {}".format(rcfile)) os.symlink(rcfile, "{}/{}".format(rundir, rcbaseline)) # Backward compatibility, some old refcases have cam2 in the name From dd150a6f72e816bc2a512b334e0e76f2c0a52817 Mon Sep 17 00:00:00 2001 From: Min Xu Date: Tue, 29 Oct 2024 07:23:36 -0700 Subject: [PATCH 2/2] format the modification to satify the black requirement --- CIME/case/check_input_data.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CIME/case/check_input_data.py b/CIME/case/check_input_data.py index 1ac3817496b..a89da617898 100644 --- a/CIME/case/check_input_data.py +++ b/CIME/case/check_input_data.py @@ -350,7 +350,11 @@ def stage_refcase(self, input_data_root=None, data_list_dir=None): for rcfile in glob.iglob(os.path.join(refdir, "*")): rcbaseline = os.path.basename(rcfile) - skipfiles = 'timing' in rcbaseline or 'spio_stats' in rcbaseline or 'memory.' in rcbaseline + skipfiles = ( + "timing" in rcbaseline + or "spio_stats" in rcbaseline + or "memory." in rcbaseline + ) if not os.path.exists("{}/{}".format(rundir, rcbaseline)) and not skipfiles: logger.info("Staging file {}".format(rcfile)) os.symlink(rcfile, "{}/{}".format(rundir, rcbaseline))