Enhanced robustness of the SETTE namelist-file customization
Context
SETTE tests of the ORCA2_ICE_OBS
configuration (branch_4.2
version) fail to run the selected OBS and ASM options: ln_diaobs
, ln_t3d
, ln_s3d
, ln_sst
, ln_sla
, ln_sic
, ln_vel3d
, ln_bkgwri
, ln_trainc
, ln_dyninc
, ln_sshinc
, and ln_asmiau
are all set to .false.
in the SETTE ORCA2_ICE_OBS
runs.
Analysis
The set_namelist
function of SETTE fails to add variable assignments to the empty namelist records added by itself in cases of no suitable pre-existing record. This failure occurs due to the use of a space character to detect the right boundary of the namelist-group name and the lack of this boundary marker in the newly added empty namelist records.
Currently, this negatively affects the SETTE runs of the ORCA2_ICE_OBS
configuration as well as of the non-default OVERFLOW
and LOCK_EXCHANGE
variants.
Fix
The addition of a space character to mark the right namelist-group-name boundary in added namelist records, e.g., by making the adjustment
--- a/sette/all_functions.sh
+++ b/sette/all_functions.sh
@@ -286,7 +286,7 @@ set_namelist () {
echo "+++++ Group ${NAMGRP} containing ${2} is missing in ${EXE_DIR}/$1 +++++ " >> ${SETTE_DIR}/output.sette
echo "+++++ Group ${NAMGRP} is added in ${EXE_DIR}/$1 +++++ " >> ${SETTE_DIR}/output.sette
echo '' >> ${SETTE_DIR}/output.sette
- echo "${NAMGRP}" >> ${EXE_DIR}/$1
+ echo "${NAMGRP} ! Added by SETTE" >> ${EXE_DIR}/$1
echo "/" >> ${EXE_DIR}/$1
fi
would enable the addition of variable assignments to such records.