Commit b8c152e3 authored by Cynthia Crowley's avatar Cynthia Crowley

Merge branch 'add-results-vars' of into add-results-vars

parents 521e41ed 4b06ed02
Pipeline #76023382 failed with stages
in 22 minutes and 11 seconds
from typing import List, Optional
from config_cfs import CFSConfig
from wsim_workflow import dates
class CFSConfigFast(CFSConfig):
# Skip 6-month, >12-month integration periods:
......@@ -10,7 +13,10 @@ class CFSConfigFast(CFSConfig):
# Use only the first 3 forecast ensemble members:
def forecast_ensemble_members(self, yearmon, *, lag_hours: Optional[int] = None):
return CFSConfig.forecast_ensemble_members(self, yearmon, lag_hours=lag_hours)[:2]
# Forecast out only 3 months instead of 9:
def forecast_targets(self, yearmon):
return dates.get_next_yearmons(yearmon, 3)
config = CFSConfigFast
\ No newline at end of file
......@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function # Avoid bombing in Python 2 before we even hit our version check
from __future__ import print_function # Avoid bombing in Python 2 before we even hit our version check
import sys
......@@ -27,13 +27,33 @@ import argparse
from wsim_workflow import workflow
import importlib
import importlib.util
import types
from importlib.machinery import SourceFileLoader
import sys
def load_module(module):
return importlib.import_module('wsim_workflow.output.{}'.format(module))
def load_config(path, source, derived):
return SourceFileLoader("config", path).load_module().config(source, derived)
dirname = os.path.dirname(path)
# Temporarily add config module directory to the system path
# This feels wrong, but I can't find another method that allows
# one config to derive from another (as config_fast inherits from
# config_cfs)
sys.path.insert(0, dirname)
loader = SourceFileLoader("config", path)
mod = types.ModuleType(
return mod.config(source, derived)
def parse_args(args):
parser = argparse.ArgumentParser('Generate a Makefile for WSIM data processing')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment