Skip to content

Commit

Permalink
generalize lgetkf observer and solver configuration, save observer an…
Browse files Browse the repository at this point in the history
…d solver yamls (NOAA-EMC#2415)
  • Loading branch information
RussTreadon-NOAA committed Aug 19, 2024
1 parent 252a9db commit dd05d39
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion parm/config/gfs/config.atmensanlobs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ echo "BEGIN: config.atmensanlobs"
# Get task specific resources
. "${EXPDIR}/config.resources" atmensanlobs

export JCB_ALGO_YAML=${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_observer.yaml.j2
export JCB_ALGO_YAML=@JCB_ALGO_YAML@

echo "END: config.atmensanlobs"
2 changes: 1 addition & 1 deletion parm/config/gfs/config.atmensanlsol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ echo "BEGIN: config.atmensanlsol"
# Get task specific resources
. "${EXPDIR}/config.resources" atmensanlsol

export JCB_ALGO_YAML=${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_solver.yaml.j2
export JCB_ALGO_YAML=@JCB_ALGO_YAML@

echo "END: config.atmensanlsol"
6 changes: 6 additions & 0 deletions parm/config/gfs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ atmensanl:
IO_LAYOUT_X: 1
IO_LAYOUT_Y: 1

atmensanlobs:
JCB_ALGO_YAML: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_observer.yaml.j2"

atmensanlsol:
JCB_ALGO_YAML: "${PARMgfs}/gdas/atm/jcb-prototype_lgetkf_solver.yaml.j2"

aeroanl:
IO_LAYOUT_X: 1
IO_LAYOUT_Y: 1
Expand Down
20 changes: 11 additions & 9 deletions ush/python/pygfs/task/atmens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,18 @@ def finalize(self: Analysis) -> None:
diaggzip = f"{diagfile}.gz"
archive.add(diaggzip, arcname=os.path.basename(diaggzip))

# get list of yamls to cop to ROTDIR
yamls = glob.glob(os.path.join(self.task_config.DATA, '*atmens*yaml'))

# copy full YAML from executable to ROTDIR
logger.info(f"Copying {self.task_config.jedi_yaml} to {self.task_config.COM_ATMOS_ANALYSIS_ENS}")
src = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmens.yaml")
dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmens.yaml")
logger.debug(f"Copying {src} to {dest}")
yaml_copy = {
'mkdir': [self.task_config.COM_ATMOS_ANALYSIS_ENS],
'copy': [[src, dest]]
}
FileHandler(yaml_copy).sync()
for src in yamls:
logger.info(f"Copying {src} to {self.task_config.COM_ATMOS_ANALYSIS_ENS}")
dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, os.path.basename(src))
logger.debug(f"Copying {src} to {dest}")
yaml_copy = {
'copy': [[src, dest]]
}
FileHandler(yaml_copy).sync()

# create template dictionaries
template_inc = self.task_config.COM_ATMOS_ANALYSIS_TMPL
Expand Down

0 comments on commit dd05d39

Please sign in to comment.