From 010983f67aa605dbd875870066a68ab730fd454e Mon Sep 17 00:00:00 2001 From: Philip Cameron-Smith Date: Wed, 14 Jun 2017 21:21:47 -0700 Subject: [PATCH 1/4] To allow data-atm compsets to work, I added a test for CAM_CONFIG_OPTS. We turn the COSP simulator on for watercycle simulations using $xmlchange_exe --id CAM_CONFIG_OPTS --append --val " -cosp" However, this fails for compsets with data-atmospheres. Hence, a test has been added to run_acme.template.csh to only turn COSP on when CAM_CONFIG_OPTS is in env_build.xml --- run_acme.template.csh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/run_acme.template.csh b/run_acme.template.csh index 5cebd98f7151..412c52f12416 100755 --- a/run_acme.template.csh +++ b/run_acme.template.csh @@ -210,7 +210,7 @@ set cpl_hist_num = 1 #=========================================== # VERSION OF THIS SCRIPT #=========================================== -set script_ver = 3.0.8 +set script_ver = 3.0.9 #=========================================== # DEFINE ALIASES @@ -811,8 +811,22 @@ set input_data_dir = `$xmlquery_exe DIN_LOC_ROOT --value` #$xmlchange_exe --id CAM_CONFIG_OPTS --val "-phys cam5 -chem linoz_mam3" ## Chris Golaz: build with COSP -#NOTE: xmlchange has a bug which requires append to be specified with quotes and a leading space -$xmlchange_exe --id CAM_CONFIG_OPTS --append -val " -cosp" +#NOTE: xmlchange has a bug which requires append to be specified with quotes and a leading space. +#NOTE: The xmlchange will fail if CAM is not active (eg a land only simulation), so we need to test that CAM_CONFIG_OPTS is in env_build.xml + +grep CAM_CONFIG_OPTS env_build.xml >> /dev/null +set CAM_CONFIG_OPTS_status = $status +if ( $CAM_CONFIG_OPTS_status == 0 ) then + $xmlchange_exe --id CAM_CONFIG_OPTS --append --val " -cosp" + acme_newline + acme_print 'Configuring ACME to use the COSP simulator.' + acme_newline +else + acme_newline + acme_print 'CAM_CONFIG_OPTS is not in env_build.xml, so cannot activate COSP simulator.' + acme_print 'This is probably because the atmosphere is not active, so this message can be safely ignored.' + acme_newline +endif #=========================== # SET THE PARTITION OF NODES @@ -1357,6 +1371,7 @@ acme_newline # Note that this breaks compatibility with older versions of CIME # Also add a fix to reenable using the special acme qos queue on Edison (MD) # 3.0.8 2017-05-24 Fixed minor bug when $machine contained a capital letter. Bug was introduced recently. (PJC) +# 3.0.9 2017-06-14 To allow data-atm compsets to work, I added a test for CAM_CONFIG_OPTS. (PJC) # # NOTE: PJC = Philip Cameron-Smith, PMC = Peter Caldwell, CG = Chris Golaz, MD = Michael Deakin @@ -1368,6 +1383,8 @@ acme_newline # +) Add a 'default' option, for which REST_OPTION='$STOP_OPTION' and REST_N='$STOP_N'. # This is important if the user subsequently edits STOP_OPTION or STOP_N. (PJC) # +) triggering on $acme_tag = master_detached doesn't make sense. Fix logic. (PJC) +# +) run_root and run_root_dir are duplicative. Also, move logical link creation before case.setup (PJC) +# +) change comments referring to cesm_setup to case.setup (name has changed). (PJC) ###Example sed commands #============================ From 6ba3a53948147b64267cc23a97c0962b76dc0645 Mon Sep 17 00:00:00 2001 From: Philip Cameron-Smith Date: Thu, 15 Jun 2017 17:51:26 -0700 Subject: [PATCH 2/4] Fixed problem in test for CAM_CONFIG_OPTS. Added usr_nl_clm template. The test for CAM_CONFIG_OPTS stopped run_acme execution because run_acme uses the 'csh -e' option, and the test returned a non-zero status when it was missing. A similiar test using xmlquery had the same problem. Hence, the test has been replaced with an xmlquery of the value of COMP_ATM; if it is 'datm' then the data atmosphere is being used. This new test is clearer, and resolves the problem. This commit also includes a template for modifying usr_nl_clm, for the convenience of users. --- run_acme.template.csh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/run_acme.template.csh b/run_acme.template.csh index 412c52f12416..1adfc01839d6 100755 --- a/run_acme.template.csh +++ b/run_acme.template.csh @@ -812,20 +812,17 @@ set input_data_dir = `$xmlquery_exe DIN_LOC_ROOT --value` ## Chris Golaz: build with COSP #NOTE: xmlchange has a bug which requires append to be specified with quotes and a leading space. -#NOTE: The xmlchange will fail if CAM is not active (eg a land only simulation), so we need to test that CAM_CONFIG_OPTS is in env_build.xml +#NOTE: The xmlchange will fail if CAM is not active, so test whether a data atmosphere (datm) is used. -grep CAM_CONFIG_OPTS env_build.xml >> /dev/null -set CAM_CONFIG_OPTS_status = $status -if ( $CAM_CONFIG_OPTS_status == 0 ) then - $xmlchange_exe --id CAM_CONFIG_OPTS --append --val " -cosp" +if ( `$xmlquery_exe --value COMP_ATM` == 'datm' ) then acme_newline - acme_print 'Configuring ACME to use the COSP simulator.' + acme_print 'The specified configuration uses a data atmosphere, so cannot activate COSP simulator.' acme_newline else acme_newline - acme_print 'CAM_CONFIG_OPTS is not in env_build.xml, so cannot activate COSP simulator.' - acme_print 'This is probably because the atmosphere is not active, so this message can be safely ignored.' + acme_print 'Configuring ACME to use the COSP simulator.' acme_newline + $xmlchange_exe --id CAM_CONFIG_OPTS --append --val " -cosp" endif #=========================== @@ -928,6 +925,10 @@ cat <> user_nl_cam mfilt = $records_per_atm_output_file EOF +cat <> user_nl_clm +! finidat='' +EOF + ### NOTES ON COMMON NAMELIST OPTIONS ### ### ATMOSPHERE NAMELIST ### From b0cafedc11037c3fad84af59ad9825d825090221 Mon Sep 17 00:00:00 2001 From: Philip Cameron-Smith Date: Wed, 21 Jun 2017 13:45:09 -0700 Subject: [PATCH 3/4] Tweaked one of the comments. *********1*********2*********3*********4*********5*********6*********7** Longer commit message body describing the commit. Can contain lists as follows: * Item 1 * Item 2 * Item 3 A good commit message should be written like an email, a subject followed by a blank line, followed by a more descriptive body. Can also contain a tag at the bottom describing what type of commit this is. [BFB] - Bit-For-Bit [FCC] - Flag Climate Changing [Non-BFB] - Non Bit-For-Bit [CC] - Climate Changing [NML] - Namelist Changing See confluence for a more detailed description about these tags. --- run_acme.template.csh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run_acme.template.csh b/run_acme.template.csh index 1adfc01839d6..18c79c0e4e98 100755 --- a/run_acme.template.csh +++ b/run_acme.template.csh @@ -228,9 +228,9 @@ alias acme_newline "echo ''" set first_argument = $1 if ( $first_argument != '' ) then echo 'This script does everything needed to configure/compile/run a case. As such, it' - echo 'provides complete provenance for each run and makes sharing with newbies easy. Future' - echo 'users should make sure that everything required for a run is in this script, the ACME' - echo 'git repo, or the inputdata svn repo.' + echo 'provides complete provenance for each run and makes sharing simulation configurations easy.' + echo 'Users should make sure that everything required for a run is in this script, the ACME' + echo 'git repo, and/or the inputdata svn repo.' echo '** This script accepts no arguments. Please edit the script as needed and resubmit without arguments. **' exit 5 endif From 4fa4c0baa6f499e40561f0851db6908e7db2f73f Mon Sep 17 00:00:00 2001 From: Philip Cameron-Smith Date: Mon, 26 Jun 2017 16:39:34 -0700 Subject: [PATCH 4/4] Changed version number to 3.0.10 There was an independent PR (#1594) which became version 3.0.9, so changing the version for this PR to 3.0.10. --- run_acme.template.csh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_acme.template.csh b/run_acme.template.csh index 18c79c0e4e98..cf2f607b2c98 100755 --- a/run_acme.template.csh +++ b/run_acme.template.csh @@ -210,7 +210,7 @@ set cpl_hist_num = 1 #=========================================== # VERSION OF THIS SCRIPT #=========================================== -set script_ver = 3.0.9 +set script_ver = 3.0.10 #=========================================== # DEFINE ALIASES