Skip to content

Commit

Permalink
Minor fix for 3digi
Browse files Browse the repository at this point in the history
  • Loading branch information
blcc committed Apr 20, 2021
1 parent c8c4b59 commit ee2c1c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions Prediction/create_ensemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ then
fi
. $1

MEM01=${MEMBER1:-001}
MEM001=${MEMBER1:-001}
echo + CHECK THAT TEMPLATE CASE EXISTS
ENSEMBLE_PREFIX1=${ENSEMBLE_PREFIX:-${PREFIX}_${START_YEAR1}${START_MONTH1}${START_DAY1}}
CASE1=${ENSEMBLE_PREFIX1}_${MEMBERTAG}${MEM01}
CASE1=${ENSEMBLE_PREFIX1}_${MEMBERTAG}${MEM001}
if [ ! -e $CASESROOT/${ENSEMBLE_PREFIX1}/${CASE1} ]
then
echo Template case $CASE1 does not exist. Please use create_template.sh to create.
Expand All @@ -31,7 +31,7 @@ for START_MONTH in $START_MONTHS
do
for START_DAY in $START_DAYS
do
for MEMBER in `seq -w $MEM01 $(($MEM01+$NMEMBER-1))`
for MEMBER in `seq -w $MEM001 $(($MEM001+$NMEMBER-1))`
do

echo ++ pick reference date
Expand Down Expand Up @@ -182,8 +182,8 @@ do
exit
fi
fi
sed -i "s%${REST_PREFIX}${MEM01}.cice.r.${REF_YEAR1}-${REF_MONTH1}-${REF_DAY1}%${REST_PREFIX}${REF_MEMBER}.cice.r.${REF_YEAR}-${REF_MONTH}-${REF_DAY}%" Buildconf/cice.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM01}.clm2.r.${REF_YEAR1}-${REF_MONTH1}-${REF_DAY1}%${REST_PREFIX}${REF_MEMBER}.clm2.r.${REF_YEAR}-${REF_MONTH}-${REF_DAY}%" Buildconf/clm.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM001}.cice.r.${REF_YEAR1}-${REF_MONTH1}-${REF_DAY1}%${REST_PREFIX}${REF_MEMBER}.cice.r.${REF_YEAR}-${REF_MONTH}-${REF_DAY}%" Buildconf/cice.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM001}.clm2.r.${REF_YEAR1}-${REF_MONTH1}-${REF_DAY1}%${REST_PREFIX}${REF_MEMBER}.clm2.r.${REF_YEAR}-${REF_MONTH}-${REF_DAY}%" Buildconf/clm.buildnml.csh
#Fanf: typically ifile does not have the same date than restart file
ifile=$(basename `find $REST_PATH/ -name '*cam2.i*'`)
if [ "$CESMVERSION" == '2' ];then
Expand All @@ -199,14 +199,14 @@ do
REST_PATH="$REST_PATH_LOCAL/${REST_PREFIX}${MEMBER}/rest/${START_YEAR1}-${START_MONTH1}-${START_DAY1}-00000"
fi
if [ "$CESMVERSION" == '2' ];then
#sed -i "s%${ENSEMBLE_PREFIX1}/${CASE1}/run/${REST_PREFIX}${MEM01}.cam2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${ENSEMBLE_PREFIX}/${CASE}/run/${REST_PREFIX}${MEMBER}.cam2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cam.buildnml.csh
##sed -i "s%${REST_PREFIX}${MEM01}.cice.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.cice.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cice.buildnml.csh
##sed -i "s%${REST_PREFIX}${MEM01}.clm2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.clm2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/clm.buildnml.csh
#sed -i "s%${ENSEMBLE_PREFIX1}/${CASE1}/run/${REST_PREFIX}${MEM001}.cam2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${ENSEMBLE_PREFIX}/${CASE}/run/${REST_PREFIX}${MEMBER}.cam2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cam.buildnml.csh
##sed -i "s%${REST_PREFIX}${MEM001}.cice.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.cice.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cice.buildnml.csh
##sed -i "s%${REST_PREFIX}${MEM001}.clm2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.clm2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/clm.buildnml.csh
echo pass for NorESM2
else
sed -i "s%${ENSEMBLE_PREFIX1}/${CASE1}/run/${REST_PREFIX}${MEM01}.cam2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${ENSEMBLE_PREFIX}/${CASE}/run/${REST_PREFIX}${MEMBER}.cam2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cam.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM01}.cice.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.cice.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cice.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM01}.clm2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.clm2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/clm.buildnml.csh
sed -i "s%${ENSEMBLE_PREFIX1}/${CASE1}/run/${REST_PREFIX}${MEM001}.cam2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${ENSEMBLE_PREFIX}/${CASE}/run/${REST_PREFIX}${MEMBER}.cam2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cam.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM001}.cice.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.cice.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/cice.buildnml.csh
sed -i "s%${REST_PREFIX}${MEM001}.clm2.r.${START_YEAR1}-${START_MONTH1}-${START_DAY1}%${REST_PREFIX}${MEMBER}.clm2.r.${START_YEAR}-${START_MONTH}-${START_DAY}%" Buildconf/clm.buildnml.csh
fi
#IB: why is this line here? $REST_PATH_LOCAL/${REST_PREFIX}${MEMBER}/${START_YEAR}-${START_MONTH}-${START_DAY}-00000/
fi
Expand Down
4 changes: 2 additions & 2 deletions Prediction/submit_ensemble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ do
echo +++ SET CONTINUE_RUN, STOP_OPTION AND STOP_N
ENSEMBLE_PREFIX=${PREFIX}_\${START_YEAR}\${START_MONTH}\${START_DAY}
for MEMBER in \`seq -w 01 $NMEMBER\`
for MEMBER in \`seq -w 001 $NMEMBER\`
do
CASE=\${ENSEMBLE_PREFIX}_${MEMBERTAG}\$MEMBER
cd $CASESROOT/\${ENSEMBLE_PREFIX}/\${CASE}
Expand All @@ -184,7 +184,7 @@ do
done
echo +++ LAUNCH FIRST MEMBER
CASE=\${ENSEMBLE_PREFIX}_${MEMBERTAG}01
CASE=\${ENSEMBLE_PREFIX}_${MEMBERTAG}001
cd $CASESROOT/\${ENSEMBLE_PREFIX}/\${CASE}
if [ `echo $MACH | cut -d_ -f1` == "hexagon" ]
then
Expand Down
2 changes: 1 addition & 1 deletion Prediction/use_cases/template_betzy.in
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ PRECASESETUP=$PRECASESETUP"; cp ${SCRIPTDIR}/../SourceMods.noresm2/src.drv/cime_

### clm patch for branch run
patchfile="${CCSMROOT}/components/clm/src/main/controlMod.F90"
if [ -f "$patchfile" ] && [ ! -z $(grep 'ERROR: Can only set use_init_interp if finidat is set' "${patchfile}") ] ; then
if [ -f "$patchfile" ] && [ ! -z "$(grep 'ERROR: Can only set use_init_interp if finidat is set' ${patchfile})" ] ; then
PRECASESETUP=$PRECASESETUP"; cp ${SCRIPTDIR}/../SourceMods.noresm2/src.clm/controlMod.F90 ./SourceMods/src.clm/"
## Patch of https://github.com/ESCOMP/ctsm/issues/786
## Which is necessary for branch run
Expand Down

0 comments on commit ee2c1c5

Please sign in to comment.