Skip to content

Commit

Permalink
PR to get the snow da test working (#4)
Browse files Browse the repository at this point in the history
* working save

* changes to get snow test going

* update gdas hash
  • Loading branch information
CoryMartin-NOAA authored and aerorahul committed Jan 25, 2024
1 parent 4fec1ba commit f50d7ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions jobs/JGLOBAL_LAND_ANALYSIS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
export DATA=${DATA:-${DATAROOT}/${RUN}landanl_${cyc}}
source "${HOMEgfs}/ush/jjob_header.sh" -e "landanl" -c "base landanl"

##############################################
Expand Down
1 change: 1 addition & 0 deletions jobs/JGLOBAL_PREP_LAND_OBS
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
export DATA=${DATA:-${DATAROOT}/${RUN}landanl_${cyc}}
source "${HOMEgfs}/ush/jjob_header.sh" -e "preplandobs" -c "base preplandobs"

##############################################
Expand Down
11 changes: 6 additions & 5 deletions ush/python/pygfs/task/land_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LandAnalysis(Analysis):
Class for global land analysis tasks
"""

NMEM_LANDENS = 2 # The size of the land ensemble is fixed at 2. Does this need to be a variable?
NMEM_LANDENS = 2

@logit(logger, name="LandAnalysis")
def __init__(self, config):
Expand Down Expand Up @@ -74,7 +74,7 @@ def prepare_GTS(self) -> None:
# create a temporary dict of all keys needed in this method
localconf = AttrDict()
keys = ['HOMEgfs', 'DATA', 'current_cycle', 'COM_OBS', 'COM_ATMOS_RESTART_PREV',
'OPREFIX', 'CASE', 'ntiles']
'OPREFIX', 'CASE', 'OCNRES', 'ntiles']
for key in keys:
localconf[key] = self.task_config[key]

Expand Down Expand Up @@ -198,7 +198,7 @@ def prepare_IMS(self) -> None:
raise WorkflowException(f"An error occured during execution of {exe}")

# Ensure the snow depth IMS file is produced by the above executable
input_file = f"IMSscf.{to_YMD(localconf.current_cycle)}.{localconf.CASE}.mx{localconf.OCNRES}_oro_data.nc"
input_file = f"IMSscf.{to_YMD(localconf.current_cycle)}.{localconf.CASE}_oro_data.nc"
if not os.path.isfile(f"{os.path.join(localconf.DATA, input_file)}"):
logger.exception(f"{self.task_config.CALCFIMSEXE} failed to produce {input_file}")
raise FileNotFoundError(f"{os.path.join(localconf.DATA, input_file)}")
Expand Down Expand Up @@ -249,7 +249,7 @@ def initialize(self) -> None:
# create a temporary dict of all keys needed in this method
localconf = AttrDict()
keys = ['DATA', 'current_cycle', 'COM_OBS', 'COM_ATMOS_RESTART_PREV',
'OPREFIX', 'CASE', 'ntiles']
'OPREFIX', 'CASE', 'OCNRES', 'ntiles']
for key in keys:
localconf[key] = self.task_config[key]

Expand Down Expand Up @@ -301,7 +301,7 @@ def execute(self) -> None:
localconf = AttrDict()
keys = ['HOMEgfs', 'DATA', 'current_cycle',
'COM_ATMOS_RESTART_PREV', 'COM_LAND_ANALYSIS', 'APREFIX',
'SNOWDEPTHVAR', 'BESTDDEV', 'CASE', 'ntiles',
'SNOWDEPTHVAR', 'BESTDDEV', 'CASE', 'OCNRES', 'ntiles',
'APRUN_LANDANL', 'JEDIEXE', 'jedi_yaml',
'APPLY_INCR_NML_TMPL', 'APPLY_INCR_EXE', 'APRUN_APPLY_INCR']
for key in keys:
Expand Down Expand Up @@ -530,6 +530,7 @@ def add_increments(config: Dict) -> None:
DATA
current_cycle
CASE
OCNRES
ntiles
APPLY_INCR_NML_TMPL
APPLY_INCR_EXE
Expand Down

0 comments on commit f50d7ee

Please sign in to comment.