Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions scripts/exregional_archive.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

module load hpss

day=`date -u "+%d" -d "-1 day"`
month=`date -u "+%m" -d "-1 day"`
year=`date -u "+%Y" -d "-1 day"`
currentime=$(echo "${CDATE}" | sed 's/\([[:digit:]]\{2\}\)$/ \1/')
day=$(date +%d -d "${currentime} 24 hours ago")
month=$(date +%m -d "${currentime} 24 hours ago")
year=$(date +%Y -d "${currentime} 24 hours ago")

. ${GLOBAL_VAR_DEFNS_FP}

Expand Down Expand Up @@ -37,7 +38,7 @@ if [[ $runcount -gt 0 ]];then

if [[ -e ${COMOUT_BASEDIR}/stage/$year$month$day$hour ]];then
cd ${COMOUT_BASEDIR}/stage
htar -chvf $ARCHIVEDIR/$year/$month/$day/$year$month$day$hour.tar $year$month$day$hour
htar -chvf $ARCHIVEDIR/$year/$month/$day/post_$year$month$day$hour.tar $year$month$day$hour
rm -rf $year$month$day$hour
fi

Expand All @@ -46,6 +47,21 @@ fi

rmdir $COMOUT_BASEDIR/stage

cd ${NWGES_BASEDIR}
set -A YY `ls -d ${year}${month}${day}?? | sort -r`
runcount=${#YY[*]}
if [[ $runcount -gt 0 ]];then

hsi mkdir -p $ARCHIVEDIR/$year/$month/$day

for onerun in ${YY[*]};do
hour=$(echo $onerun | cut -c9-10 )
htar -chvf $ARCHIVEDIR/$year/$month/$day/nwges_${onerun} ${onerun}
done

fi


dateval=`date`
echo "Completed archive at "$dateval
exit 0
Expand Down
15 changes: 8 additions & 7 deletions scripts/exregional_nonvarcldanl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ fi

process_bufr_path=${CYCLE_DIR}/process_bufr${cycle_tag}

obs_files_source[0]=${process_bufr_path}/LightningInFV3LAM.dat
obs_files_target[0]=LightningInFV3LAM.dat
obs_files_source[0]=${process_bufr_path}/NASALaRC_cloud4fv3.bin
obs_files_target[0]=NASALaRC_cloud4fv3.bin

obs_files_source[1]=${process_bufr_path}/NASALaRC_cloud4fv3.bin
obs_files_target[1]=NASALaRC_cloud4fv3.bin
obs_files_source[1]=${process_bufr_path}/fv3_metarcloud.bin
obs_files_target[1]=fv3_metarcloud.bin

obs_files_source[2]=${process_bufr_path}/fv3_metarcloud.bin
obs_files_target[2]=fv3_metarcloud.bin
obs_files_source[2]=${process_bufr_path}/LightningInFV3LAM.dat
obs_files_target[2]=LightningInFV3LAM.dat

obs_number=${#obs_files_source[@]}
for (( i=0; i<${obs_number}; i++ ));
Expand Down Expand Up @@ -276,7 +276,8 @@ fi
if [ ${DO_ENKF_RADAR_REF} == "TRUE" ]; then
l_qnr_from_qr=".true."
fi
if [ ${DO_ENVAR_RADAR_REF} == "TRUE" ]; then
if [ -r "${cycle_dir}/anal_radardbz_gsi${cycle_tag}/stdout" ]; then
l_precip_clear_only=".true."
l_qnr_from_qr=".true."
fi

Expand Down
15 changes: 7 additions & 8 deletions scripts/exregional_run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,8 @@ if [ ${regional_ensemble_option:-1} -eq 5 ] && [ ${BKTYPE} != 1 ]; then
print_info_msg "$VERBOSE" "Do hybrid with FV3LAM ensemble"
ifhyb=.true.
print_info_msg "$VERBOSE" " Cycle ${YYYYMMDDHH}: GSI hybrid uses FV3LAM ensemble with n_ens=${nummem}"
if [ ${ob_type} == "conv" ]; then
grid_ratio_ens="3"
fi
if [ ${ob_type} == "radardbz" ]; then
grid_ratio_ens="1"
fi
grid_ratio_ens="1"
ens_fast_read=.true.
else
nummem=$(more filelist03 | wc -l)
nummem=$((nummem - 3 ))
Expand Down Expand Up @@ -485,7 +481,11 @@ else

if [ ${ob_type} == "radardbz" ]; then

obs_files_source[0]=${cycle_dir}/process_radarref/00/Gridded_ref.nc
if [ ${cycle_type} == "spinup" ]; then
obs_files_source[0]=${cycle_dir}/process_radarref_spinup/00/Gridded_ref.nc
else
obs_files_source[0]=${cycle_dir}/process_radarref/00/Gridded_ref.nc
fi
obs_files_target[0]=dbzobs.nc

fi
Expand Down Expand Up @@ -615,7 +615,6 @@ if [[ ${gsi_type} == "ANALYSIS" && ${ob_type} == "radardbz" ]]; then
ens_v=-0.30125
readin_localization=.false.
q_hyb_ens=.true.
ens_fast_read=.true.
if_model_dbz=.true.
fi
CONVINFO=${FIX_GSI}/${CONVINFO_FN}
Expand Down
18 changes: 9 additions & 9 deletions scripts/exregional_save_restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ restart_prefix=${save_yyyy}${save_mm}${save_dd}.${save_hh}0000
if [ ! -r ${nwges_dir}/INPUT/gfs_ctrl.nc ]; then
cp_vrfy $run_dir/INPUT/gfs_ctrl.nc ${nwges_dir}/INPUT/gfs_ctrl.nc
if [ -r ${run_dir}/INPUT/coupler.res ]; then # warm start
for file in ${filelist}; do
cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/INPUT/${file}
done
if [ "${IO_LAYOUT_Y}" == "1" ]; then
for file in ${filelistn}; do
cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/INPUT/${file}
Expand All @@ -127,16 +124,16 @@ if [ ! -r ${nwges_dir}/INPUT/gfs_ctrl.nc ]; then
done
done
fi
for file in ${filelist}; do
cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/INPUT/${file}
done
else # cold start
for file in ${filelistcold}; do
cp_vrfy $run_dir/INPUT/${file} ${nwges_dir}/INPUT/${file}
done
fi
fi
if [ -r "$run_dir/RESTART/${restart_prefix}.coupler.res" ]; then
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
if [ "${IO_LAYOUT_Y}" == "1" ]; then
for file in ${filelistn}; do
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
Expand All @@ -150,6 +147,9 @@ if [ -r "$run_dir/RESTART/${restart_prefix}.coupler.res" ]; then
done
done
fi
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
echo " ${fhr} forecast from ${yyyymmdd}${hh} is ready " #> ${nwges_dir}/RESTART/restart_done_f${fhr}
else

Expand All @@ -167,9 +167,6 @@ else
( \"${FCST_LEN_HRS_thiscycle}\") "

if [ -r "$run_dir/RESTART/coupler.res" ] && [ ${fhr} -eq ${FCST_LEN_HRS_thiscycle} ] ; then
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
if [ "${IO_LAYOUT_Y}" == "1" ]; then
for file in ${filelistn}; do
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
Expand All @@ -183,6 +180,9 @@ else
done
done
fi
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
echo " ${fhr} forecast from ${yyyymmdd}${hh} is ready " #> ${nwges_dir}/RESTART/restart_done_f${fhr}
else
echo "This forecast hour does not need to save restart: ${yyyymmdd}${hh}f${fhr}"
Expand Down
49 changes: 28 additions & 21 deletions ush/templates/FV3LAM_wflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ tasks; and the "FCST" type is used for the RUN_FCST_TN task.
{%- endif %}
{%- if partition_graphics is not none %}
{%- if do_ens_graphics %}
<!ENTITY RSRV_GRAPHICS "<account>&ACCOUNT;</account><queue>&QUEUE_GRAPHICS;</queue><partition>{{ partition_graphics }}</partition><native>&RRFS_POST_RESERVE;</native>">
<!ENTITY RSRV_GRAPHICS "<account>&SERVICE_ACCOUNT;</account><queue>&QUEUE_GRAPHICS;</queue><partition>{{ partition_graphics }}</partition><native>&RRFS_POST_RESERVE;</native>">
{%- else %}
<!ENTITY RSRV_GRAPHICS "<account>&SERVICE_ACCOUNT;</account><queue>&QUEUE_GRAPHICS;</queue><partition>{{ partition_graphics }}</partition><native>&RRFS_POST_RESERVE;</native>">
{%- endif %}
Expand Down Expand Up @@ -1037,21 +1037,9 @@ MODULES_RUN_TASK_FP script.
<and>
<taskdep task="&ANAL_GSI_TN;_#type#"/>
<or>
<and>
<or>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<streq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
</or>
{% for h in range(1, num_ens_members+1) %}
<datadep age="00:00:01:00"><cyclestr offset="-{{ da_cycle_interval_hrs }}:00:00">&RRFSE_FG_ROOT;/@Y@m@d@H/mem{{ "%04d" % h }}/fcst_fv3lam/RESTART/</cyclestr><cyclestr>@Y@m@d.@H0000.coupler.res</cyclestr></datadep>
{%- endfor %}
</and>
<and>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<strneq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></strneq>
{%- endfor %}
</and>
{%- endfor %}
</or>
</and>
</dependency>
Expand Down Expand Up @@ -1142,12 +1130,24 @@ MODULES_RUN_TASK_FP script.
<taskdep task="&RUN_ENKFUPDT_TN;"/>
{%- endif %}
</and>
{%- elif do_envar_radar_ref %}
<taskdep task="&HYBRID_RADAR_REF_TN;_#type#"/>
{%- else %}
<taskdep task="&ANAL_GSI_TN;_#type#"/>
<or>
<and>
<taskdep task="&ANAL_GSI_TN;_#type#"/>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<strneq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
</and>
<and>
<taskdep task="&HYBRID_RADAR_REF_TN;_#type#"/>
<or>
{%- for h in cycl_hrs_hyb_fv3lam_ens %}
<streq><left>{{ h }}</left><right><cyclestr>@H</cyclestr></right></streq>
{%- endfor %}
</or>
</and>
</or>
{%- endif %}
</and>
</dependency>

</task>
Expand Down Expand Up @@ -1315,6 +1315,13 @@ MODULES_RUN_TASK_FP script.
</dependency>

</task>
</metatask>
</metatask>

<metatask mode="serial">

<var name="fhr"> {% for h in range(0, postproc_long_len_hrs+1) %}{{ " %03d" % h }}{% endfor %} </var>
<var name="type"> {% for h in range(0, postproc_len_hrs+1) %}{{ " normal" }}{% endfor %} {% for h in range(postproc_len_hrs+1, postproc_long_len_hrs+1) %}{{ " long" }}{% endfor %} </var>

<task name="&RUN_WGRIB2_TN;{{ uscore_ensmem_name }}_f#fhr#" cycledefs="postproc_#type#" maxtries="{{ maxtries_run_wgrib2 }}">

Expand Down Expand Up @@ -1343,7 +1350,6 @@ MODULES_RUN_TASK_FP script.

</task>

</metatask>
</metatask>

{% if do_bufrsnd %}
Expand Down Expand Up @@ -1609,12 +1615,13 @@ MODULES_RUN_TASK_FP script.

<command>&JOBSDIR;/../scripts/exregional_archive.ksh</command>
<cores>1</cores>
<walltime>04:00:00</walltime>
<walltime>08:00:00</walltime>
<memory>24G</memory>
<jobname>&TAG;_&ARCHIVE_TN;</jobname>
<join><cyclestr>&LOGDIR;/&ARCHIVE_TN;_@Y@m@d@H.log</cyclestr></join>

<envar><name>GLOBAL_VAR_DEFNS_FP</name><value>&GLOBAL_VAR_DEFNS_FP;</value></envar>
<envar><name>CDATE</name><value><cyclestr>@Y@m@d@H</cyclestr></value></envar>

</task>
{%- endif %}
Expand Down