From 9b5ef2221876e9e5e4a7781d0da1be6672588d5c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 10 Apr 2024 18:31:51 -0600 Subject: [PATCH] Remove the .sh exention from gen_mksurfdata_build.sh as one of the parts of #2446 --- cime_config/SystemTests/mksurfdataesmf.py | 2 +- .../test/test_unit_gen_mksurfdata_jobscript_single.py | 2 +- tools/README | 6 +++--- tools/mksurfdata_esmf/README.md | 2 +- tools/mksurfdata_esmf/gen_mksurfdata_build.sh | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cime_config/SystemTests/mksurfdataesmf.py b/cime_config/SystemTests/mksurfdataesmf.py index f5de3c4592..03295201ac 100644 --- a/cime_config/SystemTests/mksurfdataesmf.py +++ b/cime_config/SystemTests/mksurfdataesmf.py @@ -60,7 +60,7 @@ def build_phase(self, sharedlib_only=False, model_only=False): # if the test stops and gets restarted. if sharedlib_only: # Paths and strings - build_script_path = os.path.join(self._tool_path, "gen_mksurfdata_build.sh") + build_script_path = os.path.join(self._tool_path, "gen_mksurfdata_build") nml_script_path = os.path.join(self._tool_path, "gen_mksurfdata_namelist") gen_jobscript_path = os.path.join(self._tool_path, "gen_mksurfdata_jobscript_single.sh") gen_mksurfdata_namelist = f"{nml_script_path} --res {self._res} --start-year {self._model_yr} --end-year {self._model_yr}" diff --git a/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py b/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py index f09d91ccce..5038c6b3e1 100755 --- a/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py +++ b/python/ctsm/test/test_unit_gen_mksurfdata_jobscript_single.py @@ -151,7 +151,7 @@ def test_derecho_mpirun(self): self.assertEqual(self._account, args.account) # Create the env_mach_specific.xml file needed for get_mpirun # This will catch problems with our usage of CIME objects - # Doing this here will also catch potential issues in the gen_mksurfdata_build.sh script + # Doing this here will also catch potential issues in the gen_mksurfdata_build script configure_path = os.path.join(path_to_cime(), "CIME", "scripts", "configure") self.assertTrue(os.path.exists(configure_path)) options = " --macros-format CMake --silent --compiler intel --machine " + machine diff --git a/tools/README b/tools/README index 70a2807214..568dc1239b 100644 --- a/tools/README +++ b/tools/README @@ -78,7 +78,7 @@ II. Notes on building/running for each of the above tools: mksurfdata_esmf has a cime configure and CMake based build using the following files: - gen_mksurfdata_build.sh - Build mksurfdata_esmf + gen_mksurfdata_build ---- Build mksurfdata_esmf src/CMakeLists.txt ------ Tells CMake how to build the source code Makefile ---------------- GNU makefile to link the program together cmake ------------------- CMake macros for finding libraries @@ -200,7 +200,7 @@ III. Process sequence to create input datasets needed to run CTSM 5.) Create surface datasets with mksurfdata_esmf on Derecho (See mksurfdata_esmf/README.md for more help on doing this) - - gen_mksurfdata_build.sh to build + - gen_mksurfdata_build to build - gen_mksurfdata_namelist to build the namelist - gen_mksurfdata_jobscript_single to build a batch script to run on Derecho - Submit the batch script just created above @@ -213,7 +213,7 @@ III. Process sequence to create input datasets needed to run CTSM Example: for 0.9x1.25 resolution fro 1850 cd mksurfdata_esmf - ./gen_mksurfdata_build.sh + ./gen_mksurfdata_build ./gen_mksurfdata_namelist --res 0.9x1.25 --start-year 1850 --end-year 1850 ./gen_mksurfdata_jobscript_single --number-of-nodes 24 --tasks-per-node 12 --namelist-file target.namelist qsub mksurfdata_jobscript_single.sh diff --git a/tools/mksurfdata_esmf/README.md b/tools/mksurfdata_esmf/README.md index a748c3d721..11cb69c681 100644 --- a/tools/mksurfdata_esmf/README.md +++ b/tools/mksurfdata_esmf/README.md @@ -100,7 +100,7 @@ This will bring in CIME and ccs_config which are required for building. ``` shell # Assuming pwd is the tools/mksurfdata_esmf directory - ./gen_mksurfdata_build.sh # For machines with a cime build + ./gen_mksurfdata_build # For machines with a cime build ``` Note: The pio_iotype value gets set and written to a simple .txt file diff --git a/tools/mksurfdata_esmf/gen_mksurfdata_build.sh b/tools/mksurfdata_esmf/gen_mksurfdata_build.sh index c8b891c1c4..974c1929a5 100755 --- a/tools/mksurfdata_esmf/gen_mksurfdata_build.sh +++ b/tools/mksurfdata_esmf/gen_mksurfdata_build.sh @@ -6,7 +6,7 @@ usage() { echo "" echo "***********************************************************************" echo "usage:" - echo "./gen_mksurfdata_build.sh" + echo "./gen_mksurfdata_build" echo "" echo "valid arguments: " echo "[-h|--help] " @@ -14,14 +14,14 @@ usage() { echo "[-v|--verbose] " echo " Run in verbose mode" echo "[-b|--blddir ] " - echo " Overrides default, which is /tool_bld in the same directory as ./gen_mksurfdata_build.sh" + echo " Overrides default, which is /tool_bld in the same directory as ./gen_mksurfdata_build" echo "[-m|--machine ] " echo " Overrides default MACH" echo "***********************************************************************" } -# Current working directory: the location of ./gen_mksurfdata_build.sh +# Current working directory: the location of ./gen_mksurfdata_build cwd=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # Default settings @@ -102,7 +102,7 @@ cd $blddir # Write pio_iotype to file with name pio_iotype.txt pio_iotype_filepath=../pio_iotype.txt # one up from /tool_bld if [ ! -f "$pio_iotype_filepath" ]; then - echo 'VALUE OF pio_iotype WRITTEN BY gen_mksurfdata_build.sh AND USED BY mksurfdata (i.e. THE FORTRAN EXECUTABLE):' > $pio_iotype_filepath + echo 'VALUE OF pio_iotype WRITTEN BY gen_mksurfdata_build AND USED BY mksurfdata (i.e. THE FORTRAN EXECUTABLE):' > $pio_iotype_filepath echo $pio_iotype >> $pio_iotype_filepath else echo "Use existing $pio_iotype_filepath file"