Skip to content

Commit

Permalink
[develop] Fix issues on AQM and NCO mode caused by new YAML interface…
Browse files Browse the repository at this point in the history
… PR #676 (#722)

* Fix AQM configuration issues on both community and nco modes.
* Fix workflow entity issues on nco mode.
  • Loading branch information
chan-hoo authored Apr 25, 2023
1 parent 0f19530 commit e0655f1
Show file tree
Hide file tree
Showing 26 changed files with 138 additions and 119 deletions.
7 changes: 6 additions & 1 deletion etc/lmod-setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ else
set L_MACHINE=$1
endif

source /etc/csh.login
if ( "$L_MACHINE" != wcoss2 ) then
source /etc/csh.login
endif

if ( "$L_MACHINE" == macos ) then
arch=$(uname -m)
Expand Down Expand Up @@ -53,6 +55,9 @@ else if ( "$L_MACHINE" == odin ) then
module --initial_load --no_redirect restore
setenv MODULEPATH "/oldscratch/ywang/external/hpc-stack/modulefiles/mpi/intel/2020/cray-mpich/7.7.16:/oldscratch/ywang/external/hpc-stack/modulefiles/compiler/intel/2020:/oldscratch/ywang/external/hpc-stack/modulefiles/core:/oldscratch/ywang/external/hpc-stack/modulefiles/stack:/opt/cray/pe/perftools/21.02.0/modulefiles:/opt/cray/ari/modulefiles:/opt/cray/pe/craype-targets/default/modulefiles:/opt/cray/pe/modulefiles:/opt/cray/modulefiles:/opt/modulefiles"

else if ( "$L_MACHINE" = wcoss2 ) then
module reset

else
module purge
endif
Expand Down
19 changes: 12 additions & 7 deletions etc/lmod-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ else
L_MACHINE=$1
fi

[[ ${SHELLOPTS} =~ nounset ]] && has_mu=true || has_mu=false
[[ ${SHELLOPTS} =~ errexit ]] && has_me=true || has_me=false
$has_mu && set +u
$has_me && set +e
source /etc/profile
$has_mu && set -u
$has_me && set -e
if [ "$L_MACHINE" != wcoss2 ]; then
[[ ${SHELLOPTS} =~ nounset ]] && has_mu=true || has_mu=false
[[ ${SHELLOPTS} =~ errexit ]] && has_me=true || has_me=false
$has_mu && set +u
$has_me && set +e
source /etc/profile
$has_mu && set -u
$has_me && set -e
fi

if [ "$L_MACHINE" = macos ]; then
arch=$(uname -m)
Expand Down Expand Up @@ -56,6 +58,9 @@ elif [ "$L_MACHINE" = odin ]; then
module --initial_load --no_redirect restore
export MODULEPATH="/oldscratch/ywang/external/hpc-stack/modulefiles/mpi/intel/2020/cray-mpich/7.7.16:/oldscratch/ywang/external/hpc-stack/modulefiles/compiler/intel/2020:/oldscratch/ywang/external/hpc-stack/modulefiles/core:/oldscratch/ywang/external/hpc-stack/modulefiles/stack:/opt/cray/pe/perftools/21.02.0/modulefiles:/opt/cray/ari/modulefiles:/opt/cray/pe/craype-targets/default/modulefiles:/opt/cray/pe/modulefiles:/opt/cray/modulefiles:/opt/modulefiles"

elif [ "$L_MACHINE" = wcoss2 ]; then
module reset

else
module purge
fi
11 changes: 11 additions & 0 deletions jobs/JREGIONAL_PRE_POST_STAT
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ job_postamble
#
#-----------------------------------------------------------------------
#
# Remove post_complete flag file.
#
#-----------------------------------------------------------------------
#
post_complete_file="${COMIN}/post_${PDY}${cyc}_task_complete.txt"
if [ -f ${post_complete_file} ] ; then
rm_vrfy -f ${post_complete_file}
fi
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/func-
# tion.
#
Expand Down
14 changes: 6 additions & 8 deletions jobs/JREGIONAL_RUN_POST
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,14 @@ Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
#
if [ "${FCST_LEN_HRS}" = "-1" ]; then
for i_cdate in "${!ALL_CDATES[@]}"; do
if [ "${ALL_CDATES[$i_cdate]}" = "${PDY}${cyc}" ]; then
FCST_LEN_HRS="${FCST_LEN_CYCL_ALL[$i_cdate]}"
break
fi
done
if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}

fcst_len_hrs=$( printf "%03d" "${FCST_LEN_HRS}" )
if [ "${fhr}" = "${fcst_len_hrs}" ]; then
touch "${COMIN}/${TN_RUN_POST}_${PDY}${cyc}_task_complete.txt"
touch "${COMIN}/post_${PDY}${cyc}_task_complete.txt"
fi
fi
#
Expand Down
37 changes: 16 additions & 21 deletions parm/wflow/aqm_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ task_nexus_gfs_sfc:
datadep_gfs:
attrs:
age: 00:00:00:05
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}:00:00">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
streq:
left: retro
right: '{% if not workflow.DO_REAL_TIME %}retro{% endif %}'
Expand Down Expand Up @@ -117,12 +117,12 @@ task_aqm_ics_ext:
task_aqm_ics:
<<: *default_aqm
attrs:
cycledefs: cycled
cycledefs: cycled_from_second
maxtries: '2'
command: '&LOAD_MODULES_RUN_TASK_FP; "aqm_ics" "&JOBSdir;/JREGIONAL_AQM_ICS"'
envars:
<<: *default_vars
PREV_CYCLE_DIR: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}">&COMIN_DIR;</cyclestr>'
PREV_CYCLE_DIR: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}:00:00">&COMIN_DIR;</cyclestr>'
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
dependency:
and:
Expand All @@ -133,11 +133,11 @@ task_aqm_ics:
datadep_date_tag_tracer:
attrs:
age: 00:00:00:05
text: '<cyclestr offset="-{{- workflow.INCR_CYCL_FREQ -}}">&COMIN_DIR;</cyclestr>/RESTART/<cyclestr>@Y@m@d.@H@M@S.fv_tracer.res.tile1.nc</cyclestr>'
text: '<cyclestr offset="-{{- workflow.INCR_CYCL_FREQ -}}:00:00">&COMIN_DIR;</cyclestr>/RESTART/<cyclestr>@Y@m@d.@H@M@S.fv_tracer.res.tile1.nc</cyclestr>'
datadep_tracer:
attrs:
age: 00:00:00:05
text: <cyclestr offset="-{{- workflow.INCR_CYCL_FREQ -}}">&COMIN_DIR;</cyclestr>/RESTART/fv_tracer.res.tile1.nc
text: <cyclestr offset="-{{- workflow.INCR_CYCL_FREQ -}}:00:00">&COMIN_DIR;</cyclestr>/RESTART/fv_tracer.res.tile1.nc

task_aqm_lbcs:
<<: *default_aqm
Expand All @@ -154,22 +154,14 @@ task_pre_post_stat:
command: '&LOAD_MODULES_RUN_TASK_FP; "pre_post_stat" "&JOBSdir;/JREGIONAL_PRE_POST_STAT"'
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
dependency:
taskdep:
attrs:
task: run_fcst_mem000
#or_do_post:
# and_inline_post: # If inline post ran, wait on the forecast task to complete
# not:
# taskvalid:
# attrs:
# task: run_post_mem000_f000
# and_run_post: # If post was meant to run, wait on the whole post metatask
# taskvalid:
# attrs:
# task: run_post_mem000_f000
# metataskdep:
# attrs:
# metatask: run_post_mem000
or:
datadep:
attrs:
age: 00:00:00:05
text: !cycstr '&COMIN_DIR;/post_@Y@m@d@H_task_complete.txt'
metataskdep:
attrs:
metatask: run_ens_post

task_post_stat_o3:
<<: *default_aqm
Expand All @@ -187,6 +179,7 @@ task_post_stat_pm25:
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
memory: 120G
dependency:
taskdep:
attrs:
task: pre_post_stat

Expand All @@ -196,6 +189,7 @@ task_bias_correction_o3:
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
memory: 120G
dependency:
taskdep:
attrs:
task: pre_post_stat

Expand All @@ -205,6 +199,7 @@ task_bias_correction_pm25:
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
memory: 120G
dependency:
taskdep:
attrs:
task: pre_post_stat

4 changes: 2 additions & 2 deletions parm/wflow/coldstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ task_get_extrn_ics:
datadep_gfs:
attrs:
age: 00:00:00:05
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}:00:00">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
streq:
left: retro
right: '{% if not workflow.DO_REAL_TIME %}retro{% endif %}'
Expand All @@ -68,7 +68,7 @@ task_get_extrn_lbcs:
datadep_gfs:
attrs:
age: 00:00:00:05
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
text: '<cyclestr offset="-{{ workflow.INCR_CYCL_FREQ }}:00:00">&COMINgfs;/gfs.@Y@m@d/@H/atmos</cyclestr>'
streq:
left: retro
right: '{% if not workflow.DO_REAL_TIME %}retro{% endif %}'
Expand Down
8 changes: 5 additions & 3 deletions parm/wflow/default_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ rocoto:
entities:
ACCOUNT: '{{ user.ACCOUNT }}'
CCPA_OBS_DIR: '{{ platform.CCPA_OBS_DIR }}'
COMIN_DIR: '{% if user.RUN_ENVIR == "nco" %}{{ nco.COMIN_BASEDIR }}/{{ nco.RUN }}.@Y@m@d/@H {% else %}{{ nco.COMIN_BASEDIR }}/@Y@m@d@H{% endif %}'
COMIN_DIR: '{% if user.RUN_ENVIR == "nco" %}{{"{}/{}.@Y@m@d/@H".format(nco.COMIN_BASEDIR,nco.RUN)}}{% else %}{{"{}/@Y@m@d@H".format(workflow.EXPTDIR)}}{% endif %}'
COMINgfs: '{{ platform.get("COMINgfs") }}'
FCST_DIR: '{{ nco.DATAROOT }}/run_fcst.{{ workflow.WORKFLOW_ID }}_@Y@m@d@H'
FCST_DIR: '{% if user.RUN_ENVIR == "nco" %}{{"{}/run_fcst_mem#mem#.{}_@Y@m@d@H".format(nco.DATAROOT,workflow.WORKFLOW_ID)}}{% else %}{{"{}/@Y@m@d@H".format(workflow.EXPTDIR)}}{% endif %}'
GLOBAL_VAR_DEFNS_FP: '{{ workflow.GLOBAL_VAR_DEFNS_FP }}'
JOBSdir: '{{ user.JOBSdir }}'
LOAD_MODULES_RUN_TASK_FP: '{{ workflow.LOAD_MODULES_RUN_TASK_FP }}'
Expand All @@ -31,7 +31,7 @@ rocoto:
WARMSTART_CYCLE_DIR: '{{ workflow.WARMSTART_CYCLE_DIR }}'
WORKFLOW_ID: '{{ workflow.WORKFLOW_ID }}'
attrs:
cyclethrottle: "20"
cyclethrottle: "200"
realtime: "F"
scheduler: '{{ platform.SCHED }}'
taskthrottle: "1000"
Expand All @@ -40,6 +40,8 @@ rocoto:
- !startstopfreq ['{{workflow.DATE_FIRST_CYCL}}', '{{workflow.DATE_FIRST_CYCL}}', '{{workflow.INCR_CYCL_FREQ}}']
forecast:
- !startstopfreq ['{{workflow.DATE_FIRST_CYCL}}', '{{workflow.DATE_LAST_CYCL}}', '{{workflow.INCR_CYCL_FREQ}}']
cycled_from_second:
- !startstopfreq ['{%- if workflow.DATE_FIRST_CYCL != workflow.DATE_LAST_CYCL %}{{ [workflow.DATE_FIRST_CYCL[0:8], "{:02d}".format(workflow.INCR_CYCL_FREQ)]|join }}{%- else %}{{workflow.DATE_FIRST_CYCL}}{%- endif %}', '{{workflow.DATE_LAST_CYCL}}', '{{workflow.INCR_CYCL_FREQ}}']
log: !cycstr '&LOGDIR;/FV3LAM_wflow.{% if user.RUN_ENVIR == "nco" %}{{ workflow.WORKFLOW_ID + "." }}{% endif %}log'
tasks:
taskgroups: '{{ ["parm/wflow/prep.yaml", "parm/wflow/coldstart.yaml", "parm/wflow/post.yaml"]|include }}'
41 changes: 23 additions & 18 deletions scripts/exregional_aqm_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ else
print_info_msg "$VERBOSE" "
All executables will be submitted with command \'${RUN_CMD_AQMLBC}\'."
fi

#
#-----------------------------------------------------------------------
#
Expand All @@ -88,12 +87,14 @@ cd_vrfy $DATA
#
#-----------------------------------------------------------------------
#
yyyymmdd="${PDY}"
mm="${PDY:4:2}"

CDATE_MOD=$( $DATE_UTIL --utc --date "${PDY} ${cyc} UTC - ${EXTRN_MDL_LBCS_OFFSET_HRS} hours" "+%Y%m%d%H" )
yyyymmdd=${CDATE_MOD:0:8}
mm="${CDATE_MOD:4:2}"
hh="${CDATE_MOD:8:2}"

if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))
if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi
LBC_SPEC_FCST_HRS=()
Expand All @@ -119,7 +120,7 @@ The chemical LBC files do not exist:
for hr in 0 ${LBC_SPEC_FCST_HRS[@]}; do
fhr=$( printf "%03d" "${hr}" )
if [ -r ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.gfs_bndy.tile7.f${fhr}.nc ]; then
ncks -A ${chem_lbcs_fn} ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.gfs_bndy.tile7.f${fhr}.nc
ncks -A ${chem_lbcs_fn} ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.gfs_bndy.tile7.f${fhr}.nc
fi
done

Expand All @@ -136,36 +137,40 @@ fi
#-----------------------------------------------------------------------
#
if [ ${DO_AQM_GEFS_LBCS} = "TRUE" ]; then

RUN_CYC="${cyc}"
CDATE_MOD=$( $DATE_UTIL --utc --date "${PDY} ${cyc} UTC - ${EXTRN_MDL_LBCS_OFFSET_HRS} hours" "+%Y%m%d%H" )
PDY_MOD=${CDATE_MOD:0:8}
AQM_GEFS_FILE_CYC=${AQM_GEFS_FILE_CYC:-"${CDATE_MOD:8:2}"}

AQM_GEFS_FILE_CYC=${AQM_GEFS_FILE_CYC:-"${hh}"}
AQM_GEFS_FILE_CYC=$( printf "%02d" "${AQM_GEFS_FILE_CYC}" )

GEFS_CYC_DIFF=$(( cyc - AQM_GEFS_FILE_CYC ))
if [ "${GEFS_CYC_DIFF}" -lt "0" ]; then
TSTEPDIFF=$( printf "%02d" $(( 24 + ${GEFS_CYC_DIFF} )) )
else
TSTEPDIFF=$( printf "%02d" ${GEFS_CYC_DIFF} )
fi

AQM_MOFILE_FN="${AQM_GEFS_FILE_PREFIX}.t${AQM_GEFS_FILE_CYC}z.atmf"
if [ ${DO_REAL_TIME} = "TRUE" ]; then
AQM_MOFILE_FP="${COMINgefs}/gefs.${PDY_MOD}/${AQM_GEFS_FILE_CYC}/chem/sfcsig/${AQM_MOFILE_FN}"
if [ "${DO_REAL_TIME}" = "TRUE" ]; then
AQM_MOFILE_FP="${COMINgefs}/gefs.${yyyymmdd}/${AQM_GEFS_FILE_CYC}/chem/sfcsig/${AQM_MOFILE_FN}"
else
AQM_MOFILE_FP="${AQM_GEFS_DIR}/${PDY}/${AQM_GEFS_FILE_CYC}/${AQM_MOFILE_FN}"
AQM_MOFILE_FP="${AQM_GEFS_DIR}/${yyyymmdd}/${AQM_GEFS_FILE_CYC}/${AQM_MOFILE_FN}"
fi

# Check if GEFS aerosol files exist
for hr in 0 ${LBC_SPEC_FCST_HRS[@]}; do
fhr=$( printf "%03d" "${hr}" )
hr_mod=$(( hr + EXTRN_MDL_LBCS_OFFSET_HRS ))
fhr=$( printf "%03d" "${hr_mod}" )
AQM_MOFILE_FHR_FP="${AQM_MOFILE_FP}${fhr}.nemsio"
if [ ! -e "${AQM_MOFILE_FHR_FP}" ]; then
print_err_msg_exit "The GEFS file (AQM_MOFILE_FHR_FP) for LBCs does not exist:
AQM_MOFILE_FHR_FP = \"${AQM_MOFILE_FHR_FP}\""
fi
done

GEFS_CYC_DIFF=$( printf "%02d" "$(( RUN_CYC - AQM_GEFS_FILE_CYC ))" )
NUMTS="$(( FCST_LEN_HRS / LBC_SPEC_INTVL_HRS + 1 ))"

cat > gefs2lbc-nemsio.ini <<EOF
&control
tstepdiff=${GEFS_CYC_DIFF}
tstepdiff=${TSTEPDIFF}
dtstep=${LBC_SPEC_INTVL_HRS}
bndname='aothrj','aecj','aorgcj','asoil','numacc','numcor'
mofile='${AQM_MOFILE_FP}','.nemsio'
Expand Down
5 changes: 3 additions & 2 deletions scripts/exregional_bias_correction_o3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ if [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then
id_domain=793
fi

if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))
if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi

Expand Down
7 changes: 4 additions & 3 deletions scripts/exregional_bias_correction_pm25.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ yyyymm_m3=${PDYm3:0:6}
if [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then
id_domain=793
fi
if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))

if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi


#-----------------------------------------------------------------------------
# STEP 1: Retrieve AIRNOW observation data
#-----------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions scripts/exregional_get_extrn_mdl_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ if [ "${ICS_OR_LBCS}" = "ICS" ]; then
elif [ "${ICS_OR_LBCS}" = "LBCS" ]; then
file_set="fcst"
first_time=$((TIME_OFFSET_HRS + LBC_SPEC_INTVL_HRS))
if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))

if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi
last_time=$((TIME_OFFSET_HRS + FCST_LEN_HRS))
Expand Down
5 changes: 3 additions & 2 deletions scripts/exregional_make_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ DATA="${DATA}/tmp_LBCS"
mkdir_vrfy -p "$DATA"
cd_vrfy $DATA

if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))
if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi
LBC_SPEC_FCST_HRS=()
Expand Down
5 changes: 3 additions & 2 deletions scripts/exregional_nexus_emission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ yyyymmdd="${PDY}"

NUM_SPLIT_NEXUS=$( printf "%02d" ${NUM_SPLIT_NEXUS} )

if [ "${FCST_LEN_HRS}" = "-1" ]; then
CYCLE_IDX=$(( ${cyc} / ${INCR_CYCL_FREQ} ))
if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then
cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} ))
CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} ))
FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]}
fi

Expand Down
Loading

0 comments on commit e0655f1

Please sign in to comment.