Skip to content

Commit

Permalink
Merge ed9f27d into d397921
Browse files Browse the repository at this point in the history
  • Loading branch information
jomey committed May 27, 2021
2 parents d397921 + ed9f27d commit 4cc623c
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions awsm/framework/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,37 +59,10 @@ def __init__(self, config):
# self.do_smrf_ipysnobal = \
# self.config['awsm master']['run_smrf_ipysnobal']
# self.do_ipysnobal = self.config['awsm master']['run_ipysnobal']
self.do_forecast = False
if 'gridded' in self.config and self.do_smrf:
self.do_forecast = self.config['gridded'].get(
'hrrr_forecast_flag', False)

# WARNING: The value here is inferred in SMRF.data.loadGrid. A
# change here requires a change there
self.n_forecast_hours = 18

# store smrf version if running smrf
self.smrf_version = smrf.__version__

if self.do_forecast:
self.tmp_log.append('Forecasting set to True')

# self.fp_forecastdata = self.config['gridded']['wrf_file']
# if self.fp_forecastdata is None:
# self.tmp_err.append('Forecast set to true, '
# 'but no grid file given')
# print("Errors in the config file. See configuration "
# "status report above.")
# print(self.tmp_err)
# sys.exit()

if self.config['system']['threading']:
# Can't run threaded smrf if running forecast_data
self.tmp_err.append('Cannot run SMRF threaded with'
' gridded input data')
print(self.tmp_err)
sys.exit()

# how often to output form iSnobal
self.output_freq = self.config['awsm system']['output_frequency']
# number of timesteps to run if ou don't want to run the whole thing
Expand Down Expand Up @@ -319,16 +292,6 @@ def run_smrf_ipysnobal(self):
PySnobal(self).run_smrf_ipysnobal()
# smrf_ipy.run_smrf_ipysnobal(self)

# def run_awsm_daily(self):
# """
# This function runs
# :mod:`awsm.interface.smrf_ipysnobal.run_smrf_ipysnobal` on an
# hourly output from Pysnobal, outputting to daily folders, similar
# to the HRRR froecast.
# """

# smin.run_awsm_daily(self)

def run_ipysnobal(self):
"""
Run PySnobal from previously run smrf forcing data
Expand Down Expand Up @@ -550,11 +513,6 @@ def run_awsm(config):
"""

with AWSM(config) as a:
if a.do_forecast:
runtype = 'forecast'
else:
runtype = 'smrf'

if not a.config['isnobal restart']['restart_crash']:
if a.do_smrf:
a.run_smrf()
Expand All @@ -569,7 +527,4 @@ def run_awsm(config):

# Run iPySnobal from SMRF in memory
if a.model_type == 'smrf_ipysnobal':
if a.daily_folders:
a.run_awsm_daily()
else:
a.run_smrf_ipysnobal()
a.run_smrf_ipysnobal()

0 comments on commit 4cc623c

Please sign in to comment.