Skip to content

Commit

Permalink
fix ctest failure
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-hoo committed Feb 6, 2025
1 parent cfc622a commit 0a3c36c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion parm/jedi/GHCN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
obsdatain:
engine:
type: H5File
obsfile: obs/obs_t{{ hh }}z.ghcn_snow.nc
obsfile: obs/obs.t{{ hh }}z.ghcn_snow.nc
obsdataout:
engine:
type: H5File
Expand Down
9 changes: 4 additions & 5 deletions parm/jedi/jcb-base_snow.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ snow_bump_data_directory: "{{ snow_bump_data_dir }}"

# Observation
observations:
#- adpsfc_snow
{%- if OBS_GHCN %}
{%- if OBS_TYPE == "GHCN" %}
- ghcn_snow
{%- endif %}
{%- if OBS_IMS %}
{%- elif OBS_TYPE == "IMS" %}
- ims_snow
{%- endif %}
#- adpsfc_snow
#- sfcsno
#- snocvr_snow
{%- endif %}

# GHCN
snow_obsdatain_path: "{{ snow_obsdatain_path }}"
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions parm/setup_wflow_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ def set_default_parm():
"NPROCS_FCST_IC": 36,
"NPZ": 127,
"OBSDIR": "",
"OBS_GHCN": "YES",
"OBS_IMS": "NO",
"OBS_TYPE": "GHCN",
"OUTPUT_FH": "1 -1",
"RES": 96,
"RESTART_INTERVAL": "12 -1",
Expand Down
10 changes: 4 additions & 6 deletions parm/templates/template.land_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ workflow:
nprocs_forecast_lnd: "{{ nprocs_forecast_lnd }}"
nprocs_per_node: "{{ nprocs_per_node }}"
OBSDIR: "{{ OBSDIR }}"
OBS_GHCN: "{{ OBS_GHCN }}"
OBS_IMS: "{{ OBS_IMS }}"
OBS_TYPE: "{{ OBS_TYPE }}"
OUTPUT_FH: "{{ OUTPUT_FH }}"
RES: "{{ RES }}"
RESTART_INTERVAL: "{{ RESTART_INTERVAL }}"
Expand Down Expand Up @@ -111,8 +110,7 @@ workflow:
MACHINE: "&MACHINE;"
model_ver: "&model_ver;"
NPZ: "&NPZ;"
OBS_GHCN: "&OBS_GHCN;"
OBS_IMS: "&OBS_IMS;"
OBS_TYPE: "&OBS_TYPE;"
PDY: "&PDY;"
RES: "&RES;"
res_p1: "&res_p1;"
Expand Down Expand Up @@ -146,7 +144,7 @@ workflow:
MACHINE: "&MACHINE;"
model_ver: "&model_ver;"
OBSDIR: "&OBSDIR;"
OBS_GHCN: "&OBS_GHCN;"
OBS_TYPE: "&OBS_TYPE;"
PDY: "&PDY;"
SCHED: "&SCHED;"
account: "&ACCOUNT;"
Expand Down Expand Up @@ -254,7 +252,7 @@ workflow:
model_ver: "&model_ver;"
NPROCS_ANALYSIS: "&NPROCS_ANALYSIS;"
NPZ: "&NPZ;"
OBS_GHCN: "&OBS_GHCN;"
OBS_TYPE: "&OBS_TYPE;"
PDY: "&PDY;"
RES: "&RES;"
res_p1: "&res_p1;"
Expand Down
12 changes: 6 additions & 6 deletions scripts/exlandda_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ do
done
# Copy obserbation file to work directory
mkdir -p ${DATA}/obs
ln -nsf "${COMIN}/obs/ghcn_snow_${PDY}${cyc}.nc" "${DATA}/obs/obs_${cycle}.ghcn_snow.nc"
obs_type_lower="${OBS_TYPE,,}"
ln -nsf "${COMIN}/obs/${obs_type_lower}_snow_${PDY}${cyc}.nc" "${DATA}/obs/obs.${cycle}.${obs_type_lower}_snow.nc"

# update coupler.res file
settings="\
Expand Down Expand Up @@ -100,7 +101,7 @@ else # letkf
else
snowdepth_vn="snwdph"
fi
# For LETKFOI, create pseudo-ensemble
# For LETKF, create pseudo-ensemble
for ens in pos neg
do
if [ -e $DATA/mem_${ens} ]; then
Expand All @@ -117,11 +118,10 @@ else # letkf
fi

# Create JEDI input yaml
jedi_nml_fn="jedi_letkfoi_snow.yaml"
jedi_nml_fn="jedi_letkf_snow.yaml"
cp -p "${PARMlandda}/jedi/${jedi_nml_fn}" "${DATA}/${jedi_nml_fn}"
if [ "${OBS_GHCN}" = "YES" ]; then
cat ${PARMlandda}/jedi/GHCN.yaml >> ${jedi_nml_fn}
fi
cat ${PARMlandda}/jedi/${OBS_TYPE}.yaml >> ${jedi_nml_fn}

# update JEDI yaml file
settings="\
'yyyy': !!str ${YYYY}
Expand Down
3 changes: 1 addition & 2 deletions scripts/exlandda_jcb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ settings="\
'snow_obsdataout_path': ./diags
'snow_obsdataout_prefix': "diag_"
'snow_obsdataout_suffix': "_${cdate}.nc"
'OBS_GHCN': ${OBS_GHCN}
'OBS_IMS': ${OBS_IMS}
'OBS_TYPE': ${OBS_TYPE}
" # End of settings variable

template_fp="${PARMlandda}/jedi/jcb-base_snow.yaml.j2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/exlandda_prep_obs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OBSDIR="${OBSDIR:-${FIXlandda}/DA_obs}"
DATA_GHCN_RAW="${DATA_GHCN_RAW:-${FIXlandda}/DATA_ghcn}"

# GHCN snow depth data
if [ "${OBS_GHCN}" = "YES" ]; then
if [ "${OBS_TYPE}" = "GHCN" ]; then
# GHCN are time-stamped at 18. If assimilating at 00, need to use previous day's obs,
# so that obs are within DA window.
obs_fn="ghcn_snwd_ioda_${YYYP}${MP}${DP}${HP}.nc"
Expand Down

0 comments on commit 0a3c36c

Please sign in to comment.