diff --git a/.gitignore b/.gitignore index fc1c342b..ee86d047 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ parm/*.db parm/*.out parm/*.err parm/*.log +parm/parm_xml.yaml parm/land_analysis.yaml parm/log.* diff --git a/sorc/test/create_bkg_ens.sh b/sorc/test/create_bkg_ens.sh index 2a3b97e6..3fda79de 100755 --- a/sorc/test/create_bkg_ens.sh +++ b/sorc/test/create_bkg_ens.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex ################################################ # pass arguments project_binary_dir=$1 @@ -35,16 +35,20 @@ if [[ ${DAtype} == 'letkfoi_snow' ]]; then cp $i ${WORKDIR}/mem_${ens} done - cres_file=$WORKDIR/mem_${ens}/${FILEDATE}.coupler.res - cp ${project_source_dir}/../parm/templates/template.coupler.res $cres_file - sed -i -e "s/XXYYYY/${YY}/g" $cres_file - sed -i -e "s/XXMM/${MM}/g" $cres_file - sed -i -e "s/XXDD/${DD}/g" $cres_file - sed -i -e "s/XXHH/${HH}/g" $cres_file - sed -i -e "s/XXYYYP/${YP}/g" $cres_file - sed -i -e "s/XXMP/${MP}/g" $cres_file - sed -i -e "s/XXDP/${DP}/g" $cres_file - sed -i -e "s/XXHP/${HP}/g" $cres_file + # update coupler.res file + settings="\ + 'yyyy': !!str ${YY} + 'mm': !!str ${MM} + 'dd': !!str ${DD} + 'hh': !!str ${HH} + 'yyyp': !!str ${YP} + 'mp': !!str ${MP} + 'dp': !!str ${DP} + 'hp': !!str ${HP} + " # End of settins variable + fp_template="${project_source_dir}/../parm/templates/template.coupler.res" + fn_namelist="${WORKDIR}/mem_${ens}/${FILEDATE}.coupler.res" + ${project_source_dir}/../ush/fill_jinja_template.py -u "${settings}" -t "${fp_template}" -o "${fn_namelist}" done echo "============================= calling create ensemble" diff --git a/sorc/test/test_letkfoi_snowda.sh b/sorc/test/test_letkfoi_snowda.sh index 74e75a1c..505baf6f 100755 --- a/sorc/test/test_letkfoi_snowda.sh +++ b/sorc/test/test_letkfoi_snowda.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex ################################################ # pass arguments project_binary_dir=$1 @@ -48,21 +48,30 @@ do ln -fs $obs_file ./${OBS_TYPES[$ii]}_${YY}${MM}${DD}${HH}.nc done -sed -i -e "s/XXYYYY/${YY}/g" letkf_land.yaml -sed -i -e "s/XXMM/${MM}/g" letkf_land.yaml -sed -i -e "s/XXDD/${DD}/g" letkf_land.yaml -sed -i -e "s/XXHH/${HH}/g" letkf_land.yaml -sed -i -e "s/XXYYYP/${YP}/g" letkf_land.yaml -sed -i -e "s/XXMP/${MP}/g" letkf_land.yaml -sed -i -e "s/XXDP/${DP}/g" letkf_land.yaml -sed -i -e "s/XXHP/${HP}/g" letkf_land.yaml -sed -i -e "s/XXTSTUB/${TSTUB}/g" letkf_land.yaml -sed -i -e "s#XXTPATH#${TPATH}#g" letkf_land.yaml -#sed -i -e "s#DATAPATH#${OROG_PATH}#g" letkf_land.yaml -sed -i -e "s/XXRES/${RES}/g" letkf_land.yaml RESP1=$((RES+1)) -sed -i -e "s/XXREP/${RESP1}/g" letkf_land.yaml -sed -i -e "s/XXHOFX/false/g" letkf_land.yaml # do DA +yyyymmdd="${YY}${MM}${DD}" +yyyymmddhh="${yyyymmdd}${HH}" +# update jedi yaml file +settings="\ + 'yyyy': !!str ${YY} + 'mm': !!str ${MM} + 'dd': !!str ${DD} + 'hh': !!str ${HH} + 'yyyymmdd': !!str ${yyyymmdd} + 'yyyymmddhh': !!str ${yyyymmddhh} + 'yyyp': !!str ${YP} + 'mp': !!str ${MP} + 'dp': !!str ${DP} + 'hp': !!str ${HP} + 'tstub': ${TSTUB} + 'tpath': ${TPATH} + 'res': ${RES} + 'resp1': ${RESP1} + 'driver_obs_only': false +" # End of settins variable +fp_template="letkf_land.yaml" +fn_namelist="letkf_land.yaml" +${project_source_dir}/../ush/fill_jinja_template.py -u "${settings}" -t "${fp_template}" -o "${fn_namelist}" # create folder for hofx mkdir -p ./output/DA/hofx