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

Update Hera build to Rocky 8 #969

Merged
merged 12 commits into from
Mar 18, 2024
Prev Previous commit
Next Next commit
remove obsolete and replace remaining solo references with wxflow (#958)
  • Loading branch information
RussTreadon-NOAA committed Mar 11, 2024
commit edd37b64515d402ed7ca28f714b810be6f3af307
22 changes: 0 additions & 22 deletions ush/ufsda/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import os
import re
import solo.date
import stat
import subprocess

Expand All @@ -13,27 +12,6 @@
}


def calc_fcst_steps(fcst_step, win_length):
"""
function to return a list of forecast steps
for a given fcst_step (forecast step)
and win_length (window length)
"""
# need to get +- half of the window length
# assumes only hours for now, probably bad...
# also assumes the window is symmetric, probably also bad
h = int(re.findall('PT(\\d+)H', win_length)[0])
h2 = int(re.findall('PT(\\d+)H', fcst_step)[0])
assert h % h2 == 0, "win_length must be divisible by fcst_step"
if h2 > h//2:
return [fcst_step]
start = f'PT{h-h//2}H'
end = f'PT{h+h//2}H'
# solo has a nice utility for this
fcst_steps = solo.date.step_sequence(start, end, fcst_step)
return fcst_steps


def isTrue(str_in):
""" isTrue(str_in)
- function to translate shell variables to python logical variables
Expand Down
3 changes: 1 addition & 2 deletions ush/ufsda/ufs_yaml.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import datetime
import os
from solo.yaml_file import YAMLFile
from solo.template import TemplateConstants, Template
from wxflow import YAMLFile, TemplateConstants, Template


def gen_yaml(outyaml, templateyaml):
Expand Down
2 changes: 0 additions & 2 deletions ush/ufsda/yamltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import os
import re
import logging
from solo.yaml_file import YAMLFile
from solo.template import TemplateConstants, Template
from ufsda.misc_utils import isTrue
import wxflow

Expand Down
Loading