diff --git a/parm/config/config.atmanl b/parm/config/config.atmanl index 43892328b8..1d092fce2a 100755 --- a/parm/config/config.atmanl +++ b/parm/config/config.atmanl @@ -6,7 +6,7 @@ echo "BEGIN: config.atmanl" export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/atm/obs/config/ -export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/atm/obs/lists/gdas_prototype.yaml +export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/atm/obs/lists/gdas_prototype_3d.yaml export ATMVARYAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/variational/3dvar_dripcg.yaml export STATICB_TYPE="identity" export BERROR_YAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/berror/staticb_${STATICB_TYPE}.yaml @@ -26,5 +26,6 @@ export io_layout_x=1 export io_layout_y=1 export JEDIVAREXE=${HOMEgfs}/exec/fv3jedi_var.x +export crtm_VERSION="2.3.0" echo "END: config.atmanl" diff --git a/parm/config/config.atmensanl b/parm/config/config.atmensanl index 5ca6005e6e..7bcd694785 100755 --- a/parm/config/config.atmensanl +++ b/parm/config/config.atmensanl @@ -26,5 +26,6 @@ export io_layout_x=1 export io_layout_y=1 export JEDIVAREXE=${HOMEgfs}/exec/fv3jedi_var.x +export crtm_VERSION="2.3.0" echo "END: config.atmensanl" diff --git a/ush/python/pygfs/task/aero_analysis.py b/ush/python/pygfs/task/aero_analysis.py index bfb10f43af..e7dafce7d5 100644 --- a/ush/python/pygfs/task/aero_analysis.py +++ b/ush/python/pygfs/task/aero_analysis.py @@ -72,16 +72,10 @@ def initialize(self: Analysis) -> None: super().initialize() # stage CRTM fix files - crtm_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'aero_crtm_coeff.yaml') - crtm_fix_list = YAMLFile(path=crtm_fix_list_path) - crtm_fix_list = Template.substitute_structure(crtm_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(crtm_fix_list).sync() + super().stage_fix('aero_crtm_coeff.yaml') # stage fix files - jedi_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'aero_jedi_fix.yaml') - jedi_fix_list = YAMLFile(path=jedi_fix_list_path) - jedi_fix_list = Template.substitute_structure(jedi_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(jedi_fix_list).sync() + super().stage_fix('aero_jedi_fix.yaml') # stage berror files # copy BUMP files, otherwise it will assume ID matrix diff --git a/ush/python/pygfs/task/analysis.py b/ush/python/pygfs/task/analysis.py index 7996387c6f..de7becc266 100644 --- a/ush/python/pygfs/task/analysis.py +++ b/ush/python/pygfs/task/analysis.py @@ -9,6 +9,7 @@ from pygw.file_utils import FileHandler from pygw.logger import logit from pygw.task import Task +from pygw.template import Template, TemplateConstants logger = getLogger(__name__.split('.')[-1]) @@ -31,9 +32,7 @@ def initialize(self) -> None: obs_dict = self.get_obs_dict() FileHandler(obs_dict).sync() - def initialize_bias(self) -> None: - super().initialize() - # all analyses need to stage observations + # some analyses need to stage bias corrections bias_dict = self.get_bias_dict() FileHandler(bias_dict).sync() @@ -175,3 +174,19 @@ def get_berror_dict(self, config: Dict[str, Any]) -> Dict[str, List[str]]: """ berror_dict = {'foo': 'bar'} return berror_dict + + @logit(logger) + def stage_fix(self, fix_yaml: str) -> None: + """Stage fix files + + This method is a placeholder for now... will be possibly made generic at a later date + + Parameters + ---------- + fix_yaml : str + tamplate of fix files to copy + """ + fix_list_path = os.path.join(self.config['HOMEgfs'], 'parm', 'parm_gdas', fix_yaml) + fix_list = YAMLFile(path=fix_list_path) + fix_list = Template.substitute_structure(fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) + FileHandler(fix_list).sync() diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 04aac420cc..a3f0c14b2d 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -69,27 +69,18 @@ def initialize(self: Analysis) -> None: - creating output directories """ - # stage observations + # stage observations and bias corrections super().initialize() - # stage bias correction files - super().initialize_bias() - # stage CRTM fix files - crtm_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'atm_crtm_coeff.yaml') - crtm_fix_list = YAMLFile(path=crtm_fix_list_path) - crtm_fix_list = Template.substitute_structure(crtm_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(crtm_fix_list).sync() + super().stage_fix('atm_crtm_coeff.yaml') # stage fix files - jedi_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'atm_jedi_fix.yaml') - jedi_fix_list = YAMLFile(path=jedi_fix_list_path) - jedi_fix_list = Template.substitute_structure(jedi_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(jedi_fix_list).sync() + super().stage_fix('atm_jedi_fix.yaml') # stage berror files # copy BUMP files, otherwise it will assume ID matrix - if self.task_config.get('STATICB_TYPE', 'bump_atm') in ['bump_atm']: + if self.task_config.get('STATICB_TYPE', 'identity') in ['bump']: FileHandler(AtmAnalysis.get_berror_dict(self.task_config)).sync() # stage backgrounds diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index f6fa13f8a3..a261bd3543 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -70,23 +70,14 @@ def initialize(self: Analysis) -> None: - creating output directories """ - # stage observations + # stage observations and bias corrections super().initialize() - # stage bias correction files - super().initialize_bias() - # stage CRTM fix files - crtm_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'atm_crtm_coeff.yaml') - crtm_fix_list = YAMLFile(path=crtm_fix_list_path) - crtm_fix_list = Template.substitute_structure(crtm_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(crtm_fix_list).sync() + super().stage_fix('atm_crtm_coeff.yaml') # stage fix files - jedi_fix_list_path = os.path.join(self.task_config['HOMEgfs'], 'parm', 'parm_gdas', 'atm_jedi_fix.yaml') - jedi_fix_list = YAMLFile(path=jedi_fix_list_path) - jedi_fix_list = Template.substitute_structure(jedi_fix_list, TemplateConstants.DOLLAR_PARENTHESES, self.task_config.get) - FileHandler(jedi_fix_list).sync() + super().stage_fix('atm_jedi_fix.yaml') # stage backgrounds FileHandler(self.get_bkg_dict(AttrDict(self.task_config, **self.task_config))).sync()