Skip to content
Snippets Groups Projects
Commit 02ef8375 authored by Martin Schupfner's avatar Martin Schupfner
Browse files

cmor: fix timeshift

parent 02d0a77a
No related branches found
No related tags found
No related merge requests found
......@@ -257,15 +257,15 @@ else
[[ $1 -ge ${#iniyeararr[@]} ]] && die 'erroneous input - input does not make sense along with the configured iniyear, finyear arrays'
[[ $2 -ge ${#iniyeararr[@]} ]] && die 'erroneous input - input does not make sense along with the configured iniyear, finyear arrays'
[[ $1 -gt $2 ]] && die 'erroneous input - input does not make sense along with the configured iniyear, finyear arrays'
cmorstart=$(( $3 + ${inioffsetarr[$1]} ))
cmorend=$(( $4 + ${inioffsetarr[$2]} ))
cmorstart=$(( $3 + ${inioffsetarr[$1]} - $spinup ))
cmorend=$(( $4 + ${inioffsetarr[$2]} -spinup ))
fi
MESSAGE='PalMod2'
$RUN_AGG && MESSAGE+=' - Aggregation - '
$RUN_DIAGS && MESSAGE+=' - Diagnostics - '
$RUN_CMOR && MESSAGE+=" - CMOR rewriting - "
$PROCESS_CLIM && MESSAGE+=' for only climatological variables'
print "$(date +%Y-%m-%dT%H:%M:%S): $MESSAGE started for $((cmorstart-spinup))-$((cmorend-spinup)) $SUFFIX"
print "$(date +%Y-%m-%dT%H:%M:%S): $MESSAGE started for ${cmorstart}-${cmorend} $SUFFIX"
print " ... translating to ${RAW_EXP_IDS[$1]}@$3 to ${RAW_EXP_IDS[$2]}@$4"
#exit 0
......@@ -462,7 +462,7 @@ function run_cmor
cd $current_dir
# perform time shift
cdochain="-shifttime,${inioffsetarr[$y]}year -shifttime,-3day"
cdochain="-shifttime,$((inioffsetarr[$y] - spinup))year -shifttime,-3day"
# Define DRS root dir
dr=$dr_trunk/cmor${SUFFIX}_${cmorstart}-${cmorend}${CLIMSUFFIX}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment