-
Notifications
You must be signed in to change notification settings - Fork 203
Update bash ex-scripts to be linter compliant #4151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
b0ee5dd
f4e93b5
85357db
3f23e96
c658195
d39104f
51d49d3
f1743c0
61419d3
7799ca5
cd4f1ea
006ab6c
407affd
e19b80e
c7e91f2
f59183c
0cf2240
3f56b21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,42 +9,35 @@ | |
| ################################################################################ | ||
| export err=0 | ||
|
|
||
| data_available=0 | ||
| if [[ -s "${oznstat}" ]]; then | ||
| #------------------------------------------------------------------ | ||
| # Copy data files file to local data directory. | ||
| # Untar oznstat file. | ||
| #------------------------------------------------------------------ | ||
|
|
||
| if [[ -s ${oznstat} ]]; then | ||
| data_available=1 | ||
| cpreq "${oznstat}" "./oznstat.${PDY}${cyc}" | ||
|
|
||
| #------------------------------------------------------------------ | ||
| # Copy data files file to local data directory. | ||
| # Untar oznstat file. | ||
| #------------------------------------------------------------------ | ||
| tar -xvf "oznstat.${PDY}${cyc}" | ||
| rm -f "oznstat.${PDY}${cyc}" | ||
|
|
||
| cpreq "${oznstat}" "./oznstat.${PDY}${cyc}" | ||
| netcdf=0 | ||
| for filenc4 in diag*nc4.gz; do | ||
| netcdf=1 | ||
| file=$(echo "${filenc4}" | cut -d'.' -f1-2).gz | ||
| mv "${filenc4}" "${file}" | ||
| done | ||
|
Comment on lines
+24
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs a file existence check. If there are no
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I think this should be reverted to the previous logic. There are some variables that could be removed (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shellcheck doesn't like looping over Recommend we turn on |
||
|
|
||
| tar -xvf "oznstat.${PDY}${cyc}" | ||
| rm -f "oznstat.${PDY}${cyc}" | ||
| export OZNMON_NETCDF=${netcdf} | ||
|
|
||
| netcdf=0 | ||
| count=$(ls diag* | grep ".nc4" | wc -l) | ||
| if [ "${count}" -gt 0 ] ; then | ||
| netcdf=1 | ||
| for filenc4 in $(ls diag*nc4.gz); do | ||
| file=$(echo "${filenc4}" | cut -d'.' -f1-2).gz | ||
| mv "${filenc4}" "${file}" | ||
| done | ||
| fi | ||
|
|
||
| export OZNMON_NETCDF=${netcdf} | ||
|
|
||
| "${USHgfs}/ozn_xtrct.sh" && true | ||
| export err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| err_exit "ozn_xtrct.sh failed!" | ||
| fi | ||
| "${USHgfs}/ozn_xtrct.sh" && true | ||
| export err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| err_exit "ozn_xtrct.sh failed!" | ||
| fi | ||
|
|
||
| else | ||
| # oznstat file not found | ||
| export err=1 | ||
| err_exit "${oznstat} does not exist!" | ||
| # oznstat file not found | ||
| export err=1 | ||
| err_exit "${oznstat} does not exist!" | ||
| fi | ||
| exit 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this set at the JJob level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used anymore with the switch to using
run_mpmd.sh.