Skip to content

Commit

Permalink
(HOTFIX) Add missing file to gitignore and fix Ctest failure (ufs-com…
Browse files Browse the repository at this point in the history
…munity#159)

* add missing file to gitignore

* fix ctest failure
  • Loading branch information
chan-hoo authored Oct 23, 2024
1 parent 7ee2e1c commit 8c93fad
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parm/*.db
parm/*.out
parm/*.err
parm/*.log
parm/parm_xml.yaml
parm/land_analysis.yaml
parm/log.*

Expand Down
26 changes: 15 additions & 11 deletions sorc/test/create_bkg_ens.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex
################################################
# pass arguments
project_binary_dir=$1
Expand Down Expand Up @@ -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"
Expand Down
39 changes: 24 additions & 15 deletions sorc/test/test_letkfoi_snowda.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex
################################################
# pass arguments
project_binary_dir=$1
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8c93fad

Please sign in to comment.