- 积分
- 775
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2021-6-1
- 最后登录
- 1970-1-1
|
发表于 2025-1-8 20:56:03
|
显示全部楼层
请教楼主有没有解决呀,我是直接按照用户手册的下一章节ETKF那部分做的,只处理d01代码片段如下,但是过滤观测数据的那一步总是出问题(./gen_be_etkf.exe计算出的特征值有负值,导致膨胀因子和最终的扰动是空值),如果楼主或小伙伴有运行成功的经验,万望赐教!感谢!
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/wrfvar_output ${DAT_DIR}/updatemeanmebs/${totaltimen}/wrfinput_${domainn}_hybrid.nc
############# 4f. 如果处理d01,则进行wrfbdy_d01资料同化 #############
if [ "$domain" = "d01" ]; then
for n in $(seq 1 ${mebnum})
do
formatted_n=$(printf "%03d" $n)
ln -fs ${WRFDA_DIR}/var/build/da_update_bc.exe .
cp -r ${DEST_DIR}/${totaltimen}/wrfbdy_d01.e${formatted_n} ./wrfbdy_d01
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/wrfvar_output wrfinput_${domainn}
cp -r ${DAT_DIR}/nl/${totaltimen}/parame.in ./parame.in
ulimit -s unlimited
## 20240603modify
#yhrun -N $SLURM_NNODES -n $SLURM_NTASKS
./da_update_bc.exe >&step5_da_update_bc_${domainn}.log
if tail -n 1 "${WORK_DIR}/${totaltimen}/${domainn}/step5_da_update_bc_${domainn}.log" | grep -q "successfully"; then
echo "line 157 - Place2 - There is a 'successfully' in rsl file, continuing..."
echo "${totaltimen}${domainn}"
else
echo "line 160 - Place2 - My error: There is no 'successfully' exist in rsl_${domainn} file!"
echo "${totaltimen}${domainn}"
exit 1 # 或者处理错误的其他方式
fi
############# 4g. 修改的wrfbdy_d01和mean拷贝 #########################
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/wrfbdy_d01 ${DAT_DIR}/updatemeanmebs/${totaltimen}/wrfbdy_d01.e${formatted_n}
done
fi
############# [Step Two. ETKF通过扰动和新mean更新集合成员] ############
############# 1. Running ETKF System ################################
mkdir -p ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter
cd ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter
# 20241222 RM added for be.vertloc error
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/be.vertloc.dat ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter
## 20240603modify2 取消了#
# cp -r ${WORK_DIR}/${totaltimen}/${domainn}/ep ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter/ep
# rm -rf ./fg
## 20240721这里就是用first guess 修正观测!
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/wrfout_${domainn}_2021-05-14_${hourtimen}:00:00.mean ./fg
ln -fs ${WRFDA_DIR}/run/LANDUSE.TBL .
ln -fs ${DAT_DIR}/ob/${totaltimen}/ob.ascii ./ob.ascii
ln -fs ${DAT_DIR}/ob/${totaltimen}/ob.radar ./ob.radar
ln -fs ${DAT_DIR}/be/be_${domainn}_monthly.dat ./be.dat
ln -fs ${WRFDA_DIR}/var/build/da_wrfvar.exe .
cp ${DAT_DIR}/ETKF/${totaltimen}/${domainn}/namelist_QC-OBS.input ./namelist.input
# 20241222 RM added for be.vertloc error
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/be.vertloc.dat ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter
cp -r ${WORK_DIR}/${totaltimen}/${domainn}/ep/ ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter/
## 20240603modify
# yhrun -N $SLURM_NNODES -n $SLURM_NTASKS
ulimit -s unlimited
./da_wrfvar.exe >&step6_ETKF_da_wrfvar_${domainn}.log
# 检查最后一行是否包含"successfully"
if tail -n 1 "${WORK_DIR}/${totaltimen}/${domainn}/obs_filter/rsl.error.0000" | grep -q "successfully"; then
echo "line 185 - Place3 - There is a 'successfully' in rsl file, continuing..."
echo "line 186 - ${totaltimen}${domainn}"
# 在这里添加继续执行的代码
else
echo "line 189 - Place3 - My error: There is no 'successfully' exist in rsl_d01 file!!!!!!"
echo "line 190 - ${totaltimen}${domainn}"
exit 1 # 或者处理错误的其他方式
fi
# 检查输出文件:一个包含过滤的观测结果的 filtered_obs_01 文件。
############# 2. Prepare omb files for ETKF ##########################
for n in $(seq 1 ${mebnum})
do
cd ${WORK_DIR}/${totaltimen}/${domainn}/
formatted_n=$(printf "%03d" $n)
formatted_n_2=$(printf "%02d" $n)
mkdir -p omb/working.e${formatted_n}
cd omb/working.e${formatted_n}
rm -rf ./fg
## 20240714 改成用Hybrid出来的接口(?为什么要分集合?)
cp -r ${DAT_DIR}/fc/${totaltimen}/wrfout_${domainn}_2021-05-14_${hourtimen}:00:00.e${formatted_n} ./wrfout_${domainn}_2021-05-14_${hourtimen}:00:00.e${formatted_n}
source /home/RumoWang/miniconda3/etc/profile.d/conda.sh
conda activate py39
cp -r ${DAT_DIR}/pyLU/changeMMINLUinwrfout.py ${WORK_DIR}/${totaltimen}/${domainn}/omb/working.e${formatted_n}/
# 定义要修改的文件路径
file_path="${WORK_DIR}/${totaltimen}/${domainn}/omb/working.e${formatted_n}/changeMMINLUinwrfout.py"
# 使用sed命令替换文件中的第9行
replacestr="filename = \"./wrfout_${domainn}_2021-05-14_${hourtimen}:00:00.e${formatted_n}\""
sed -i "9s|.*|$replacestr|" "$file_path"
echo "Complete Place4 ${replacestr} replacing"
python ${WORK_DIR}/${totaltimen}/${domainn}/omb/working.e${formatted_n}/changeMMINLUinwrfout.py
echo "wrfout wrfinput wrfbdy files have been moved and renamed and Python-modified."
cp -r ./wrfout_${domainn}_2021-05-14_${hourtimen}:00:00.e${formatted_n} ./fg
ln -fs ${WRFDA_DIR}/run/LANDUSE.TBL .
# 20240722 change for copy ob.ascii 把后面的./ob.ascii改成
# cp -r ${WORK_DIR}/${totaltimen}/${domainn}/obs_filter/filtered_obs_01 ./ob.ascii |
|