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
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_PROCESS_RADARREF
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mkdir_vrfy -p ${workdir}
#-----------------------------------------------------------------------
#
$SCRIPTSDIR/exregional_process_radarref.sh \
CYCLE_DIR="${CYCLE_DIR}" WORKDIR="${workdir}" || \
CYCLE_DIR="${CYCLE_DIR}" cycle_type="${CYCLE_TYPE}" WORKDIR="${workdir}" || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
Expand Down
65 changes: 59 additions & 6 deletions scripts/exregional_nonvarcldanl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ MM=${YYYYMMDDHH:4:2}
DD=${YYYYMMDDHH:6:2}
HH=${YYYYMMDDHH:8:2}
YYYYMMDD=${YYYYMMDDHH:0:8}

#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -168,17 +169,33 @@ else
bkpath=${cycle_dir}${slash_ensmem_subdir}/fcst_fv3lam${cycle_tag}/INPUT
fi

n_iolayouty=$(($IO_LAYOUT_Y-1))
list_iolayout=$(seq 0 $n_iolayouty)

cp_vrfy ${fixgriddir}/fv3_akbk fv3_akbk
cp_vrfy ${fixgriddir}/fv3_grid_spec fv3_grid_spec

if [ -r ${bkpath}/phy_data.nc ]; then # Use background from restart
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc fv3_dynvars
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
ln_vrfy -s ${bkpath}/sfc_data.nc fv3_sfcdata
if [ -r "${bkpath}/coupler.res" ]; then # Use background from warm restart
if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -s ${bkpath}/fv_core.res.tile1.nc fv3_dynvars
ln_vrfy -s ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
ln_vrfy -s ${bkpath}/sfc_data.nc fv3_sfcdata
else
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
ln_vrfy -s ${bkpath}/fv_core.res.tile1.nc.${iii} fv3_dynvars.${iii}
ln_vrfy -s ${bkpath}/fv_tracer.res.tile1.nc.${iii} fv3_tracer.${iii}
ln_vrfy -s ${bkpath}/sfc_data.nc.${iii} fv3_sfcdata.${iii}
ln_vrfy -s ${fixgriddir}/fv3_grid_spec.${iii} fv3_grid_spec.${iii}
done
fi
BKTYPE=0
else # Use background from input (cold start)
ln_vrfy -s ${bkpath}/sfc_data.tile7.halo0.nc fv3_sfcdata
ln_vrfy -snf ${bkpath}/gfs_data.tile7.halo0.nc fv3_dynvars
ln_vrfy -snf ${bkpath}/gfs_data.tile7.halo0.nc fv3_tracer
ln_vrfy -s ${bkpath}/gfs_data.tile7.halo0.nc fv3_dynvars
ln_vrfy -s ${bkpath}/gfs_data.tile7.halo0.nc fv3_tracer
BKTYPE=1
fi

#
Expand Down Expand Up @@ -211,12 +228,47 @@ do
fi
done

# radar reflectivity on esg grid over each subdomain.
process_radarref_path=${cycle_dir}/process_radarref${cycle_tag}
ss=0
for bigmin in 0; do
bigmin=$( printf %2.2i $bigmin )
obs_file=${process_radarref_path}/${bigmin}/RefInGSI3D.dat
if [ "${IO_LAYOUT_Y}" == "1" ]; then
obs_file_check=${obs_file}
else
obs_file_check=${obs_file}.0000
fi
((ss+=1))
num=$( printf %2.2i ${ss} )
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So RefInGSI3D.dat_01, RefInGSI3D.dat_02, RefInGSI3D.dat_03 and RefInGSI3D.dat_04 correspond to t+0, t+15, t+30, t+45 sub cycles? Would it be better to use the sub cycle minutes as the suffix instead of 01, 02, 03, 04?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those numbers will be also used in radar tten and the array of radar tten. It is easy to just use the number.

if [ -r "${obs_file_check}" ]; then
if [ "${IO_LAYOUT_Y}" == "1" ]; then
cp_vrfy "${obs_file}" "RefInGSI3D.dat_${num}"
else
for ii in ${list_iolayout}
do
iii=$(printf %4.4i $ii)
cp_vrfy "${obs_file}.${iii}" "RefInGSI3D.dat.${iii}_${num}"
done
fi
else
print_info_msg "$VERBOSE" "Warning: ${obs_file} does not exist!"
fi
done

#-----------------------------------------------------------------------
#
# Build namelist
#
#-----------------------------------------------------------------------

if [ ${BKTYPE} -eq 1 ]; then
n_iolayouty=1
else
n_iolayouty=$(($IO_LAYOUT_Y))
fi


cat << EOF > gsiparm.anl

&SETUP
Expand All @@ -225,6 +277,7 @@ cat << EOF > gsiparm.anl
iday=${DD},
ihour=${HH},
iminute=00,
fv3_io_layout_y=${n_iolayouty},
/
&RAPIDREFRESH_CLDSURF
dfi_radar_latent_heat_time_period=20.0,
Expand Down
21 changes: 11 additions & 10 deletions scripts/exregional_process_bufr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ print_info_msg "$VERBOSE" "fixgriddir is $fixgriddir"
#-----------------------------------------------------------------------

cp_vrfy ${fixgriddir}/fv3_grid_spec fv3sar_grid_spec.nc
cp_vrfy ${fixgriddir}/geo_em.d01.nc geo_em.d01.nc


#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -215,13 +213,14 @@ fi
# 1 for FV3LAM
#-----------------------------------------------------------------------

cat << EOF > lightning_bufr.namelist
cat << EOF > namelist.lightning
&setup
analysis_time = ${YYYYMMDDHH},
minute=00,
trange_start=-10,
trange_end=10,
bkversion=1,
grid_type = "${PREDEF_GRID_NAME}",
obs_type = "bufr"
/

EOF
Expand All @@ -233,7 +232,7 @@ EOF
#
#-----------------------------------------------------------------------
#
exect="process_Lightning_bufr.exe"
exect="process_Lightning.exe"

if [ -f ${EXECDIR}/$exect ]; then
print_info_msg "$VERBOSE" "
Expand Down Expand Up @@ -270,7 +269,7 @@ obs_file=${OBSPATH}/${YYYYMMDDHH}.${obs_source}.t${HH}z.lgycld.tm00.bufr_d
print_info_msg "$VERBOSE" "obsfile is $obs_file"
run_cloud=false
if [ -r "${obs_file}" ]; then
cp_vrfy "${obs_file}" "NASA_LaRC_cloud.bufr"
cp_vrfy "${obs_file}" "lgycld.bufr_d"
run_cloud=true
else
print_info_msg "$VERBOSE" "Warning: ${obs_file} does not exist!"
Expand All @@ -291,13 +290,13 @@ fi
# = 1 for FV3LAM
#-----------------------------------------------------------------------

cat << EOF > namelist_nasalarc
cat << EOF > namelist.nasalarc
&setup
analysis_time = ${YYYYMMDDHH},
bufrfile='NASALaRCCloudInGSI_bufr.bufr',
npts_rad=1,
npts_rad=3,
ioption = 2,
bkversion=1,
grid_type = "${PREDEF_GRID_NAME}",
/
EOF

Expand Down Expand Up @@ -362,11 +361,13 @@ fi
#
#-----------------------------------------------------------------------

cat << EOF > namelist_metarcld
cat << EOF > namelist.metarcld
&setup
analysis_time = ${YYYYMMDDHH},
prepbufrfile='prepbufr',
twindin=0.5,
metar_impact_radius=15,
grid_type = "${PREDEF_GRID_NAME}",
/
EOF

Expand Down
11 changes: 5 additions & 6 deletions scripts/exregional_process_lightning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ print_info_msg "$VERBOSE" "fixgriddir is $fixgriddir"
#-----------------------------------------------------------------------

cp_vrfy ${fixgriddir}/fv3_grid_spec fv3sar_grid_spec.nc
cp_vrfy ${fixgriddir}/geo_em.d01.nc geo_em.d01.nc

#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -209,12 +208,12 @@ cp_vrfy $BUFR_TABLE prepobs_prep.bufrtable
# = 1 for FV3LAM
#-----------------------------------------------------------------------

cat << EOF > lightning.namelist
cat << EOF > namelist.lightning
&setup
analysis_time = ${YYYYMMDDHH},
NLDN_filenum = ${filenum},
IfAlaska = false,
bkversion=1,
grid_type = "${PREDEF_GRID_NAME}",
obs_type = "nldn_nc"
/

EOF
Expand All @@ -226,7 +225,7 @@ EOF
#
#-----------------------------------------------------------------------
#
exect="process_Lightning_nc.exe"
exect="process_Lightning.exe"

if [ -f ${EXECDIR}/$exect ]; then
print_info_msg "$VERBOSE" "
Expand All @@ -246,7 +245,7 @@ fi
#
#-----------------------------------------------------------------------
#
$APRUN ./${exect} < lightning.namelist > stdout 2>&1 || print_err_msg "\
$APRUN ./${exect} < namelist.lightning > stdout 2>&1 || print_err_msg "\
Call to executable to run lightning (nc) process returned with nonzero exit code."
#
#-----------------------------------------------------------------------
Expand Down
61 changes: 54 additions & 7 deletions scripts/exregional_process_radarref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ with FV3 for the specified cycle.
#
#-----------------------------------------------------------------------
#
valid_args=( "CYCLE_DIR" "WORKDIR")
valid_args=( "CYCLE_DIR" "cycle_type" "WORKDIR")
process_args valid_args "$@"
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -116,6 +116,7 @@ case $MACHINE in
;;
#
esac

#
#-----------------------------------------------------------------------
#
Expand All @@ -134,6 +135,36 @@ MM=${YYYYMMDDHH:4:2}
DD=${YYYYMMDDHH:6:2}
HH=${YYYYMMDDHH:8:2}
YYYYMMDD=${YYYYMMDDHH:0:8}

#
#-----------------------------------------------------------------------
#
# Find cycle type: cold or warm
# BKTYPE=0: warm start
# BKTYPE=1: cold start
#
#-----------------------------------------------------------------------
#
BKTYPE=0
if [ ${DO_SPINUP} == "TRUE" ]; then
if [ ${cycle_type} == "spinup" ]; then
for cyc_start in "${CYCL_HRS_SPINSTART[@]}"; do
if [ ${HH} -eq ${cyc_start} ]; then
BKTYPE=1
fi
done
fi
else
for cyc_start in "${CYCL_HRS_PRODSTART[@]}"; do
if [ ${HH} -eq ${cyc_start} ]; then
BKTYPE=1
fi
done
fi

n_iolayouty=$(($IO_LAYOUT_Y-1))
list_iolayout=$(seq 0 $n_iolayouty)

#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -163,7 +194,19 @@ for bigmin in ${RADARREFL_TIMELEVEL[@]}; do
#
#-----------------------------------------------------------------------

cp_vrfy ${fixgriddir}/fv3_grid_spec fv3sar_grid_spec.nc
if [ ${BKTYPE} -eq 1 ]; then
cp_vrfy ${fixgriddir}/fv3_grid_spec fv3sar_grid_spec.nc
else
if [ "${IO_LAYOUT_Y}" == "1" ]; then
cp_vrfy ${fixgriddir}/fv3_grid_spec fv3sar_grid_spec.nc
else
for ii in $list_iolayout
do
iii=$(printf %4.4i $ii)
cp_vrfy ${fixgriddir}/fv3_grid_spec.${iii} fv3sar_grid_spec.nc.${iii}
done
fi
fi

#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -235,20 +278,24 @@ for bigmin in ${RADARREFL_TIMELEVEL[@]}; do
# = 1 NSSL 1 tile grib2 for single level
# = 4 NSSL 4 tiles binary
# = 8 NSSL 8 tiles netcdf
# bkversion : grid type (background will be used in the analysis)
# 0 for ARW (default)
# 1 for FV3LAM
# fv3_io_layout_y : subdomain of restart files
# analysis_time : process obs used for this analysis date (YYYYMMDDHH)
# dataPath : path of the radar reflectivity mosaic files.
#
#-----------------------------------------------------------------------

cat << EOF > mosaic.namelist
if [ ${BKTYPE} -eq 1 ]; then
n_iolayouty=1
else
n_iolayouty=$(($IO_LAYOUT_Y))
fi

cat << EOF > namelist.mosaic
&setup
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to make it consistent in the naming of namelist files for lightning, mosaic, and ref2tten? such as
namelist.lightning
namelist.mosaic
namelist.ref2tten

tversion=1,
bkversion=1,
analysis_time = ${YYYYMMDDHH},
dataPath = './',
fv3_io_layout_y=${n_iolayouty},
/
EOF

Expand Down
Loading