Skip to content

Commit

Permalink
update snow ens
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryMartin-NOAA committed Jun 6, 2024
1 parent 99fdfbe commit 42b3fbe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/exglobal_snow_ensemble_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
anl.regridDetBkg()
anl.regridDetInc()
anl.recenterEns()
anl.addIncrements()
anl.finalize()
13 changes: 13 additions & 0 deletions ush/python/pygfs/task/snowens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,19 @@ def recenterEns(self) -> None:
self : Analysis
Instance of the SnowEnsAnalysis object
"""
logger.info("Running recentering code")
exec_cmd = Executable(localconf.APRUN_ESNOWANL)
exec_name = os.path.join(localconf.DATA, 'gdasapp_land_ensrecenter.x')
exec_cmd.add_default_arg(exec_name)
exec_cmd.add_default_arg(localconf.jedi_yaml)

try:
logger.debug(f"Executing {exec_cmd}")
exec_cmd()
except OSError:
raise OSError(f"Failed to execute {exec_cmd}")
except Exception:
raise WorkflowException(f"An error occured during execution of {exec_cmd}")

@logit(logger)
def finalize(self) -> None:
Expand Down

0 comments on commit 42b3fbe

Please sign in to comment.