-
Notifications
You must be signed in to change notification settings - Fork 208
[develop] Eliminate Wave Postprocessing Warnings and Suppress Creation of Empty Output Directories #4752
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?
[develop] Eliminate Wave Postprocessing Warnings and Suppress Creation of Empty Output Directories #4752
Changes from all commits
bf8b69a
44410fa
8e82fc9
fbf9f85
6e801a6
8510e0f
7395367
87d127a
93cd8fd
a7f950e
e24f683
fc2c357
57c20b7
d826acd
473c15f
bf0837d
c028c67
d4c6d89
8078ef8
36a4054
dcb090a
e9791b6
2a842b0
0c91afc
33ffcf7
79e24b7
ea6aecd
1a97667
4b2a123
4123764
f52a78f
aa8a685
1b6265f
1cba43f
b659fe9
bee4160
5862563
f9327a9
81828b6
45b6215
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 |
|---|---|---|
|
|
@@ -55,7 +55,6 @@ declare -rx COMOUT_ICE_LETKF="${ROTDIR}/${RUN}.${PDY}/${cyc}/analysis/ice/letkf" | |
|
|
||
| declare -rx COMOUT_CONF="${ROTDIR}/${RUN}.${PDY}/${cyc}/ensstat/conf" | ||
|
|
||
| if [[ ! -d "${COMOUT_OCEAN_LETKF}" ]]; then mkdir -p "${COMOUT_OCEAN_LETKF}"; fi | ||
|
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 is not always used right now, but is when marine LETKF runs. This is expected to be the default
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. @AndrewEichmann-NOAA These directories are created by the Python workflow engine (via the YAML mkdir: list). So removing the shell |
||
| if [[ ! -d "${COMOUT_ICE_LETKF}" ]]; then mkdir -p "${COMOUT_ICE_LETKF}"; fi | ||
| if [[ ! -d ${COMOUT_CONF} ]]; then mkdir -p "${COMOUT_CONF}"; fi | ||
| ############################################## | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| #--------------------------------------------------------- | ||
| # cpfsd.sh | ||
| # | ||
| # A wrapper around cpfs that automatically creates the | ||
| # destination directory if it does not already exist | ||
| # before copying the file. | ||
| # | ||
| # USAGE: cpfsd <source> <destination> | ||
| # source - path to the source file | ||
| # destination - path to the destination file | ||
| #--------------------------------------------------------- | ||
|
|
||
| dest="${!#}" | ||
| dest_dir=$(dirname "${dest}") | ||
| if [[ ! -d "${dest_dir}" ]]; then | ||
| echo "INFO: Directory ${dest_dir} does not exist, creating..." | ||
| mkdir -p "${dest_dir}" | ||
| err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| echo "ERROR: Failed to create destination directory ${dest_dir}" | ||
| exit "${err}" | ||
| fi | ||
| fi | ||
| cpfs "$@" | ||
| err=$? | ||
| if [[ ${err} -ne 0 ]]; then | ||
| echo "ERROR: cpfs failed to copy to ${dest}" | ||
| exit "${err}" | ||
| fi |
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.
This is still used
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.
@AndrewEichmann-NOAA
JGLOBAL_MARINE_ANALYSIS_FINALIZEdeclares the variable but never actually uses it. The real usage happens in the FORECAST job viaCICE_out()inush/forecast_postdet.sh.This PR, included the directory creation inside
if [[ -s "${cmdfile}" ]] (L780 and L910). This means the directory is only created when there are actual CICE or MOM6 restart files to copy.