Skip to content

Commit

Permalink
Update file location utility scripts for current global-workflow moni…
Browse files Browse the repository at this point in the history
…tor data location
  • Loading branch information
RussTreadon-NOAA committed Aug 19, 2024
2 parents e1f9f21 + 94588d6 commit 4e5feb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
16 changes: 2 additions & 14 deletions ush/find_last_cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# The supported directory structures are:
# Operations: $tankdir/$net/version/$run.$pdy/$hh/atmos/$monitor
# Workflow : $tankdir/$monitor/stats/$net/$run.$pdy/$hh
# Workflow : $tankdir/$net/$run.$pdy/$hh/products/atmos/$monitor
# Monitors* : $tankdir/stats/$net/$run.$pdy/$hh/$monitor
#
# The get_stats_path.sh script will be used to find a valid path from
Expand Down Expand Up @@ -68,7 +68,6 @@ done
#
path=`${MON_USH}/get_stats_path.sh --net ${net} --run ${run} --tank ${tankdir} --mon ${monitor} --rpath base`


#--------------------------------------------------
# Set search string per monitor
#
Expand Down Expand Up @@ -109,18 +108,7 @@ if [[ ${#path} -gt 0 ]]; then

for hr in $hrs; do

#----------------------------------------------------------------
# The workflow (wkfl) directory structure is a special case
# in that $monitor is the first subdirectory in the $tankdir.
# To take that into account this check is added.
#
wkfl_check=`echo ${path} | grep ${monitor}`
if [[ ${#wkfl_check} -gt 0 ]]; then
wkfl_test=`find -L "${path}/${file}/${hr}/" -maxdepth 2 -mindepth 1 -name "${search}" -printf "%f\n" 2>/dev/null`
else
wkfl_test=""
fi

wkfl_test=`find -L "${path}/${file}/${hr}/products/atmos/${monitor}" -maxdepth 2 -mindepth 1 -name "${search}" -printf "%f\n" 2>/dev/null`
mon_test=`find -L "${path}/${file}/${hr}/${monitor}" -maxdepth 2 -mindepth 1 -name "${search}" -printf "%f\n" 2>/dev/null`
ops_test=`find -L "${path}/${file}/${hr}/atmos/${monitor}" -maxdepth 2 -mindepth 1 -name "${search}" -printf "%f\n" 2>/dev/null`

Expand Down
4 changes: 2 additions & 2 deletions ush/get_stats_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ ops_base=${tankdir}/${net}/${version}
ops_xtn=${run}.${pdy}/${hh}/atmos/${monitor}
ops=${ops_base}/${ops_xtn}

wkf_base=${tankdir}/${monitor}/stats/${net}
wkf_xtn=${run}.${pdy}/${hh}
wkf_base=${tankdir}/${net}
wkf_xtn=${run}.${pdy}/${hh}/products/atmos/${monitor}
wkf=${wkf_base}/${wkf_xtn}

mon_base=${tankdir}/stats/${net}
Expand Down

0 comments on commit 4e5feb7

Please sign in to comment.