Skip to content

Commit

Permalink
update JEDI ATM templates to jinja2 (NOAA-EMC#2294)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Mar 6, 2024
1 parent 69ade61 commit 99b21d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions parm/gdas/atm_jedi_fix.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mkdir:
- $(DATA)/fv3jedi
- '{{ DATA }}/fv3jedi'
copy:
- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/akbk$(npz).nc4, $(DATA)/fv3jedi/akbk.nc4]
- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/fmsmpp.nml, $(DATA)/fv3jedi/fmsmpp.nml]
- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/field_table_gfdl, $(DATA)/fv3jedi/field_table]
- [$(HOMEgfs)/sorc/gdas.cd/parm/io/fv3jedi_fieldmetadata_restart.yaml, $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml]
- ['{{ HOMEgfs }}/fix/gdas/fv3jedi/fv3files/akbk{{ npz }}.nc4', '{{ DATA }}/fv3jedi/akbk.nc4']
- ['{{ HOMEgfs }}/fix/gdas/fv3jedi/fv3files/fmsmpp.nml', '{{ DATA }}/fv3jedi/fmsmpp.nml']
- ['{{ HOMEgfs }}/fix/gdas/fv3jedi/fv3files/field_table_gfdl', '{{ DATA }}/fv3jedi/field_table']
- ['{{ HOMEgfs }}/sorc/gdas.cd/parm/io/fv3jedi_fieldmetadata_restart.yaml', '{{ DATA }}/fv3jedi/fv3jedi_fieldmetadata_restart.yaml']
4 changes: 2 additions & 2 deletions ush/python/pygfs/task/atm_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
FileHandler,
add_to_datetime, to_fv3time, to_timedelta, to_YMDH,
chdir,
parse_yamltmpl, parse_j2yaml, save_as_yaml,
parse_j2yaml, save_as_yaml,
logit,
Executable,
WorkflowException)
Expand Down Expand Up @@ -103,7 +103,7 @@ def initialize(self: Analysis) -> None:

# generate variational YAML file
logger.debug(f"Generate variational YAML file: {self.task_config.fv3jedi_yaml}")
varda_yaml = parse_j2yaml(self.task_config.ATMVARYAML, self.task_config)
varda_yaml = parse_j2yaml(self.task_config.ATMVARYAML, self.task_config, searchpath=self.gdasapp_j2tmpl_dir)
save_as_yaml(varda_yaml, self.task_config.fv3jedi_yaml)
logger.info(f"Wrote variational YAML to: {self.task_config.fv3jedi_yaml}")

Expand Down
4 changes: 2 additions & 2 deletions ush/python/pygfs/task/atmens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
FileHandler,
add_to_datetime, to_fv3time, to_timedelta, to_YMDH, to_YMD,
chdir,
parse_yamltmpl, parse_j2yaml, save_as_yaml,
parse_j2yaml, save_as_yaml,
logit,
Executable,
WorkflowException,
Expand Down Expand Up @@ -119,7 +119,7 @@ def initialize(self: Analysis) -> None:

# generate ensemble da YAML file
logger.debug(f"Generate ensemble da YAML file: {self.task_config.fv3jedi_yaml}")
ensda_yaml = parse_j2yaml(self.task_config.ATMENSYAML, self.task_config)
ensda_yaml = parse_j2yaml(self.task_config.ATMENSYAML, self.task_config, searchpath=self.gdasapp_j2tmpl_dir)
save_as_yaml(ensda_yaml, self.task_config.fv3jedi_yaml)
logger.info(f"Wrote ensemble da YAML to: {self.task_config.fv3jedi_yaml}")

Expand Down

0 comments on commit 99b21d4

Please sign in to comment.