From 8486a7aef385b812e7fb4de375256caad05e067d Mon Sep 17 00:00:00 2001 From: Ping-Gin Chiu Date: Thu, 23 Sep 2021 15:35:56 +0200 Subject: [PATCH] Adopt for cime5.8.32-Nor --- Prediction/create_ensemble.sh | 7 ++++--- Prediction/create_template.sh | 8 +++++--- Prediction/use_cases/case_setting.in | 14 +++++++------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Prediction/create_ensemble.sh b/Prediction/create_ensemble.sh index e9b0d46e..4614c4a9 100755 --- a/Prediction/create_ensemble.sh +++ b/Prediction/create_ensemble.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex echo "USAGE: ./`basename $0` " @@ -72,7 +72,8 @@ do echo ++ REMOVE OLD CASE CASEROOT=$CASESROOT/$ENSEMBLE_PREFIX/$CASE - EXEROOT=$EXESROOT/$ENSEMBLE_PREFIX/$CASE + EXEROOT=$(echo $EXESROOT/$ENSEMBLE_PREFIX/$CASE | sed -e's://*:/:g') + ## replace '//' with '/', which cause mct complie failed at cime5.8.32-Nor, do now know why DOUT_S_ROOT=$ARCHIVESROOT/$ENSEMBLE_PREFIX/$CASE for ITEM in $CASEROOT $EXEROOT $DOUT_S_ROOT do @@ -164,7 +165,7 @@ do fi fi if [ "$CESMVERSION" == '2' ];then - ./case.setup + ./case.setup --reset else ./configure -case fi diff --git a/Prediction/create_template.sh b/Prediction/create_template.sh index 1035a2e8..a97c7513 100755 --- a/Prediction/create_template.sh +++ b/Prediction/create_template.sh @@ -20,7 +20,8 @@ ENSEMBLE_PREFIX=${ENSEMBLE_PREFIX:-${PREFIX}_${START_YEAR1}${START_MONTH1}${STAR logfile=`basename $0`_${ENSEMBLE_PREFIX}.log CASE=${ENSEMBLE_PREFIX}_${MEMBERTAG}${MEMBER1:-001} CASEROOT=$CASESROOT/$ENSEMBLE_PREFIX/$CASE -EXEROOT=$EXESROOT/$ENSEMBLE_PREFIX/$CASE +EXEROOT=$(echo $EXESROOT/$ENSEMBLE_PREFIX/$CASE | sed -e's://*:/:g') + ## replace '//' with '/', which cause mct complie failed at cime5.8.32-Nor, do now know why RUNDIR=$EXEROOT/run ## for consistant with create_ensemble.sh DOUT_S_ROOT=$ARCHIVESROOT/$ENSEMBLE_PREFIX/$CASE for ITEM in $CASEROOT $EXEROOT $DOUT_S_ROOT @@ -45,8 +46,8 @@ mkdir -p $CASESROOT/$ENSEMBLE_PREFIX $EXESROOT/$ENSEMBLE_PREFIX $ARCHIVESROOT/$E echo + CREATE CASE1 CASE, logfile: ${logfile} if [ $CESMVERSION == '2' ]; then - echo $SCRIPTSROOT/create_newcase --case $CASEROOT --compset $COMPSET --res $RES --mach $MACH --project $ACCOUNT --run-unsupported - $SCRIPTSROOT/create_newcase --case $CASEROOT --compset $COMPSET --res $RES --mach $MACH --project $ACCOUNT --run-unsupported >& ${logfile} + echo $SCRIPTSROOT/create_newcase --case $CASEROOT --compset $COMPSET --res $RES --mach $MACH --project $ACCOUNT + $SCRIPTSROOT/create_newcase --case $CASEROOT --compset $COMPSET --res $RES --mach $MACH --project $ACCOUNT >& ${logfile} #$SCRIPTSROOT/create_newcase --case $CASEROOT --compset $COMPSET --res $RES --mach $MACH --pecount $PECOUNT --project $ACCOUNT --run-unsupported -q short ## for testing else $SCRIPTSROOT/create_newcase -case $CASEROOT -compset $COMPSET -res $RES -mach $MACH -pecount $PECOUNT @@ -62,6 +63,7 @@ else ./xmlchange -file env_build.xml -id EXEROOT -val $EXEROOT ./xmlchange -file env_run.xml -id DOUT_S_ROOT -val $DOUT_S_ROOT fi + if [[ $RUN_TYPE && $RUN_TYPE == "hybrid" ]] then ## not changed for NorESM2 yet diff --git a/Prediction/use_cases/case_setting.in b/Prediction/use_cases/case_setting.in index f6795372..897d494e 100755 --- a/Prediction/use_cases/case_setting.in +++ b/Prediction/use_cases/case_setting.in @@ -35,18 +35,18 @@ CCSMROOT=$(readlink -f $(dirname $(readlink -f $0))/../..) ### Case settings PREFIX='Casename' ENSEMBLE_PREFIX=${PREFIX} ## leave it empty will be ${PREFIX}_${START_YEAR}${START_MONTH}${START_DAY} -START_YEARS='1980' +START_YEARS='1970' START_MONTHS='01' START_DAYS='01' STOP_OPTION=nday # units for run length specification STOP_N STOP_N=14 # run continuesly for this length RESTART=0 # restart this many times, but it does not work on Betzy RESUBMIT=0 -WALLTIME='3-00:00:00' +WALLTIME='72:00:00' NMEMBER=8 # number of prediction members COMPSET=NHIST RES=f19_tn14 ## resolution -ACCOUNT=ACCOUNT ## project account +ACCOUNT=nn9039k ## project account ##### The NTASKS, ROOTPE setting here will override default setting. ##### Change here and PRECASESETUP if any optimize. @@ -67,10 +67,10 @@ MEMBER_PES=128 ## This value is the number of PE for each member. ##### ${REST_PATH_LOCAL}/${REST_PREFIX}002/rest/${START_YEARS}-00000/ ##### ${REST_PATH_LOCAL}/${REST_PREFIX}003/rest/${START_YEARS}-00000/ ##### ... -REST_PATH_LOCAL=/cluster/home/$USER/work/restarts/cases -REST_CASE=NHIST_f19_tn14_20190710_19700101 ## resolution must same as RES variable +REST_PATH_LOCAL=/cluster/home/$USER/nn9039k/restarts/cases +REST_CASE=NHIST_f19_tn14_20190710 ## resolution must same as RES variable REST_PREFIX=${REST_CASE}_mem # reference prefix, including everything but member id -RUN_REFCASE= +RUN_REFCASE=$REST_CASE ## Keep it empty if casename of restart files are $REST_CASE_mem001 (restart files are generated from NorCPM case) ## Or fill it with casename if restart files are pertubed from single case. @@ -100,7 +100,7 @@ PRECASESETUP=$PRECASESETUP"; sed -i -e'/<\/environment_variables>/i\ \ \ \