Skip to content
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

Fix typo and crontab issue on wcoss dell in workflow python scripts #750

Merged
merged 4 commits into from
Apr 28, 2022
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 ush/generate_FV3LAM_wflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def generate_FV3LAM_wflow():
CRONTAB_LINE = \"{CRONTAB_LINE}\"''',verbose=VERBOSE)

if MACHINE == "WCOSS_DELL_P3":
run_command(f'''printf "%s" '{CRONTAB_LINE}' >> f"/u/{USER}/cron/mycrontab"''')
run_command(f'''printf "%s\n" '{CRONTAB_LINE}' >> "/u/{USER}/cron/mycrontab"''')
else:
# Add a newline to the end of crontab_contents only if it is not empty.
# This is needed so that when CRONTAB_LINE is printed out, it appears on
Expand Down
6 changes: 3 additions & 3 deletions ush/get_crontab_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def get_crontab_contents(called_from_cron):
print_input_args(locals())

#import all env vars
IMPORTS = ["MACHINE"]
IMPORTS = ["MACHINE", "USER"]
import_vars(env_vars=IMPORTS)

#
# Make sure called_from_cron is set to a valid value.
#
Expand Down Expand Up @@ -79,5 +79,5 @@ def test_get_crontab_contents(self):
self.assertEqual(crontab_cmd, "crontab")
def setUp(self):
define_macos_utilities();
set_env_var('DEBUG','FALSE')
set_env_var('DEBUG',False)
set_env_var('MACHINE', 'HERA')
1 change: 0 additions & 1 deletion ush/retrieve_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ def parse_args():
output = subprocess.run('which hsi',
check=True,
shell=True,
capture_output=True,
)
except subprocess.CalledProcessError:
logging.error('You requested the hpss data store, but ' \
Expand Down
2 changes: 1 addition & 1 deletion ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def setup():
#
#-----------------------------------------------------------------------
global USE_MERRA_CLIMO
if USE_MERRA_CLIMO == "FV3_GFS_v15_thompson_mynn_lam3km":
if CCPP_PHYS_SUITE == "FV3_GFS_v15_thompson_mynn_lam3km":
USE_MERRA_CLIMO=True
#
#-----------------------------------------------------------------------
Expand Down