From b5eb3454e020a2e908ba2a639c125e87012bcba2 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Wed, 29 May 2024 14:35:29 +0000 Subject: [PATCH 01/57] Use rename_atm of jcb parm erpos --- sorc/gdas.cd | 2 +- sorc/jcb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 6742ec62a1..822a50258b 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 6742ec62a12d7d6f8129057bcf77cee0e2175022 +Subproject commit 822a50258b869a8e855bd867f3194eae6c5b45ef diff --git a/sorc/jcb b/sorc/jcb index de75655d81..4e55941a2d 160000 --- a/sorc/jcb +++ b/sorc/jcb @@ -1 +1 @@ -Subproject commit de75655d81ec2ee668d8d47bf4a43625c81dde7c +Subproject commit 4e55941a2d7c42904d1aa2acd2a2ed1323d747a5 From 3a8f527e9f5cb7deec201f16da6d42347fce66dc Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Fri, 31 May 2024 12:32:32 -0500 Subject: [PATCH 02/57] Initial commit --- parm/gdas/atm_berror_bump_fix.yaml.j2 | 23 +++++++++++++++++++ parm/gdas/atm_berror_gsibec_fix.yaml.j2 | 10 +++++++++ parm/gdas/atm_berror_identity_fix.yaml.j2 | 2 ++ parm/gdas/atm_bkg_fix.yaml.j2 | 16 ++++++++++++++ parm/gdas/atm_fv3ens_fix.yaml.j2 | 27 +++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 parm/gdas/atm_berror_bump_fix.yaml.j2 create mode 100644 parm/gdas/atm_berror_gsibec_fix.yaml.j2 create mode 100644 parm/gdas/atm_berror_identity_fix.yaml.j2 create mode 100644 parm/gdas/atm_bkg_fix.yaml.j2 create mode 100644 parm/gdas/atm_fv3ens_fix.yaml.j2 diff --git a/parm/gdas/atm_berror_bump_fix.yaml.j2 b/parm/gdas/atm_berror_bump_fix.yaml.j2 new file mode 100644 index 0000000000..817f1f3a23 --- /dev/null +++ b/parm/gdas/atm_berror_bump_fix.yaml.j2 @@ -0,0 +1,23 @@ +{% set src_dir = BERROR_DATA_DIR %} +{% set dest_dir = DATA ~ '/berror' %} +{% set ftype_list = ['cor_rh', 'cor_rv', 'stddev'] %} +{% set nprocs = ntiles * layout_x * layout_y %} + +mkdir: +- '{{ dest_dir }}' + +copy: +{% for ftype in ftype_list %} +{% set prefix = BERROR_DATE | to_fv3time ~ '.' ~ ftype %} +{% set fname = prefix ~ '.coupler.res' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% for itile in range(1,7) %} +{% set fname = prefix ~ '.fv_tracer.res.tile' ~ itile ~ '.nc' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} +{% endfor %} + +{% for nn in range(1,nprocs+1) %} +{% set fname = 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} \ No newline at end of file diff --git a/parm/gdas/atm_berror_gsibec_fix.yaml.j2 b/parm/gdas/atm_berror_gsibec_fix.yaml.j2 new file mode 100644 index 0000000000..a640e2167d --- /dev/null +++ b/parm/gdas/atm_berror_gsibec_fix.yaml.j2 @@ -0,0 +1,10 @@ +{% set src_dir = HOMEgfs ~ '/fix/gdas/gsibec/' ~ CASE_ANL %} +{% set dest_dir = DATA ~ '/berror' %} +{% set fname_list = ['gfs_gsi_global.nml', 'gsi-coeffs-gfs-global.nc4'] %} + +mkdir: +- '{{ dest_dir }}' +copy: +{% for fname in fname_list %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} \ No newline at end of file diff --git a/parm/gdas/atm_berror_identity_fix.yaml.j2 b/parm/gdas/atm_berror_identity_fix.yaml.j2 new file mode 100644 index 0000000000..0a45bc9a4f --- /dev/null +++ b/parm/gdas/atm_berror_identity_fix.yaml.j2 @@ -0,0 +1,2 @@ +mkdir: +copy: \ No newline at end of file diff --git a/parm/gdas/atm_bkg_fix.yaml.j2 b/parm/gdas/atm_bkg_fix.yaml.j2 new file mode 100644 index 0000000000..32c95fd04d --- /dev/null +++ b/parm/gdas/atm_bkg_fix.yaml.j2 @@ -0,0 +1,16 @@ +{% set src_dir = COM_ATMOS_RESTART_PREV %} +{% set dest_dir = DATA ~ '/bkg' %} +{% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} +{% set prefix = current_cycle | to_fv3time %} + +mkdir: +- '{{ dest_dir }}' +copy: +{% set fname = prefix ~ '.coupler.res' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% for ftype in ftype_list %} +{% for itile in range(1,7) %} +{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} +{% endfor %} \ No newline at end of file diff --git a/parm/gdas/atm_fv3ens_fix.yaml.j2 b/parm/gdas/atm_fv3ens_fix.yaml.j2 new file mode 100644 index 0000000000..a6f8c3847a --- /dev/null +++ b/parm/gdas/atm_fv3ens_fix.yaml.j2 @@ -0,0 +1,27 @@ +{% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} +{% set prefix = current_cycle | to_fv3time %} + +mkdir: +{% for imem in range(1,NMEM_ENS+1) %} +{% set memchar = 'mem%03d' | format(imem) %} +{% set dest_dir = DATA ~ '/ens/' ~ memchar %} +- '{{ dest_dir }}' +{% endfor %} +copy: +{% for imem in range(1,NMEM_ENS+1) %} +{% set memchar = 'mem%03d' | format(imem) %} +{% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) + | replace('${RUN}', 'enkfgdas') + | replace('${YMD}', previous_cycle | to_YMD) + | replace('${HH}', previous_cycle | strftime('%H')) + | replace('${MEMDIR}', memchar) %} +{% set dest_dir = DATA ~ '/ens/' ~ memchar %} +{% set fname = prefix ~ '.coupler.res' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% for ftype in ftype_list %} +{% for itile in range(1,7) %} +{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} +{% endfor %} +{% endfor %} From 690498229b9ff2df9952c3d50389244f593ef322 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:28:10 -0400 Subject: [PATCH 03/57] Update atm_berror_bump_fix.yaml.j2 --- parm/gdas/atm_berror_bump_fix.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/gdas/atm_berror_bump_fix.yaml.j2 b/parm/gdas/atm_berror_bump_fix.yaml.j2 index 817f1f3a23..123d15e359 100644 --- a/parm/gdas/atm_berror_bump_fix.yaml.j2 +++ b/parm/gdas/atm_berror_bump_fix.yaml.j2 @@ -20,4 +20,4 @@ copy: {% for nn in range(1,nprocs+1) %} {% set fname = 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} \ No newline at end of file +{% endfor %} From 0b37fe579f7fea6e221ab324c4620502240766ad Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:28:36 -0400 Subject: [PATCH 04/57] Update atm_berror_gsibec_fix.yaml.j2 --- parm/gdas/atm_berror_gsibec_fix.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/gdas/atm_berror_gsibec_fix.yaml.j2 b/parm/gdas/atm_berror_gsibec_fix.yaml.j2 index a640e2167d..0affe68030 100644 --- a/parm/gdas/atm_berror_gsibec_fix.yaml.j2 +++ b/parm/gdas/atm_berror_gsibec_fix.yaml.j2 @@ -7,4 +7,4 @@ mkdir: copy: {% for fname in fname_list %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} \ No newline at end of file +{% endfor %} From d770b63a051ba0b1437f2d3db5cd3a7796b34dcf Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:29:02 -0400 Subject: [PATCH 05/57] Update atm_berror_identity_fix.yaml.j2 --- parm/gdas/atm_berror_identity_fix.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/gdas/atm_berror_identity_fix.yaml.j2 b/parm/gdas/atm_berror_identity_fix.yaml.j2 index 0a45bc9a4f..eec8c038c5 100644 --- a/parm/gdas/atm_berror_identity_fix.yaml.j2 +++ b/parm/gdas/atm_berror_identity_fix.yaml.j2 @@ -1,2 +1,2 @@ mkdir: -copy: \ No newline at end of file +copy: From 0187bbab807cf9ebb3e0a48a72e6a7153e7e6136 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:29:40 -0400 Subject: [PATCH 06/57] Update atm_bkg_fix.yaml.j2 --- parm/gdas/atm_bkg_fix.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/gdas/atm_bkg_fix.yaml.j2 b/parm/gdas/atm_bkg_fix.yaml.j2 index 32c95fd04d..8e88ef3c56 100644 --- a/parm/gdas/atm_bkg_fix.yaml.j2 +++ b/parm/gdas/atm_bkg_fix.yaml.j2 @@ -13,4 +13,4 @@ copy: {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] {% endfor %} -{% endfor %} \ No newline at end of file +{% endfor %} From 4dcd47add81758128a1763cba662f9cf4e3e75a5 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 3 Jun 2024 13:03:52 -0500 Subject: [PATCH 07/57] Rename some things --- ..._berror_bump_fix.yaml.j2 => atm_berror_bump_staging.yaml.j2} | 0 ...ror_gsibec_fix.yaml.j2 => atm_berror_gsibec_staging.yaml.j2} | 0 parm/gdas/atm_berror_identity_fix.yaml.j2 | 2 -- parm/gdas/{atm_bkg_fix.yaml.j2 => atm_var_bkg_staging.yaml.j2} | 0 4 files changed, 2 deletions(-) rename parm/gdas/{atm_berror_bump_fix.yaml.j2 => atm_berror_bump_staging.yaml.j2} (100%) rename parm/gdas/{atm_berror_gsibec_fix.yaml.j2 => atm_berror_gsibec_staging.yaml.j2} (100%) delete mode 100644 parm/gdas/atm_berror_identity_fix.yaml.j2 rename parm/gdas/{atm_bkg_fix.yaml.j2 => atm_var_bkg_staging.yaml.j2} (100%) diff --git a/parm/gdas/atm_berror_bump_fix.yaml.j2 b/parm/gdas/atm_berror_bump_staging.yaml.j2 similarity index 100% rename from parm/gdas/atm_berror_bump_fix.yaml.j2 rename to parm/gdas/atm_berror_bump_staging.yaml.j2 diff --git a/parm/gdas/atm_berror_gsibec_fix.yaml.j2 b/parm/gdas/atm_berror_gsibec_staging.yaml.j2 similarity index 100% rename from parm/gdas/atm_berror_gsibec_fix.yaml.j2 rename to parm/gdas/atm_berror_gsibec_staging.yaml.j2 diff --git a/parm/gdas/atm_berror_identity_fix.yaml.j2 b/parm/gdas/atm_berror_identity_fix.yaml.j2 deleted file mode 100644 index 0a45bc9a4f..0000000000 --- a/parm/gdas/atm_berror_identity_fix.yaml.j2 +++ /dev/null @@ -1,2 +0,0 @@ -mkdir: -copy: \ No newline at end of file diff --git a/parm/gdas/atm_bkg_fix.yaml.j2 b/parm/gdas/atm_var_bkg_staging.yaml.j2 similarity index 100% rename from parm/gdas/atm_bkg_fix.yaml.j2 rename to parm/gdas/atm_var_bkg_staging.yaml.j2 From f91297dd7b71d5cee77b03e2d6af249529dccbbe Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 3 Jun 2024 13:08:13 -0500 Subject: [PATCH 08/57] Rename some things --- parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 | 27 +++++++++++++++++++ ...yaml.j2 => atm_var_fv3ens_staging.yaml.j2} | 0 2 files changed, 27 insertions(+) create mode 100644 parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 rename parm/gdas/{atm_fv3ens_fix.yaml.j2 => atm_var_fv3ens_staging.yaml.j2} (100%) diff --git a/parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 b/parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 new file mode 100644 index 0000000000..f62fdd7841 --- /dev/null +++ b/parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 @@ -0,0 +1,27 @@ +{% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} +{% set prefix = current_cycle | to_fv3time %} + +mkdir: +{% for imem in range(1,NMEM_ENS+1) %} +{% set memchar = 'mem%03d' | format(imem) %} +- '{{ DATA }}/bkg/{{ memchar }}' +- '{{ DATA }}/anl/{{ memchar }}' +{% endfor %} +copy: +{% for imem in range(1,NMEM_ENS+1) %} +{% set memchar = 'mem%03d' | format(imem) %} +{% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) + | replace('${RUN}', 'enkfgdas') + | replace('${YMD}', previous_cycle | to_YMD) + | replace('${HH}', previous_cycle | strftime('%H')) + | replace('${MEMDIR}', memchar) %} +{% set dest_dir = DATA ~ '/bkg/' ~ memchar %} +{% set fname = prefix ~ '.coupler.res' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% for ftype in ftype_list %} +{% for itile in range(1,7) %} +{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} +- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +{% endfor %} +{% endfor %} +{% endfor %} diff --git a/parm/gdas/atm_fv3ens_fix.yaml.j2 b/parm/gdas/atm_var_fv3ens_staging.yaml.j2 similarity index 100% rename from parm/gdas/atm_fv3ens_fix.yaml.j2 rename to parm/gdas/atm_var_fv3ens_staging.yaml.j2 From 983d720cdf364f82b515c71c9f827b1721f98e86 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 3 Jun 2024 13:19:59 -0500 Subject: [PATCH 09/57] Add changes to analysis python scripts --- parm/config/gfs/config.atmanl | 3 + parm/config/gfs/config.atmensanl | 1 + ush/python/pygfs/task/analysis.py | 100 ----------- ush/python/pygfs/task/atm_analysis.py | 206 ++--------------------- ush/python/pygfs/task/atmens_analysis.py | 30 +--- 5 files changed, 16 insertions(+), 324 deletions(-) diff --git a/parm/config/gfs/config.atmanl b/parm/config/gfs/config.atmanl index dd8ca80b11..a9aa820128 100644 --- a/parm/config/gfs/config.atmanl +++ b/parm/config/gfs/config.atmanl @@ -23,6 +23,9 @@ fi export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" +export VAR_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_var_bkg_staging.yaml.j2" +export BERROR_STAGING_YAML="${PARMgfs}/gdas/atm_berror_"${STATICB_TYPE}"_staging.yaml.j2" +export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/atm_fv3ens_staging.yaml.j2" export layout_x_atmanl=@LAYOUT_X_ATMANL@ export layout_y_atmanl=@LAYOUT_Y_ATMANL@ diff --git a/parm/config/gfs/config.atmensanl b/parm/config/gfs/config.atmensanl index 3484cb670d..c13ce7a0b4 100644 --- a/parm/config/gfs/config.atmensanl +++ b/parm/config/gfs/config.atmensanl @@ -12,6 +12,7 @@ export INTERP_METHOD='barycentric' export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" +export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_ens_bkg_fix.yaml.j2" export layout_x_atmensanl=@LAYOUT_X_ATMENSANL@ export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@ diff --git a/ush/python/pygfs/task/analysis.py b/ush/python/pygfs/task/analysis.py index b668ac3980..4b9d6d8bbd 100644 --- a/ush/python/pygfs/task/analysis.py +++ b/ush/python/pygfs/task/analysis.py @@ -194,44 +194,6 @@ def add_fv3_increments(self, inc_file_tmpl: str, bkg_file_tmpl: str, incvars: Li except (AttributeError, RuntimeError): pass # checksum is missing, move on - @logit(logger) - def get_bkg_dict(self, task_config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of model background files to copy - - This method is a placeholder for now... will be possibly made generic at a later date - - Parameters - ---------- - task_config: Dict - a dictionary containing all of the configuration needed for the task - - Returns - ---------- - bkg_dict: Dict - a dictionary containing the list of model background files to copy for FileHandler - """ - bkg_dict = {'foo': 'bar'} - return bkg_dict - - @logit(logger) - def get_berror_dict(self, config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of background error files to copy - - This method is a placeholder for now... will be possibly made generic at a later date - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - - Returns - ---------- - berror_dict: Dict - a dictionary containing the list of background error files to copy for FileHandler - """ - berror_dict = {'foo': 'bar'} - return berror_dict - @logit(logger) def link_jediexe(self) -> None: """Compile a dictionary of background error files to copy @@ -258,68 +220,6 @@ def link_jediexe(self) -> None: return exe_dest - @staticmethod - @logit(logger) - def get_fv3ens_dict(config: Dict[str, Any]) -> Dict[str, Any]: - """Compile a dictionary of ensemble member restarts to copy - - This method constructs a dictionary of ensemble FV3 restart files (coupler, core, tracer) - that are needed for global atmens DA and returns said dictionary for use by the FileHandler class. - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - - Returns - ---------- - ens_dict: Dict - a dictionary containing the list of ensemble member restart files to copy for FileHandler - """ - # NOTE for now this is FV3 restart files and just assumed to be fh006 - - # define template - template_res = config.COM_ATMOS_RESTART_TMPL - prev_cycle = config.previous_cycle - tmpl_res_dict = { - 'ROTDIR': config.ROTDIR, - 'RUN': config.RUN, - 'YMD': to_YMD(prev_cycle), - 'HH': prev_cycle.strftime('%H'), - 'MEMDIR': None - } - - # construct ensemble member file list - dirlist = [] - enslist = [] - for imem in range(1, config.NMEM_ENS + 1): - memchar = f"mem{imem:03d}" - - # create directory path for ensemble member restart - dirlist.append(os.path.join(config.DATA, config.dirname, f'mem{imem:03d}')) - - # get FV3 restart files, this will be a lot simpler when using history files - tmpl_res_dict['MEMDIR'] = memchar - rst_dir = Template.substitute_structure(template_res, TemplateConstants.DOLLAR_CURLY_BRACE, tmpl_res_dict.get) - run_dir = os.path.join(config.DATA, config.dirname, memchar) - - # atmens DA needs coupler - basename = f'{to_fv3time(config.current_cycle)}.coupler.res' - enslist.append([os.path.join(rst_dir, basename), os.path.join(config.DATA, config.dirname, memchar, basename)]) - - # atmens DA needs core, srf_wnd, tracer, phy_data, sfc_data - for ftype in ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data']: - template = f'{to_fv3time(config.current_cycle)}.{ftype}.tile{{tilenum}}.nc' - for itile in range(1, config.ntiles + 1): - basename = template.format(tilenum=itile) - enslist.append([os.path.join(rst_dir, basename), os.path.join(run_dir, basename)]) - - ens_dict = { - 'mkdir': dirlist, - 'copy': enslist, - } - return ens_dict - @staticmethod @logit(logger) def tgz_diags(statfile: str, diagdir: str) -> None: diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 95545c57a4..5f61d92415 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -85,22 +85,22 @@ def initialize(self: Analysis) -> None: # stage static background error files, otherwise it will assume ID matrix logger.info(f"Stage files for STATICB_TYPE {self.task_config.STATICB_TYPE}") - FileHandler(self.get_berror_dict(self.task_config)).sync() + if self.task_config.STATICB_TYPE != 'identity': + berror_fix_list = parse_j2yaml(self.task_config.BERROR_STAGING_YAML, self.task_config) + else: + berror_fix_list = {} + FileHandler(berror_fix_list).sync() # stage ensemble files for use in hybrid background error if self.task_config.DOHYBVAR: logger.debug(f"Stage ensemble files for DOHYBVAR {self.task_config.DOHYBVAR}") - localconf = AttrDict() - keys = ['COM_ATMOS_RESTART_TMPL', 'previous_cycle', 'ROTDIR', 'RUN', - 'NMEM_ENS', 'DATA', 'current_cycle', 'ntiles'] - for key in keys: - localconf[key] = self.task_config[key] - localconf.RUN = 'enkfgdas' - localconf.dirname = 'ens' - FileHandler(self.get_fv3ens_dict(localconf)).sync() + fv3ens_fix_list = parse_j2yaml(self.task_config.FV3ENS_STAGING_YAML, self.task_config) + FileHandler(fv3ens_fix_list).sync() # stage backgrounds - FileHandler(self.get_bkg_dict(AttrDict(self.task_config))).sync() + logger.info(f"Staging background files from {self.task_config.BKG_FIX_YAML}") + bkg_fix_list = parse_j2yaml(self.task_config.VAR_BKG_STAGING_YAML, self.task_config) + FileHandler(bkg_fix_list).sync() # generate variational YAML file logger.debug(f"Generate variational YAML file: {self.task_config.jedi_yaml}") @@ -253,189 +253,3 @@ def finalize(self: Analysis) -> None: def clean(self): super().clean() - - @logit(logger) - def get_bkg_dict(self, task_config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of model background files to copy - - This method constructs a dictionary of FV3 restart files (coupler, core, tracer) - that are needed for global atm DA and returns said dictionary for use by the FileHandler class. - - Parameters - ---------- - task_config: Dict - a dictionary containing all of the configuration needed for the task - - Returns - ---------- - bkg_dict: Dict - a dictionary containing the list of model background files to copy for FileHandler - """ - # NOTE for now this is FV3 restart files and just assumed to be fh006 - - # get FV3 restart files, this will be a lot simpler when using history files - rst_dir = os.path.join(task_config.COM_ATMOS_RESTART_PREV) # for now, option later? - run_dir = os.path.join(task_config.DATA, 'bkg') - - # Start accumulating list of background files to copy - bkglist = [] - - # atm DA needs coupler - basename = f'{to_fv3time(task_config.current_cycle)}.coupler.res' - bkglist.append([os.path.join(rst_dir, basename), os.path.join(run_dir, basename)]) - - # atm DA needs core, srf_wnd, tracer, phy_data, sfc_data - for ftype in ['core', 'srf_wnd', 'tracer']: - template = f'{to_fv3time(self.task_config.current_cycle)}.fv_{ftype}.res.tile{{tilenum}}.nc' - for itile in range(1, task_config.ntiles + 1): - basename = template.format(tilenum=itile) - bkglist.append([os.path.join(rst_dir, basename), os.path.join(run_dir, basename)]) - - for ftype in ['phy_data', 'sfc_data']: - template = f'{to_fv3time(self.task_config.current_cycle)}.{ftype}.tile{{tilenum}}.nc' - for itile in range(1, task_config.ntiles + 1): - basename = template.format(tilenum=itile) - bkglist.append([os.path.join(rst_dir, basename), os.path.join(run_dir, basename)]) - - bkg_dict = { - 'mkdir': [run_dir], - 'copy': bkglist, - } - return bkg_dict - - @logit(logger) - def get_berror_dict(self, config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of background error files to copy - - This method will construct a dictionary of either bump of gsibec background - error files for global atm DA and return said dictionary for use by the - FileHandler class. - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - - Returns - ---------- - berror_dict: Dict - a dictionary containing the list of atm background error files to copy for FileHandler - """ - SUPPORTED_BERROR_STATIC_MAP = {'identity': self._get_berror_dict_identity, - 'bump': self._get_berror_dict_bump, - 'gsibec': self._get_berror_dict_gsibec} - - try: - berror_dict = SUPPORTED_BERROR_STATIC_MAP[config.STATICB_TYPE](config) - except KeyError: - raise KeyError(f"{config.STATICB_TYPE} is not a supported background error type.\n" + - f"Currently supported background error types are:\n" + - f'{" | ".join(SUPPORTED_BERROR_STATIC_MAP.keys())}') - - return berror_dict - - @staticmethod - @logit(logger) - def _get_berror_dict_identity(config: Dict[str, Any]) -> Dict[str, List[str]]: - """Identity BE does not need any files for staging. - - This is a private method and should not be accessed directly. - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - Returns - ---------- - berror_dict: Dict - Empty dictionary [identity BE needs not files to stage] - """ - logger.info(f"Identity background error does not use staged files. Return empty dictionary") - return {} - - @staticmethod - @logit(logger) - def _get_berror_dict_bump(config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of atm bump background error files to copy - - This method will construct a dictionary of atm bump background error - files for global atm DA and return said dictionary to the parent - - This is a private method and should not be accessed directly. - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - - Returns - ---------- - berror_dict: Dict - a dictionary of atm bump background error files to copy for FileHandler - """ - # BUMP atm static-B needs nicas, cor_rh, cor_rv and stddev files. - b_dir = config.BERROR_DATA_DIR - b_datestr = to_fv3time(config.BERROR_DATE) - berror_list = [] - for ftype in ['cor_rh', 'cor_rv', 'stddev']: - coupler = f'{b_datestr}.{ftype}.coupler.res' - berror_list.append([ - os.path.join(b_dir, coupler), os.path.join(config.DATA, 'berror', coupler) - ]) - - template = '{b_datestr}.{ftype}.fv_tracer.res.tile{{tilenum}}.nc' - for itile in range(1, config.ntiles + 1): - tracer = template.format(tilenum=itile) - berror_list.append([ - os.path.join(b_dir, tracer), os.path.join(config.DATA, 'berror', tracer) - ]) - - nproc = config.ntiles * config.layout_x * config.layout_y - for nn in range(1, nproc + 1): - berror_list.append([ - os.path.join(b_dir, f'nicas_aero_nicas_local_{nproc:06}-{nn:06}.nc'), - os.path.join(config.DATA, 'berror', f'nicas_aero_nicas_local_{nproc:06}-{nn:06}.nc') - ]) - - # create dictionary of background error files to stage - berror_dict = { - 'mkdir': [os.path.join(config.DATA, 'berror')], - 'copy': berror_list, - } - return berror_dict - - @staticmethod - @logit(logger) - def _get_berror_dict_gsibec(config: Dict[str, Any]) -> Dict[str, List[str]]: - """Compile a dictionary of atm gsibec background error files to copy - - This method will construct a dictionary of atm gsibec background error - files for global atm DA and return said dictionary to the parent - - This is a private method and should not be accessed directly. - - Parameters - ---------- - config: Dict - a dictionary containing all of the configuration needed - - Returns - ---------- - berror_dict: Dict - a dictionary of atm gsibec background error files to copy for FileHandler - """ - # GSI atm static-B needs namelist and coefficient files. - b_dir = os.path.join(config.HOMEgfs, 'fix', 'gdas', 'gsibec', config.CASE_ANL) - berror_list = [] - for ftype in ['gfs_gsi_global.nml', 'gsi-coeffs-gfs-global.nc4']: - berror_list.append([ - os.path.join(b_dir, ftype), - os.path.join(config.DATA, 'berror', ftype) - ]) - - # create dictionary of background error files to stage - berror_dict = { - 'mkdir': [os.path.join(config.DATA, 'berror')], - 'copy': berror_list, - } - return berror_dict diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index 37ac613736..9ee7746279 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -77,27 +77,6 @@ def initialize(self: Analysis) -> None: """ super().initialize() - # Make member directories in DATA for background and in DATA and ROTDIR for analysis files - # create template dictionary for output member analysis directories - template_inc = self.task_config.COM_ATMOS_ANALYSIS_TMPL - tmpl_inc_dict = { - 'ROTDIR': self.task_config.ROTDIR, - 'RUN': self.task_config.RUN, - 'YMD': to_YMD(self.task_config.current_cycle), - 'HH': self.task_config.current_cycle.strftime('%H') - } - dirlist = [] - for imem in range(1, self.task_config.NMEM_ENS + 1): - dirlist.append(os.path.join(self.task_config.DATA, 'bkg', f'mem{imem:03d}')) - dirlist.append(os.path.join(self.task_config.DATA, 'anl', f'mem{imem:03d}')) - - # create output directory path for member analysis - tmpl_inc_dict['MEMDIR'] = f"mem{imem:03d}" - incdir = Template.substitute_structure(template_inc, TemplateConstants.DOLLAR_CURLY_BRACE, tmpl_inc_dict.get) - dirlist.append(incdir) - - FileHandler({'mkdir': dirlist}).sync() - # stage CRTM fix files logger.info(f"Staging CRTM fix files from {self.task_config.CRTM_FIX_YAML}") crtm_fix_list = parse_j2yaml(self.task_config.CRTM_FIX_YAML, self.task_config) @@ -110,13 +89,8 @@ def initialize(self: Analysis) -> None: # stage backgrounds logger.info(f"Stage ensemble member background files") - localconf = AttrDict() - keys = ['COM_ATMOS_RESTART_TMPL', 'previous_cycle', 'ROTDIR', 'RUN', - 'NMEM_ENS', 'DATA', 'current_cycle', 'ntiles'] - for key in keys: - localconf[key] = self.task_config[key] - localconf.dirname = 'bkg' - FileHandler(self.get_fv3ens_dict(localconf)).sync() + bkg_fix_list = parse_j2yaml(self.task_config.LGETKF_BKG_STAGING_YAML, self.task_config) + FileHandler(bkg_fix_list).sync() # generate ensemble da YAML file logger.debug(f"Generate ensemble da YAML file: {self.task_config.jedi_yaml}") From 9436f4b900be309b8c4a5c754fdd0dbe99d61aee Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 02:34:11 +0000 Subject: [PATCH 10/57] update hashes and config --- parm/config/gfs/config.atmanl | 4 ++-- sorc/gdas.cd | 2 +- sorc/jcb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parm/config/gfs/config.atmanl b/parm/config/gfs/config.atmanl index dd8ca80b11..a655066550 100644 --- a/parm/config/gfs/config.atmanl +++ b/parm/config/gfs/config.atmanl @@ -15,10 +15,10 @@ export INTERP_METHOD='barycentric' if [[ ${DOHYBVAR} = "YES" ]]; then # shellcheck disable=SC2153 export CASE_ANL=${CASE_ENS} - export BERROR_YAML="background_error_hybrid_${STATICB_TYPE}_${LOCALIZATION_TYPE}" + export BERROR_YAML="atmosphere_background_error_hybrid_${STATICB_TYPE}_${LOCALIZATION_TYPE}" else export CASE_ANL=${CASE} - export BERROR_YAML="background_error_static_${STATICB_TYPE}" + export BERROR_YAML="atmosphere_background_error_static_${STATICB_TYPE}" fi export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 822a50258b..cf4f3b5d04 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 822a50258b869a8e855bd867f3194eae6c5b45ef +Subproject commit cf4f3b5d04ba0d852bf98434022cde6b2682fa42 diff --git a/sorc/jcb b/sorc/jcb index 4e55941a2d..d167c6c273 160000 --- a/sorc/jcb +++ b/sorc/jcb @@ -1 +1 @@ -Subproject commit 4e55941a2d7c42904d1aa2acd2a2ed1323d747a5 +Subproject commit d167c6c27312ae6fbd9d82c2747fecc6687eb0f9 From 3022393658369533a2f2cae753c9e8f0a9c7c9da Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 4 Jun 2024 09:37:44 -0500 Subject: [PATCH 11/57] Minor fix --- parm/config/gfs/config.atmanl | 2 +- parm/config/gfs/config.atmensanl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.atmanl b/parm/config/gfs/config.atmanl index a9aa820128..b3e9ca5b7f 100644 --- a/parm/config/gfs/config.atmanl +++ b/parm/config/gfs/config.atmanl @@ -25,7 +25,7 @@ export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" export VAR_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_var_bkg_staging.yaml.j2" export BERROR_STAGING_YAML="${PARMgfs}/gdas/atm_berror_"${STATICB_TYPE}"_staging.yaml.j2" -export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/atm_fv3ens_staging.yaml.j2" +export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/atm_var_fv3ens_staging.yaml.j2" export layout_x_atmanl=@LAYOUT_X_ATMANL@ export layout_y_atmanl=@LAYOUT_Y_ATMANL@ diff --git a/parm/config/gfs/config.atmensanl b/parm/config/gfs/config.atmensanl index c13ce7a0b4..c8fe76d40a 100644 --- a/parm/config/gfs/config.atmensanl +++ b/parm/config/gfs/config.atmensanl @@ -12,7 +12,7 @@ export INTERP_METHOD='barycentric' export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" -export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_ens_bkg_fix.yaml.j2" +export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_lgetkf_bkg_fix.yaml.j2" export layout_x_atmensanl=@LAYOUT_X_ATMENSANL@ export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@ From cc1a3b60fdeff7f3b7ff7b74086f5a27827709e0 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 4 Jun 2024 09:39:00 -0500 Subject: [PATCH 12/57] Minor update --- parm/config/gfs/config.atmensanl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/gfs/config.atmensanl b/parm/config/gfs/config.atmensanl index c8fe76d40a..4a80f969ad 100644 --- a/parm/config/gfs/config.atmensanl +++ b/parm/config/gfs/config.atmensanl @@ -12,7 +12,7 @@ export INTERP_METHOD='barycentric' export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" -export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_lgetkf_bkg_fix.yaml.j2" +export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_lgetkf_bkg_staging.yaml.j2" export layout_x_atmensanl=@LAYOUT_X_ATMENSANL@ export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@ From 20971169d4701345205a06baa66ba0e93657b071 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 4 Jun 2024 09:54:50 -0500 Subject: [PATCH 13/57] Minor update --- parm/config/gfs/config.atmanl | 2 +- ush/python/pygfs/task/atm_analysis.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parm/config/gfs/config.atmanl b/parm/config/gfs/config.atmanl index b3e9ca5b7f..90f4c398f8 100644 --- a/parm/config/gfs/config.atmanl +++ b/parm/config/gfs/config.atmanl @@ -24,7 +24,7 @@ fi export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" export VAR_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_var_bkg_staging.yaml.j2" -export BERROR_STAGING_YAML="${PARMgfs}/gdas/atm_berror_"${STATICB_TYPE}"_staging.yaml.j2" +export BERROR_STAGING_YAML="${PARMgfs}/gdas/atm_berror_${STATICB_TYPE}_staging.yaml.j2" export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/atm_var_fv3ens_staging.yaml.j2" export layout_x_atmanl=@LAYOUT_X_ATMANL@ diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 5f61d92415..826240b8b5 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -98,7 +98,7 @@ def initialize(self: Analysis) -> None: FileHandler(fv3ens_fix_list).sync() # stage backgrounds - logger.info(f"Staging background files from {self.task_config.BKG_FIX_YAML}") + logger.info(f"Staging background files from {self.task_config.VAR_BKG_STAGING_YAML}") bkg_fix_list = parse_j2yaml(self.task_config.VAR_BKG_STAGING_YAML, self.task_config) FileHandler(bkg_fix_list).sync() From 53277113348b6e414828f20ed846da08e3cdbc9b Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 4 Jun 2024 09:56:20 -0500 Subject: [PATCH 14/57] Coding norms --- ush/python/pygfs/task/atm_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 826240b8b5..911b83478e 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -98,7 +98,7 @@ def initialize(self: Analysis) -> None: FileHandler(fv3ens_fix_list).sync() # stage backgrounds - logger.info(f"Staging background files from {self.task_config.VAR_BKG_STAGING_YAML}") + logger.info(f"Staging background files from {self.task_config.VAR_BKG_STAGING_YAML}") bkg_fix_list = parse_j2yaml(self.task_config.VAR_BKG_STAGING_YAML, self.task_config) FileHandler(bkg_fix_list).sync() From 2702ef092f41b15de94a623e59f1cf0035607b15 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 15:35:03 -0400 Subject: [PATCH 15/57] Remove jcb from GW submodules --- .gitmodules | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index ea1b5c06af..b68dfa0761 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,7 +30,4 @@ path = sorc/upp.fd url = https://github.com/NOAA-EMC/UPP.git ignore = dirty -[submodule "sorc/jcb"] - path = sorc/jcb - url = https://github.com/noaa-emc/jcb - fetchRecurseSubmodules = false + From b6456be6577f1891e0afc25799df8520ff9d9d05 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 15:35:27 -0400 Subject: [PATCH 16/57] Remove JCB --- sorc/jcb | 1 - 1 file changed, 1 deletion(-) delete mode 160000 sorc/jcb diff --git a/sorc/jcb b/sorc/jcb deleted file mode 160000 index de75655d81..0000000000 --- a/sorc/jcb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit de75655d81ec2ee668d8d47bf4a43625c81dde7c From 2a5f301226d13f4e8207d37ed2e312c9bd17cd05 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 15:41:25 -0400 Subject: [PATCH 17/57] adjust link to point to new jcb location in gdasapp --- sorc/link_workflow.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 68873d0f1a..9ac628eba4 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -91,13 +91,21 @@ fi # Link python pacakges in ush/python # TODO: This will be unnecessary when these are part of the virtualenv -packages=("wxflow" "jcb") +packages=("wxflow") for package in "${packages[@]}"; do cd "${HOMEgfs}/ush/python" || exit 1 [[ -s "${package}" ]] && rm -f "${package}" ${LINK} "${HOMEgfs}/sorc/${package}/src/${package}" . done +# Link GDASapp python packages in ush/python +packages=("jcb") +for package in "${packages[@]}"; do + cd "${HOMEgfs}/ush/python" || exit 1 + [[ -s "${package}" ]] && rm -f "${package}" + ${LINK} "${HOMEgfs}/sorc/gdas.cd/sorc/${package}/src/${package}" . +done + # Link wxflow in workflow and ci/scripts # TODO: This will be unnecessary when wxflow is part of the virtualenv cd "${HOMEgfs}/workflow" || exit 1 From 9f425a6670c1756655d468b9f4de911eb61f175e Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 15:49:45 -0400 Subject: [PATCH 18/57] Update GDASapp Hash --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 6742ec62a1..3b1a5a6f4e 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 6742ec62a12d7d6f8129057bcf77cee0e2175022 +Subproject commit 3b1a5a6f4e62734beb71bbd5ce1d9f00a6862483 From 4d36caf4a2ea5429d81c650f0e852fc9b03b0ac3 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 4 Jun 2024 15:07:17 -0500 Subject: [PATCH 19/57] Move some stuff around --- parm/config/gfs/config.atmanl | 6 +++--- parm/config/gfs/config.atmensanl | 2 +- .../atm_berror_bump.yaml.j2} | 0 .../atm_berror_gsibec.yaml.j2} | 0 .../atm_lgetkf_bkg.yaml.j2} | 0 .../atm_var_bkg.yaml.j2} | 0 .../atm_var_fv3ens.yaml.j2} | 0 ush/python/pygfs/task/atm_analysis.py | 14 +++++++------- ush/python/pygfs/task/atmens_analysis.py | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) rename parm/gdas/{atm_berror_bump_staging.yaml.j2 => staging/atm_berror_bump.yaml.j2} (100%) rename parm/gdas/{atm_berror_gsibec_staging.yaml.j2 => staging/atm_berror_gsibec.yaml.j2} (100%) rename parm/gdas/{atm_lgetkf_bkg_staging.yaml.j2 => staging/atm_lgetkf_bkg.yaml.j2} (100%) rename parm/gdas/{atm_var_bkg_staging.yaml.j2 => staging/atm_var_bkg.yaml.j2} (100%) rename parm/gdas/{atm_var_fv3ens_staging.yaml.j2 => staging/atm_var_fv3ens.yaml.j2} (100%) diff --git a/parm/config/gfs/config.atmanl b/parm/config/gfs/config.atmanl index 90f4c398f8..13c9ac5e90 100644 --- a/parm/config/gfs/config.atmanl +++ b/parm/config/gfs/config.atmanl @@ -23,9 +23,9 @@ fi export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" -export VAR_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_var_bkg_staging.yaml.j2" -export BERROR_STAGING_YAML="${PARMgfs}/gdas/atm_berror_${STATICB_TYPE}_staging.yaml.j2" -export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/atm_var_fv3ens_staging.yaml.j2" +export VAR_BKG_STAGING_YAML="${PARMgfs}/gdas/staging/atm_var_bkg.yaml.j2" +export BERROR_STAGING_YAML="${PARMgfs}/gdas/staging/atm_berror_${STATICB_TYPE}.yaml.j2" +export FV3ENS_STAGING_YAML="${PARMgfs}/gdas/staging/atm_var_fv3ens.yaml.j2" export layout_x_atmanl=@LAYOUT_X_ATMANL@ export layout_y_atmanl=@LAYOUT_Y_ATMANL@ diff --git a/parm/config/gfs/config.atmensanl b/parm/config/gfs/config.atmensanl index 4a80f969ad..3f7b016d97 100644 --- a/parm/config/gfs/config.atmensanl +++ b/parm/config/gfs/config.atmensanl @@ -12,7 +12,7 @@ export INTERP_METHOD='barycentric' export CRTM_FIX_YAML="${PARMgfs}/gdas/atm_crtm_coeff.yaml.j2" export JEDI_FIX_YAML="${PARMgfs}/gdas/atm_jedi_fix.yaml.j2" -export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/atm_lgetkf_bkg_staging.yaml.j2" +export LGETKF_BKG_STAGING_YAML="${PARMgfs}/gdas/staging/atm_lgetkf_bkg.yaml.j2" export layout_x_atmensanl=@LAYOUT_X_ATMENSANL@ export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@ diff --git a/parm/gdas/atm_berror_bump_staging.yaml.j2 b/parm/gdas/staging/atm_berror_bump.yaml.j2 similarity index 100% rename from parm/gdas/atm_berror_bump_staging.yaml.j2 rename to parm/gdas/staging/atm_berror_bump.yaml.j2 diff --git a/parm/gdas/atm_berror_gsibec_staging.yaml.j2 b/parm/gdas/staging/atm_berror_gsibec.yaml.j2 similarity index 100% rename from parm/gdas/atm_berror_gsibec_staging.yaml.j2 rename to parm/gdas/staging/atm_berror_gsibec.yaml.j2 diff --git a/parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 similarity index 100% rename from parm/gdas/atm_lgetkf_bkg_staging.yaml.j2 rename to parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 diff --git a/parm/gdas/atm_var_bkg_staging.yaml.j2 b/parm/gdas/staging/atm_var_bkg.yaml.j2 similarity index 100% rename from parm/gdas/atm_var_bkg_staging.yaml.j2 rename to parm/gdas/staging/atm_var_bkg.yaml.j2 diff --git a/parm/gdas/atm_var_fv3ens_staging.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 similarity index 100% rename from parm/gdas/atm_var_fv3ens_staging.yaml.j2 rename to parm/gdas/staging/atm_var_fv3ens.yaml.j2 diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 911b83478e..c57f122808 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -86,21 +86,21 @@ def initialize(self: Analysis) -> None: # stage static background error files, otherwise it will assume ID matrix logger.info(f"Stage files for STATICB_TYPE {self.task_config.STATICB_TYPE}") if self.task_config.STATICB_TYPE != 'identity': - berror_fix_list = parse_j2yaml(self.task_config.BERROR_STAGING_YAML, self.task_config) + berror_staging_dict = parse_j2yaml(self.task_config.BERROR_STAGING_YAML, self.task_config) else: - berror_fix_list = {} - FileHandler(berror_fix_list).sync() + berror_staging_dict = {} + FileHandler(berror_staging_dict).sync() # stage ensemble files for use in hybrid background error if self.task_config.DOHYBVAR: logger.debug(f"Stage ensemble files for DOHYBVAR {self.task_config.DOHYBVAR}") - fv3ens_fix_list = parse_j2yaml(self.task_config.FV3ENS_STAGING_YAML, self.task_config) - FileHandler(fv3ens_fix_list).sync() + fv3ens_staging_dict = parse_j2yaml(self.task_config.FV3ENS_STAGING_YAML, self.task_config) + FileHandler(fv3ens_staging_dict).sync() # stage backgrounds logger.info(f"Staging background files from {self.task_config.VAR_BKG_STAGING_YAML}") - bkg_fix_list = parse_j2yaml(self.task_config.VAR_BKG_STAGING_YAML, self.task_config) - FileHandler(bkg_fix_list).sync() + bkg_staging_dict = parse_j2yaml(self.task_config.VAR_BKG_STAGING_YAML, self.task_config) + FileHandler(bkg_staging_dict).sync() # generate variational YAML file logger.debug(f"Generate variational YAML file: {self.task_config.jedi_yaml}") diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index 9ee7746279..e6cafae63b 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -89,8 +89,8 @@ def initialize(self: Analysis) -> None: # stage backgrounds logger.info(f"Stage ensemble member background files") - bkg_fix_list = parse_j2yaml(self.task_config.LGETKF_BKG_STAGING_YAML, self.task_config) - FileHandler(bkg_fix_list).sync() + bkg_staging_dict = parse_j2yaml(self.task_config.LGETKF_BKG_STAGING_YAML, self.task_config) + FileHandler(bkg_staging_dict).sync() # generate ensemble da YAML file logger.debug(f"Generate ensemble da YAML file: {self.task_config.jedi_yaml}") From 9e357f965a3e9f449999f0b34f900b0261bdfb7b Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 20:40:58 +0000 Subject: [PATCH 20/57] gdas hash --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index cf4f3b5d04..bbc4be3ded 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit cf4f3b5d04ba0d852bf98434022cde6b2682fa42 +Subproject commit bbc4be3dedc158f4f4809c85daf850a5d4f630f6 From ba2d12d9e93ceb0155e729c49993edb3014e9ef9 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Wed, 5 Jun 2024 09:11:10 -0500 Subject: [PATCH 21/57] Add time loop for some staging --- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 5 ++++- parm/gdas/staging/atm_var_bkg.yaml.j2 | 5 ++++- parm/gdas/staging/atm_var_fv3ens.yaml.j2 | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index f62fdd7841..427401ff24 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -1,5 +1,5 @@ {% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} -{% set prefix = current_cycle | to_fv3time %} +{% set time_list = [current_cycle] %} mkdir: {% for imem in range(1,NMEM_ENS+1) %} @@ -8,6 +8,8 @@ mkdir: - '{{ DATA }}/anl/{{ memchar }}' {% endfor %} copy: +{% for time in time_list %} +{% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) @@ -25,3 +27,4 @@ copy: {% endfor %} {% endfor %} {% endfor %} +{% endfor %} diff --git a/parm/gdas/staging/atm_var_bkg.yaml.j2 b/parm/gdas/staging/atm_var_bkg.yaml.j2 index 8e88ef3c56..31c83d6ae2 100644 --- a/parm/gdas/staging/atm_var_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_var_bkg.yaml.j2 @@ -1,11 +1,13 @@ {% set src_dir = COM_ATMOS_RESTART_PREV %} {% set dest_dir = DATA ~ '/bkg' %} {% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} -{% set prefix = current_cycle | to_fv3time %} +{% set time_list = [current_cycle] %} mkdir: - '{{ dest_dir }}' copy: +{% for time in time_list %} +{% set prefix = time | to_fv3time %} {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] {% for ftype in ftype_list %} @@ -14,3 +16,4 @@ copy: - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] {% endfor %} {% endfor %} +{% endfor %} diff --git a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 index a6f8c3847a..e62217e818 100644 --- a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 +++ b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 @@ -1,5 +1,5 @@ {% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} -{% set prefix = current_cycle | to_fv3time %} +{% set time_list = [current_cycle] %} mkdir: {% for imem in range(1,NMEM_ENS+1) %} @@ -8,6 +8,8 @@ mkdir: - '{{ dest_dir }}' {% endfor %} copy: +{% for time in time_list %} +{% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) @@ -25,3 +27,4 @@ copy: {% endfor %} {% endfor %} {% endfor %} +{% endfor %} From d0d4429eed38b5b35e6ff7d4ca5006db76a1a726 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 15:04:48 +0000 Subject: [PATCH 22/57] bump gdas --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 3b1a5a6f4e..aaaded8fea 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 3b1a5a6f4e62734beb71bbd5ce1d9f00a6862483 +Subproject commit aaaded8fea6358f6dedac31f9ef62a15d5e08508 From ee1aa30565ccbebaf5790773a21fb670d1e09268 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 15:28:02 +0000 Subject: [PATCH 23/57] bump gdas --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index bbc4be3ded..6c7c58aeb2 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit bbc4be3dedc158f4f4809c85daf850a5d4f630f6 +Subproject commit 6c7c58aeb22bbe6d6f98ed51f1089ea2ecb6b9b8 From 09ec0213198ecda06a6aea5f71d6ec52b446d218 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 17:27:47 +0000 Subject: [PATCH 24/57] hashes --- sorc/gdas.cd | 2 +- sorc/jcb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 6c7c58aeb2..0e60de3228 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 6c7c58aeb22bbe6d6f98ed51f1089ea2ecb6b9b8 +Subproject commit 0e60de322862d91895e0945654b23a08d1fd6009 diff --git a/sorc/jcb b/sorc/jcb index d167c6c273..cd04b800da 160000 --- a/sorc/jcb +++ b/sorc/jcb @@ -1 +1 @@ -Subproject commit d167c6c27312ae6fbd9d82c2747fecc6687eb0f9 +Subproject commit cd04b800dab9a2b1153aea5da0de1dc2073f21cb From a5db89e1a5ae16de521bd82266d200e66621f4dc Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 20:06:59 +0000 Subject: [PATCH 25/57] update gdas hash --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index aaaded8fea..0cda73bab8 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit aaaded8fea6358f6dedac31f9ef62a15d5e08508 +Subproject commit 0cda73bab89af06fa9fccd172cad43fb04e5281c From 1bafbe8909b6176fac4a87e1d7344ebfc23cd7ad Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 20:18:08 +0000 Subject: [PATCH 26/57] bring russ change in --- parm/archive/enkf.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/archive/enkf.yaml.j2 b/parm/archive/enkf.yaml.j2 index e05aca2981..ed50a1749d 100644 --- a/parm/archive/enkf.yaml.j2 +++ b/parm/archive/enkf.yaml.j2 @@ -16,7 +16,7 @@ enkf: {% endfor %} {% if DO_JEDIATMENS %} - {% set steps = ["atmensanlinit", "atmensanlrun", "atmensanlfinal"] %} + {% set steps = ["atmensanlinit", "atmensanlletkf", "atmensanlfv3inc", "atmensanlfinal"] %} {% else %} {% set steps = ["eobs", "eupd"] %} {% if lobsdiag_forenkf %} From e52e0de2b269eeca42c30c57459b937100a19f30 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 6 Jun 2024 20:23:14 +0000 Subject: [PATCH 27/57] follow russ for GSI utils hash --- sorc/gsi_utils.fd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gsi_utils.fd b/sorc/gsi_utils.fd index d940406161..bb03e172e0 160000 --- a/sorc/gsi_utils.fd +++ b/sorc/gsi_utils.fd @@ -1 +1 @@ -Subproject commit d9404061611553459394173c3ff33116db306326 +Subproject commit bb03e172e0d0d9c56d6da7788ca033bfb5ef5119 From 4d3150ca5e692104dbad0d0aa57f0a9d3f6a1a82 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Fri, 7 Jun 2024 02:09:06 +0000 Subject: [PATCH 28/57] revert gsi utils --- sorc/gsi_utils.fd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gsi_utils.fd b/sorc/gsi_utils.fd index bb03e172e0..d940406161 160000 --- a/sorc/gsi_utils.fd +++ b/sorc/gsi_utils.fd @@ -1 +1 @@ -Subproject commit bb03e172e0d0d9c56d6da7788ca033bfb5ef5119 +Subproject commit d9404061611553459394173c3ff33116db306326 From f70b0ad92f0022f478802a7f6394f99b175fa14d Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Fri, 7 Jun 2024 08:36:47 -0500 Subject: [PATCH 29/57] Remove all references to mytask.config and mytask.runtime_config --- ush/python/pygfs/task/aero_analysis.py | 32 +++++++++++----------- ush/python/pygfs/task/aero_emissions.py | 4 ++- ush/python/pygfs/task/analysis.py | 10 +++---- ush/python/pygfs/task/archive.py | 11 ++++---- ush/python/pygfs/task/atm_analysis.py | 32 +++++++++++----------- ush/python/pygfs/task/atmens_analysis.py | 24 ++++++++-------- ush/python/pygfs/task/oceanice_products.py | 21 +++++++------- ush/python/pygfs/task/snow_analysis.py | 22 +++++++-------- ush/python/pygfs/task/upp.py | 17 ++++++------ 9 files changed, 89 insertions(+), 84 deletions(-) diff --git a/ush/python/pygfs/task/aero_analysis.py b/ush/python/pygfs/task/aero_analysis.py index 16d2735090..e67dc6e270 100644 --- a/ush/python/pygfs/task/aero_analysis.py +++ b/ush/python/pygfs/task/aero_analysis.py @@ -29,33 +29,33 @@ class AerosolAnalysis(Analysis): def __init__(self, config): super().__init__(config) - _res = int(self.config['CASE'][1:]) - _res_anl = int(self.config['CASE_ANL'][1:]) - _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config['assim_freq']}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") + _res = int(self.task_config['CASE'][1:]) + _res_anl = int(self.task_config['CASE_ANL'][1:]) + _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config['assim_freq']}H") / 2) + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config['cyc']:02d}z.aerovar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( { 'npx_ges': _res + 1, 'npy_ges': _res + 1, - 'npz_ges': self.config.LEVS - 1, - 'npz': self.config.LEVS - 1, + 'npz_ges': self.task_config.LEVS - 1, + 'npz': self.task_config.LEVS - 1, 'npx_anl': _res_anl + 1, 'npy_anl': _res_anl + 1, - 'npz_anl': self.config['LEVS'] - 1, + 'npz_anl': self.task_config['LEVS'] - 1, 'AERO_WINDOW_BEGIN': _window_begin, - 'AERO_WINDOW_LENGTH': f"PT{self.config['assim_freq']}H", - 'aero_bkg_fhr': map(int, str(self.config['aero_bkg_times']).split(',')), - 'OPREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", + 'AERO_WINDOW_LENGTH': f"PT{self.task_config['assim_freq']}H", + 'aero_bkg_fhr': map(int, str(self.task_config['aero_bkg_times']).split(',')), + 'OPREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, } ) - # task_config is everything that this task should need - self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) + # Extend task_config with local_dict + self.task_config = AttrDict(**self.task_config, **local_dict) @logit(logger) def initialize(self: Analysis) -> None: @@ -157,8 +157,8 @@ def finalize(self: Analysis) -> None: archive.add(diaggzip, arcname=os.path.basename(diaggzip)) # copy full YAML from executable to ROTDIR - src = os.path.join(self.task_config['DATA'], f"{self.task_config['CDUMP']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") - dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['CDUMP']}.t{self.runtime_config['cyc']:02d}z.aerovar.yaml") + src = os.path.join(self.task_config['DATA'], f"{self.task_config['CDUMP']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") + dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['CDUMP']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") yaml_copy = { 'mkdir': [self.task_config.COM_CHEM_ANALYSIS], 'copy': [[src, dest]] diff --git a/ush/python/pygfs/task/aero_emissions.py b/ush/python/pygfs/task/aero_emissions.py index 17d2f528e4..5f2d4c6840 100644 --- a/ush/python/pygfs/task/aero_emissions.py +++ b/ush/python/pygfs/task/aero_emissions.py @@ -42,7 +42,9 @@ def __init__(self, config: Dict[str, Any]) -> None: localdict = AttrDict( {'variable_used_repeatedly': local_variable} ) - self.task_config = AttrDict(**self.config, **self.runtime_config, **localdict) + + # Extend task_config with localdict + self.task_config = AttrDict(**self.task_config, **localdict) @staticmethod @logit(logger) diff --git a/ush/python/pygfs/task/analysis.py b/ush/python/pygfs/task/analysis.py index 4b9d6d8bbd..e407cf1765 100644 --- a/ush/python/pygfs/task/analysis.py +++ b/ush/python/pygfs/task/analysis.py @@ -27,7 +27,7 @@ class Analysis(Task): def __init__(self, config: Dict[str, Any]) -> None: super().__init__(config) # Store location of GDASApp jinja2 templates - self.gdasapp_j2tmpl_dir = os.path.join(self.config.PARMgfs, 'gdas') + self.gdasapp_j2tmpl_dir = os.path.join(self.task_config.PARMgfs, 'gdas') def initialize(self) -> None: super().initialize() @@ -54,7 +54,7 @@ def get_jedi_config(self, algorithm: Optional[str] = None) -> Dict[str, Any]: ---------- algorithm (optional) : str Name of the algorithm to use in the JEDI configuration. Will override the algorithm - set in the self.config.JCB_<>_YAML file + set in the self.task_config.JCB_<>_YAML file Returns ---------- @@ -120,7 +120,7 @@ def get_obs_dict(self) -> Dict[str, Any]: basename = os.path.basename(obfile) copylist.append([os.path.join(self.task_config['COM_OBS'], basename), obfile]) obs_dict = { - 'mkdir': [os.path.join(self.runtime_config['DATA'], 'obs')], + 'mkdir': [os.path.join(self.task_config['DATA'], 'obs')], 'copy': copylist } return obs_dict @@ -161,7 +161,7 @@ def get_bias_dict(self) -> Dict[str, Any]: # TODO: Why is this specific to ATMOS? bias_dict = { - 'mkdir': [os.path.join(self.runtime_config.DATA, 'bc')], + 'mkdir': [os.path.join(self.task_config.DATA, 'bc')], 'copy': copylist } return bias_dict @@ -180,7 +180,7 @@ def add_fv3_increments(self, inc_file_tmpl: str, bkg_file_tmpl: str, incvars: Li List of increment variables to add to the background """ - for itile in range(1, self.config.ntiles + 1): + for itile in range(1, self.task_config.ntiles + 1): inc_path = inc_file_tmpl.format(tilenum=itile) bkg_path = bkg_file_tmpl.format(tilenum=itile) with Dataset(inc_path, mode='r') as incfile, Dataset(bkg_path, mode='a') as rstfile: diff --git a/ush/python/pygfs/task/archive.py b/ush/python/pygfs/task/archive.py index 66d94878e8..31ff902188 100644 --- a/ush/python/pygfs/task/archive.py +++ b/ush/python/pygfs/task/archive.py @@ -35,12 +35,13 @@ def __init__(self, config: Dict[str, Any]) -> None: """ super().__init__(config) - rotdir = self.config.ROTDIR + os.sep + rotdir = self.task_config.ROTDIR + os.sep # Find all absolute paths in the environment and get their relative paths from ${ROTDIR} path_dict = self._gen_relative_paths(rotdir) - self.task_config = AttrDict(**self.config, **self.runtime_config, **path_dict) + # Extend task_config with path_dict + self.task_config = AttrDict(**self.task_config, **path_dict) @logit(logger) def configure(self, arch_dict: Dict[str, Any]) -> (Dict[str, Any], List[Dict[str, Any]]): @@ -297,7 +298,7 @@ def _create_tarball(target: str, fileset: List) -> None: @logit(logger) def _gen_relative_paths(self, root_path: str) -> Dict: - """Generate a dict of paths in self.config relative to root_path + """Generate a dict of paths in self.task_config relative to root_path Parameters ---------- @@ -308,13 +309,13 @@ def _gen_relative_paths(self, root_path: str) -> Dict: ------ rel_path_dict : Dict Dictionary of paths relative to root_path. Members will be named - based on the dict names in self.config. For COM paths, the names will + based on the dict names in self.task_config. For COM paths, the names will follow COM_ --> _dir. For all other directories, the names will follow --> _dir. """ rel_path_dict = {} - for key, value in self.config.items(): + for key, value in self.task_config.items(): if isinstance(value, str): if root_path in value: rel_path = value.replace(root_path, "") diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index c57f122808..394ba89277 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -28,35 +28,35 @@ class AtmAnalysis(Analysis): def __init__(self, config): super().__init__(config) - _res = int(self.config.CASE[1:]) - _res_anl = int(self.config.CASE_ANL[1:]) - _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.atmvar.yaml") + _res = int(self.task_config.CASE[1:]) + _res_anl = int(self.task_config.CASE_ANL[1:]) + _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config.assim_freq}H") / 2) + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( { 'npx_ges': _res + 1, 'npy_ges': _res + 1, - 'npz_ges': self.config.LEVS - 1, - 'npz': self.config.LEVS - 1, + 'npz_ges': self.task_config.LEVS - 1, + 'npz': self.task_config.LEVS - 1, 'npx_anl': _res_anl + 1, 'npy_anl': _res_anl + 1, - 'npz_anl': self.config.LEVS - 1, + 'npz_anl': self.task_config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, - 'ATM_WINDOW_LENGTH': f"PT{self.config.assim_freq}H", - 'OPREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", + 'ATM_WINDOW_LENGTH': f"PT{self.task_config.assim_freq}H", + 'OPREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, - 'atm_obsdatain_path': f"{self.runtime_config.DATA}/obs/", - 'atm_obsdataout_path': f"{self.runtime_config.DATA}/diags/", + 'atm_obsdatain_path': f"{self.task_config.DATA}/obs/", + 'atm_obsdataout_path': f"{self.task_config.DATA}/diags/", 'BKG_TSTEP': "PT1H" # Placeholder for 4D applications } ) - # task_config is everything that this task should need - self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) + # Extend task_config with local_dict + self.task_config = AttrDict(**self.task_config, **local_dict) @logit(logger) def initialize(self: Analysis) -> None: @@ -140,7 +140,7 @@ def variational(self: Analysis) -> None: @logit(logger) def init_fv3_increment(self: Analysis) -> None: # Setup JEDI YAML file - self.task_config.jedi_yaml = os.path.join(self.runtime_config.DATA, + self.task_config.jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.JCB_ALGO}.yaml") save_as_yaml(self.get_jedi_config(self.task_config.JCB_ALGO), self.task_config.jedi_yaml) diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index e6cafae63b..5603184ed8 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -29,22 +29,22 @@ class AtmEnsAnalysis(Analysis): def __init__(self, config): super().__init__(config) - _res = int(self.config.CASE_ENS[1:]) - _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.atmens.yaml") + _res = int(self.task_config.CASE_ENS[1:]) + _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config.assim_freq}H") / 2) + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( { 'npx_ges': _res + 1, 'npy_ges': _res + 1, - 'npz_ges': self.config.LEVS - 1, - 'npz': self.config.LEVS - 1, + 'npz_ges': self.task_config.LEVS - 1, + 'npz': self.task_config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, - 'ATM_WINDOW_LENGTH': f"PT{self.config.assim_freq}H", - 'OPREFIX': f"{self.config.EUPD_CYC}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'GPREFIX': f"gdas.t{self.runtime_config.previous_cycle.hour:02d}z.", + 'ATM_WINDOW_LENGTH': f"PT{self.task_config.assim_freq}H", + 'OPREFIX': f"{self.task_config.EUPD_CYC}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, 'atm_obsdatain_path': f"./obs/", 'atm_obsdataout_path': f"./diags/", @@ -52,8 +52,8 @@ def __init__(self, config): } ) - # task_config is everything that this task should need - self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) + # Extend task_config with local_dict + self.task_config = AttrDict(**self.task_config, **local_dict) @logit(logger) def initialize(self: Analysis) -> None: @@ -145,7 +145,7 @@ def letkf(self: Analysis) -> None: @logit(logger) def init_fv3_increment(self: Analysis) -> None: # Setup JEDI YAML file - self.task_config.jedi_yaml = os.path.join(self.runtime_config.DATA, + self.task_config.jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.JCB_ALGO}.yaml") save_as_yaml(self.get_jedi_config(self.task_config.JCB_ALGO), self.task_config.jedi_yaml) diff --git a/ush/python/pygfs/task/oceanice_products.py b/ush/python/pygfs/task/oceanice_products.py index c865a9f408..d630fcd921 100644 --- a/ush/python/pygfs/task/oceanice_products.py +++ b/ush/python/pygfs/task/oceanice_products.py @@ -49,33 +49,34 @@ def __init__(self, config: Dict[str, Any]) -> None: """ super().__init__(config) - if self.config.COMPONENT not in self.VALID_COMPONENTS: - raise NotImplementedError(f'{self.config.COMPONENT} is not a valid model component.\n' + + if self.task_config.COMPONENT not in self.VALID_COMPONENTS: + raise NotImplementedError(f'{self.task_config.COMPONENT} is not a valid model component.\n' + 'Valid model components are:\n' + f'{", ".join(self.VALID_COMPONENTS)}') - model_grid = f"mx{self.config[self.COMPONENT_RES_MAP[self.config.COMPONENT]]:03d}" + model_grid = f"mx{self.task_config[self.COMPONENT_RES_MAP[self.task_config.COMPONENT]]:03d}" - valid_datetime = add_to_datetime(self.runtime_config.current_cycle, to_timedelta(f"{self.config.FORECAST_HOUR}H")) + valid_datetime = add_to_datetime(self.task_config.current_cycle, to_timedelta(f"{self.task_config.FORECAST_HOUR}H")) # TODO: This is a bit of a hack, but it works for now # FIXME: find a better way to provide the averaging period # This will be different for ocean and ice, so when they are made flexible, this will need to be addressed - avg_period = f"{self.config.FORECAST_HOUR-self.config.FHOUT_OCNICE_GFS:03d}-{self.config.FORECAST_HOUR:03d}" + avg_period = f"{self.task_config.FORECAST_HOUR-self.task_config.FHOUT_OCNICE_GFS:03d}-{self.task_config.FORECAST_HOUR:03d}" + # Extend task_config with localdict localdict = AttrDict( - {'component': self.config.COMPONENT, - 'forecast_hour': self.config.FORECAST_HOUR, + {'component': self.task_config.COMPONENT, + 'forecast_hour': self.task_config.FORECAST_HOUR, 'valid_datetime': valid_datetime, 'avg_period': avg_period, 'model_grid': model_grid, 'product_grids': self.VALID_PRODUCT_GRIDS[model_grid]} ) - self.task_config = AttrDict(**self.config, **self.runtime_config, **localdict) + self.task_config = AttrDict(**self.task_config, **localdict) # Read the oceanice_products.yaml file for common configuration - logger.info(f"Read the ocean ice products configuration yaml file {self.config.OCEANICEPRODUCTS_CONFIG}") - self.task_config.oceanice_yaml = parse_j2yaml(self.config.OCEANICEPRODUCTS_CONFIG, self.task_config) + logger.info(f"Read the ocean ice products configuration yaml file {self.task_config.OCEANICEPRODUCTS_CONFIG}") + self.task_config.oceanice_yaml = parse_j2yaml(self.task_config.OCEANICEPRODUCTS_CONFIG, self.task_config) logger.debug(f"oceanice_yaml:\n{pformat(self.task_config.oceanice_yaml)}") @staticmethod diff --git a/ush/python/pygfs/task/snow_analysis.py b/ush/python/pygfs/task/snow_analysis.py index 9a5c7fcab0..9656b00a8e 100644 --- a/ush/python/pygfs/task/snow_analysis.py +++ b/ush/python/pygfs/task/snow_analysis.py @@ -32,27 +32,27 @@ class SnowAnalysis(Analysis): def __init__(self, config): super().__init__(config) - _res = int(self.config['CASE'][1:]) - _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config['assim_freq']}H") / 2) - _letkfoi_yaml = os.path.join(self.runtime_config.DATA, f"{self.runtime_config.RUN}.t{self.runtime_config['cyc']:02d}z.letkfoi.yaml") + _res = int(self.task_config['CASE'][1:]) + _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config['assim_freq']}H") / 2) + _letkfoi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config['cyc']:02d}z.letkfoi.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( { 'npx_ges': _res + 1, 'npy_ges': _res + 1, - 'npz_ges': self.config.LEVS - 1, - 'npz': self.config.LEVS - 1, + 'npz_ges': self.task_config.LEVS - 1, + 'npz': self.task_config.LEVS - 1, 'SNOW_WINDOW_BEGIN': _window_begin, - 'SNOW_WINDOW_LENGTH': f"PT{self.config['assim_freq']}H", - 'OPREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", - 'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", + 'SNOW_WINDOW_LENGTH': f"PT{self.task_config['assim_freq']}H", + 'OPREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", + 'APREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", 'jedi_yaml': _letkfoi_yaml } ) - # task_config is everything that this task should need - self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) + # Extend task_config with local_dict + self.task_config = AttrDict(**self.task_config, **local_dict) @logit(logger) def prepare_GTS(self) -> None: @@ -114,7 +114,7 @@ def _gtsbufr2iodax(exe, yaml_file): # 1. generate bufr2ioda YAML files # 2. execute bufr2ioda.x for name in prep_gts_config.bufr2ioda.keys(): - gts_yaml = os.path.join(self.runtime_config.DATA, f"bufr_{name}_snow.yaml") + gts_yaml = os.path.join(self.task_config.DATA, f"bufr_{name}_snow.yaml") logger.info(f"Generate BUFR2IODA YAML file: {gts_yaml}") temp_yaml = parse_j2yaml(prep_gts_config.bufr2ioda[name], localconf) save_as_yaml(temp_yaml, gts_yaml) diff --git a/ush/python/pygfs/task/upp.py b/ush/python/pygfs/task/upp.py index 7db50e1582..7e42e07c64 100644 --- a/ush/python/pygfs/task/upp.py +++ b/ush/python/pygfs/task/upp.py @@ -46,26 +46,27 @@ def __init__(self, config: Dict[str, Any]) -> None: """ super().__init__(config) - if self.config.UPP_RUN not in self.VALID_UPP_RUN: - raise NotImplementedError(f'{self.config.UPP_RUN} is not a valid UPP run type.\n' + + if self.task_config.UPP_RUN not in self.VALID_UPP_RUN: + raise NotImplementedError(f'{self.task_config.UPP_RUN} is not a valid UPP run type.\n' + 'Valid UPP_RUN values are:\n' + f'{", ".join(self.VALID_UPP_RUN)}') - valid_datetime = add_to_datetime(self.runtime_config.current_cycle, to_timedelta(f"{self.config.FORECAST_HOUR}H")) + valid_datetime = add_to_datetime(self.task_config.current_cycle, to_timedelta(f"{self.task_config.FORECAST_HOUR}H")) + # Extend task_config with localdict localdict = AttrDict( - {'upp_run': self.config.UPP_RUN, - 'forecast_hour': self.config.FORECAST_HOUR, + {'upp_run': self.task_config.UPP_RUN, + 'forecast_hour': self.task_config.FORECAST_HOUR, 'valid_datetime': valid_datetime, 'atmos_filename': f"atm_{valid_datetime.strftime('%Y%m%d%H%M%S')}.nc", 'flux_filename': f"sfc_{valid_datetime.strftime('%Y%m%d%H%M%S')}.nc" } ) - self.task_config = AttrDict(**self.config, **self.runtime_config, **localdict) + self.task_config = AttrDict(**self.task_config, **localdict) # Read the upp.yaml file for common configuration - logger.info(f"Read the UPP configuration yaml file {self.config.UPP_CONFIG}") - self.task_config.upp_yaml = parse_j2yaml(self.config.UPP_CONFIG, self.task_config) + logger.info(f"Read the UPP configuration yaml file {self.task_config.UPP_CONFIG}") + self.task_config.upp_yaml = parse_j2yaml(self.task_config.UPP_CONFIG, self.task_config) logger.debug(f"upp_yaml:\n{pformat(self.task_config.upp_yaml)}") @staticmethod From 49f8593dbb131842c803c38b97681d2a8f3525ed Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Fri, 7 Jun 2024 12:53:58 -0500 Subject: [PATCH 30/57] Update wxflow hash --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 8406beeea4..c62196fb2a 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 8406beeea410118cdfbd8300895b2b2878eadba6 +Subproject commit c62196fb2ae8885724e052ff0676b70d811670ea From 2bd99497f38314bdaf044f1555e6873728bbfec3 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Tue, 11 Jun 2024 14:50:44 -0500 Subject: [PATCH 31/57] Tab out Jinja2 templates for readability --- parm/gdas/staging/atm_berror_bump.yaml.j2 | 12 ++++---- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 34 ++++++++++----------- parm/gdas/staging/atm_var_bkg.yaml.j2 | 14 ++++----- parm/gdas/staging/atm_var_fv3ens.yaml.j2 | 36 +++++++++++------------ 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/parm/gdas/staging/atm_berror_bump.yaml.j2 b/parm/gdas/staging/atm_berror_bump.yaml.j2 index 123d15e359..c8767f1010 100644 --- a/parm/gdas/staging/atm_berror_bump.yaml.j2 +++ b/parm/gdas/staging/atm_berror_bump.yaml.j2 @@ -8,16 +8,16 @@ mkdir: copy: {% for ftype in ftype_list %} -{% set prefix = BERROR_DATE | to_fv3time ~ '.' ~ ftype %} -{% set fname = prefix ~ '.coupler.res' %} + {% set prefix = BERROR_DATE | to_fv3time ~ '.' ~ ftype %} + {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% for itile in range(1,7) %} -{% set fname = prefix ~ '.fv_tracer.res.tile' ~ itile ~ '.nc' %} + {% for itile in range(1,7) %} + {% set fname = prefix ~ '.fv_tracer.res.tile' ~ itile ~ '.nc' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} + {% endfor %} {% endfor %} {% for nn in range(1,nprocs+1) %} -{% set fname = 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) %} + {% set fname = 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] {% endfor %} diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index 427401ff24..c654589073 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -3,28 +3,28 @@ mkdir: {% for imem in range(1,NMEM_ENS+1) %} -{% set memchar = 'mem%03d' | format(imem) %} + {% set memchar = 'mem%03d' | format(imem) %} - '{{ DATA }}/bkg/{{ memchar }}' - '{{ DATA }}/anl/{{ memchar }}' {% endfor %} copy: {% for time in time_list %} -{% set prefix = time | to_fv3time %} -{% for imem in range(1,NMEM_ENS+1) %} -{% set memchar = 'mem%03d' | format(imem) %} -{% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) - | replace('${RUN}', 'enkfgdas') - | replace('${YMD}', previous_cycle | to_YMD) - | replace('${HH}', previous_cycle | strftime('%H')) - | replace('${MEMDIR}', memchar) %} -{% set dest_dir = DATA ~ '/bkg/' ~ memchar %} -{% set fname = prefix ~ '.coupler.res' %} + {% set prefix = time | to_fv3time %} + {% for imem in range(1,NMEM_ENS+1) %} + {% set memchar = 'mem%03d' | format(imem) %} + {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) + | replace('${RUN}', 'enkfgdas') + | replace('${YMD}', previous_cycle | to_YMD) + | replace('${HH}', previous_cycle | strftime('%H')) + | replace('${MEMDIR}', memchar) %} + {% set dest_dir = DATA ~ '/bkg/' ~ memchar %} + {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% for ftype in ftype_list %} -{% for itile in range(1,7) %} -{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} + {% for ftype in ftype_list %} + {% for itile in range(1,7) %} + {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} -{% endfor %} -{% endfor %} + {% endfor %} + {% endfor %} + {% endfor %} {% endfor %} diff --git a/parm/gdas/staging/atm_var_bkg.yaml.j2 b/parm/gdas/staging/atm_var_bkg.yaml.j2 index 31c83d6ae2..139b86eea6 100644 --- a/parm/gdas/staging/atm_var_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_var_bkg.yaml.j2 @@ -7,13 +7,13 @@ mkdir: - '{{ dest_dir }}' copy: {% for time in time_list %} -{% set prefix = time | to_fv3time %} -{% set fname = prefix ~ '.coupler.res' %} + {% set prefix = time | to_fv3time %} + {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% for ftype in ftype_list %} -{% for itile in range(1,7) %} -{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} + {% for ftype in ftype_list %} + {% for itile in range(1,7) %} + {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} -{% endfor %} + {% endfor %} + {% endfor %} {% endfor %} diff --git a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 index e62217e818..5a8aa476e7 100644 --- a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 +++ b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 @@ -3,28 +3,28 @@ mkdir: {% for imem in range(1,NMEM_ENS+1) %} -{% set memchar = 'mem%03d' | format(imem) %} -{% set dest_dir = DATA ~ '/ens/' ~ memchar %} + {% set memchar = 'mem%03d' | format(imem) %} + {% set dest_dir = DATA ~ '/ens/' ~ memchar %} - '{{ dest_dir }}' {% endfor %} copy: {% for time in time_list %} -{% set prefix = time | to_fv3time %} -{% for imem in range(1,NMEM_ENS+1) %} -{% set memchar = 'mem%03d' | format(imem) %} -{% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) - | replace('${RUN}', 'enkfgdas') - | replace('${YMD}', previous_cycle | to_YMD) - | replace('${HH}', previous_cycle | strftime('%H')) - | replace('${MEMDIR}', memchar) %} -{% set dest_dir = DATA ~ '/ens/' ~ memchar %} -{% set fname = prefix ~ '.coupler.res' %} + {% set prefix = time | to_fv3time %} + {% for imem in range(1,NMEM_ENS+1) %} + {% set memchar = 'mem%03d' | format(imem) %} + {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) + | replace('${RUN}', 'enkfgdas') + | replace('${YMD}', previous_cycle | to_YMD) + | replace('${HH}', previous_cycle | strftime('%H')) + | replace('${MEMDIR}', memchar) %} + {% set dest_dir = DATA ~ '/ens/' ~ memchar %} + {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% for ftype in ftype_list %} -{% for itile in range(1,7) %} -{% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} + {% for ftype in ftype_list %} + {% for itile in range(1,7) %} + {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] -{% endfor %} -{% endfor %} -{% endfor %} + {% endfor %} + {% endfor %} + {% endfor %} {% endfor %} From 488a3de2addb1e3124cbfbd050fd061d2d33575b Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 13 Jun 2024 15:29:33 +0000 Subject: [PATCH 32/57] update gdas hash --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 0cda73bab8..368c9c5db9 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 0cda73bab89af06fa9fccd172cad43fb04e5281c +Subproject commit 368c9c5db9b5ea62e72937b6d1b0f753adb9be40 From 2cb6664bfb80a20af4cd5f8f472c5051df186ece Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Thu, 13 Jun 2024 15:41:14 +0000 Subject: [PATCH 33/57] Use replace_tmpl filter --- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 11 ++++++----- parm/gdas/staging/atm_var_fv3ens.yaml.j2 | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index c654589073..595d9541f2 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -12,11 +12,12 @@ copy: {% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} - {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) - | replace('${RUN}', 'enkfgdas') - | replace('${YMD}', previous_cycle | to_YMD) - | replace('${HH}', previous_cycle | strftime('%H')) - | replace('${MEMDIR}', memchar) %} + {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, + '${RUN}': 'enkfgdas', + '${YMD}': previous_cycle | to_YMD, + '${HH}': previous_cycle | strftime('%H'), + '${MEMDIR}': memchar }) %} + {% set src_dir = COM_ATMOS_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) %} {% set dest_dir = DATA ~ '/bkg/' ~ memchar %} {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] diff --git a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 index 5a8aa476e7..a0ab149716 100644 --- a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 +++ b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 @@ -12,11 +12,12 @@ copy: {% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} - {% set src_dir = COM_ATMOS_RESTART_TMPL | replace('${ROTDIR}', ROTDIR) - | replace('${RUN}', 'enkfgdas') - | replace('${YMD}', previous_cycle | to_YMD) - | replace('${HH}', previous_cycle | strftime('%H')) - | replace('${MEMDIR}', memchar) %} + {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, + '${RUN}': 'enkfgdas', + '${YMD}': previous_cycle | to_YMD, + '${HH}': previous_cycle | strftime('%H'), + '${MEMDIR}': memchar }) %} + {% set src_dir = COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) %} {% set dest_dir = DATA ~ '/ens/' ~ memchar %} {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] From bd7f7709c7d35f106e75445116e35d6d8653043c Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Thu, 13 Jun 2024 15:54:38 +0000 Subject: [PATCH 34/57] Update wxflow hash --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index c62196fb2a..eaafa49e4d 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit c62196fb2ae8885724e052ff0676b70d811670ea +Subproject commit eaafa49e4de9a4505034e84d17208f4b0fdeaa2a From 23971d23e27162cbf79f444be609084cbab78ac2 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 13 Jun 2024 17:48:20 +0000 Subject: [PATCH 35/57] mod --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 6cb9f375eb..5c9e569243 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,6 +8,9 @@ [submodule "sorc/gfs_utils.fd"] path = sorc/gfs_utils.fd url = https://github.com/NOAA-EMC/gfs-utils +[submodule "sorc/ufs_utils.fd"] + path = sorc/ufs_utils.fd + url = https://github.com/ufs-community/UFS_UTILS.git [submodule "sorc/verif-global.fd"] path = sorc/verif-global.fd url = https://github.com/NOAA-EMC/EMC_verif-global.git From d5cb822a6d34592d6c2e08fd57b473579930ce23 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Thu, 13 Jun 2024 17:51:52 +0000 Subject: [PATCH 36/57] add back ufsutils --- sorc/ufs_utils.fd | 1 + 1 file changed, 1 insertion(+) create mode 160000 sorc/ufs_utils.fd diff --git a/sorc/ufs_utils.fd b/sorc/ufs_utils.fd new file mode 160000 index 0000000000..2794d413d0 --- /dev/null +++ b/sorc/ufs_utils.fd @@ -0,0 +1 @@ +Subproject commit 2794d413d083b43d9ba37a15375d5c61b610d29e From f8a18be122484f9674a5b9fe0ba2490d464e6e47 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Fri, 14 Jun 2024 17:20:39 +0000 Subject: [PATCH 37/57] Update wxflow hash and fix big in lgetkf staging file --- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 9 ++++++++- sorc/wxflow | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index 595d9541f2..14da620db0 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -4,8 +4,15 @@ mkdir: {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} + {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, + '${RUN}': RUN, + '${YMD}': current_cycle | to_YMD, + '${HH}': current_cycle | strftime('%H'), + '${MEMDIR}': memchar }) %} + {% set anl_rotdir = COM_ATMOS_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) %} - '{{ DATA }}/bkg/{{ memchar }}' - '{{ DATA }}/anl/{{ memchar }}' +- '{{ anl_rotdir }}' {% endfor %} copy: {% for time in time_list %} @@ -17,7 +24,7 @@ copy: '${YMD}': previous_cycle | to_YMD, '${HH}': previous_cycle | strftime('%H'), '${MEMDIR}': memchar }) %} - {% set src_dir = COM_ATMOS_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) %} + {% set src_dir = COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) %} {% set dest_dir = DATA ~ '/bkg/' ~ memchar %} {% set fname = prefix ~ '.coupler.res' %} - ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] diff --git a/sorc/wxflow b/sorc/wxflow index eaafa49e4d..6a790fcf5d 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit eaafa49e4de9a4505034e84d17208f4b0fdeaa2a +Subproject commit 6a790fcf5d5c20e1b797bcceea04798f192f9fb3 From 2c8feb5d7e771456ddc65d7e71e186adf20827d2 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 17 Jun 2024 14:50:16 +0000 Subject: [PATCH 38/57] Simplify Jinja2 templates a bit --- parm/gdas/staging/atm_berror_bump.yaml.j2 | 16 ++++------------ parm/gdas/staging/atm_berror_gsibec.yaml.j2 | 6 ++---- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 12 +++--------- parm/gdas/staging/atm_var_bkg.yaml.j2 | 11 +++-------- parm/gdas/staging/atm_var_fv3ens.yaml.j2 | 13 +++---------- 5 files changed, 15 insertions(+), 43 deletions(-) diff --git a/parm/gdas/staging/atm_berror_bump.yaml.j2 b/parm/gdas/staging/atm_berror_bump.yaml.j2 index c8767f1010..1788e1558a 100644 --- a/parm/gdas/staging/atm_berror_bump.yaml.j2 +++ b/parm/gdas/staging/atm_berror_bump.yaml.j2 @@ -1,23 +1,15 @@ -{% set src_dir = BERROR_DATA_DIR %} -{% set dest_dir = DATA ~ '/berror' %} {% set ftype_list = ['cor_rh', 'cor_rv', 'stddev'] %} {% set nprocs = ntiles * layout_x * layout_y %} mkdir: -- '{{ dest_dir }}' - +- ''{{ DATA }}/berror'' copy: {% for ftype in ftype_list %} - {% set prefix = BERROR_DATE | to_fv3time ~ '.' ~ ftype %} - {% set fname = prefix ~ '.coupler.res' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ BERROR_DATA_DIR }}/{{ BERROR_DATE | to_fv3time }}.coupler.res', '{{ DATA }}/berror'] {% for itile in range(1,7) %} - {% set fname = prefix ~ '.fv_tracer.res.tile' ~ itile ~ '.nc' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ BERROR_DATA_DIR }}/{{ BERROR_DATE | to_fv3time }}.fv_tracer.res.tile{{ itile }}.nc', '{{ DATA }}/berror'] {% endfor %} {% endfor %} - {% for nn in range(1,nprocs+1) %} - {% set fname = 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ BERROR_DATA_DIR }}/{{ 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) }}', '{{ DATA }}/berror'] {% endfor %} diff --git a/parm/gdas/staging/atm_berror_gsibec.yaml.j2 b/parm/gdas/staging/atm_berror_gsibec.yaml.j2 index 0affe68030..47df4f7df6 100644 --- a/parm/gdas/staging/atm_berror_gsibec.yaml.j2 +++ b/parm/gdas/staging/atm_berror_gsibec.yaml.j2 @@ -1,10 +1,8 @@ -{% set src_dir = HOMEgfs ~ '/fix/gdas/gsibec/' ~ CASE_ANL %} -{% set dest_dir = DATA ~ '/berror' %} {% set fname_list = ['gfs_gsi_global.nml', 'gsi-coeffs-gfs-global.nc4'] %} mkdir: -- '{{ dest_dir }}' +- '{{ DATA }}/berror' copy: {% for fname in fname_list %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ HOMEgfs }}'/fix/gdas/gsibec/{{ CASE_ANL }}/{{ fname }}', '{{ DATA }}/berror'] {% endfor %} diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index 14da620db0..c592e1607a 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -9,14 +9,12 @@ mkdir: '${YMD}': current_cycle | to_YMD, '${HH}': current_cycle | strftime('%H'), '${MEMDIR}': memchar }) %} - {% set anl_rotdir = COM_ATMOS_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) %} - '{{ DATA }}/bkg/{{ memchar }}' - '{{ DATA }}/anl/{{ memchar }}' -- '{{ anl_rotdir }}' +- '{{ COM_ATMOS_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}' {% endfor %} copy: {% for time in time_list %} - {% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, @@ -24,14 +22,10 @@ copy: '${YMD}': previous_cycle | to_YMD, '${HH}': previous_cycle | strftime('%H'), '${MEMDIR}': memchar }) %} - {% set src_dir = COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) %} - {% set dest_dir = DATA ~ '/bkg/' ~ memchar %} - {% set fname = prefix ~ '.coupler.res' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/bkg/{{ memchar }}/'] {% for ftype in ftype_list %} {% for itile in range(1,7) %} - {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.{{ ftype }}.tile{ itile }}.nc', '{{ DATA }}/bkg/{{ memchar }}/'] {% endfor %} {% endfor %} {% endfor %} diff --git a/parm/gdas/staging/atm_var_bkg.yaml.j2 b/parm/gdas/staging/atm_var_bkg.yaml.j2 index 139b86eea6..3cb15e6c48 100644 --- a/parm/gdas/staging/atm_var_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_var_bkg.yaml.j2 @@ -1,19 +1,14 @@ -{% set src_dir = COM_ATMOS_RESTART_PREV %} -{% set dest_dir = DATA ~ '/bkg' %} {% set ftype_list = ['fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data'] %} {% set time_list = [current_cycle] %} mkdir: -- '{{ dest_dir }}' +- '{{ DATA }}/bkg' copy: {% for time in time_list %} - {% set prefix = time | to_fv3time %} - {% set fname = prefix ~ '.coupler.res' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_PREV }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/bkg/'] {% for ftype in ftype_list %} {% for itile in range(1,7) %} - {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_PREV }}/{{ time | to_fv3time }}.{{ ftype }}.tile{{ itile }}.nc', '{{ DATA }}/bkg/'] {% endfor %} {% endfor %} {% endfor %} diff --git a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 index a0ab149716..f2ceff7e91 100644 --- a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 +++ b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 @@ -3,13 +3,10 @@ mkdir: {% for imem in range(1,NMEM_ENS+1) %} - {% set memchar = 'mem%03d' | format(imem) %} - {% set dest_dir = DATA ~ '/ens/' ~ memchar %} -- '{{ dest_dir }}' +- '{{ DATA }}/ens/{{ 'mem%03d' | format(imem) }}' {% endfor %} copy: {% for time in time_list %} - {% set prefix = time | to_fv3time %} {% for imem in range(1,NMEM_ENS+1) %} {% set memchar = 'mem%03d' | format(imem) %} {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, @@ -17,14 +14,10 @@ copy: '${YMD}': previous_cycle | to_YMD, '${HH}': previous_cycle | strftime('%H'), '${MEMDIR}': memchar }) %} - {% set src_dir = COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) %} - {% set dest_dir = DATA ~ '/ens/' ~ memchar %} - {% set fname = prefix ~ '.coupler.res' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/ens/{{ memchar }}/'] {% for ftype in ftype_list %} {% for itile in range(1,7) %} - {% set fname = prefix ~ '.' ~ ftype ~ '.tile' ~ itile ~ '.nc' %} -- ['{{ src_dir }}/{{ fname }}', '{{ dest_dir }}/{{ fname }}'] +- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.{{ ftype }}.tile{{ itile }}.nc', '{{ DATA }}/ens/{{ memchar }}/'] {% endfor %} {% endfor %} {% endfor %} From 2c5ef592d13c980b740f22269344c969517843bf Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 17 Jun 2024 14:57:18 +0000 Subject: [PATCH 39/57] Replace CDUMP with RUN --- ush/python/pygfs/task/aero_analysis.py | 10 +++++----- ush/python/pygfs/task/aero_prepobs.py | 2 +- ush/python/pygfs/task/atm_analysis.py | 12 ++++++------ ush/python/pygfs/task/atmens_analysis.py | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ush/python/pygfs/task/aero_analysis.py b/ush/python/pygfs/task/aero_analysis.py index e67dc6e270..69a992d7d4 100644 --- a/ush/python/pygfs/task/aero_analysis.py +++ b/ush/python/pygfs/task/aero_analysis.py @@ -32,7 +32,7 @@ def __init__(self, config): _res = int(self.task_config['CASE'][1:]) _res_anl = int(self.task_config['CASE_ANL'][1:]) _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config['assim_freq']}H") / 2) - _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config['cyc']:02d}z.aerovar.yaml") + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config['cyc']:02d}z.aerovar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -47,8 +47,8 @@ def __init__(self, config): 'AERO_WINDOW_BEGIN': _window_begin, 'AERO_WINDOW_LENGTH': f"PT{self.task_config['assim_freq']}H", 'aero_bkg_fhr': map(int, str(self.task_config['aero_bkg_times']).split(',')), - 'OPREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", + 'APREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, } @@ -157,8 +157,8 @@ def finalize(self: Analysis) -> None: archive.add(diaggzip, arcname=os.path.basename(diaggzip)) # copy full YAML from executable to ROTDIR - src = os.path.join(self.task_config['DATA'], f"{self.task_config['CDUMP']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") - dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['CDUMP']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") + src = os.path.join(self.task_config['DATA'], f"{self.task_config['RUN']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") + dest = os.path.join(self.task_config.COM_CHEM_ANALYSIS, f"{self.task_config['RUN']}.t{self.task_config['cyc']:02d}z.aerovar.yaml") yaml_copy = { 'mkdir': [self.task_config.COM_CHEM_ANALYSIS], 'copy': [[src, dest]] diff --git a/ush/python/pygfs/task/aero_prepobs.py b/ush/python/pygfs/task/aero_prepobs.py index f2344241a9..bf081ba662 100644 --- a/ush/python/pygfs/task/aero_prepobs.py +++ b/ush/python/pygfs/task/aero_prepobs.py @@ -64,7 +64,7 @@ def initialize(self) -> None: self.task_config.prepaero_config = self.get_obsproc_config(sensor) # generate converter YAML file - template = f"{self.runtime_config.CDUMP}.t{self.runtime_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" + template = f"{self.runtime_config.RUN}.t{self.runtime_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" _prepaero_yaml = os.path.join(self.runtime_config.DATA, template) self.task_config.prepaero_yaml.append(_prepaero_yaml) logger.debug(f"Generate PrepAeroObs YAML file: {_prepaero_yaml}") diff --git a/ush/python/pygfs/task/atm_analysis.py b/ush/python/pygfs/task/atm_analysis.py index 394ba89277..4e9d37335c 100644 --- a/ush/python/pygfs/task/atm_analysis.py +++ b/ush/python/pygfs/task/atm_analysis.py @@ -31,7 +31,7 @@ def __init__(self, config): _res = int(self.task_config.CASE[1:]) _res_anl = int(self.task_config.CASE_ANL[1:]) _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmvar.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -45,8 +45,8 @@ def __init__(self, config): 'npz_anl': self.task_config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, 'ATM_WINDOW_LENGTH': f"PT{self.task_config.assim_freq}H", - 'OPREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", + 'APREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, 'atm_obsdatain_path': f"{self.task_config.DATA}/obs/", @@ -198,8 +198,8 @@ def finalize(self: Analysis) -> None: # copy full YAML from executable to ROTDIR logger.info(f"Copying {self.task_config.jedi_yaml} to {self.task_config.COM_ATMOS_ANALYSIS}") - src = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmvar.yaml") + src = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmvar.yaml") + dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmvar.yaml") logger.debug(f"Copying {src} to {dest}") yaml_copy = { 'mkdir': [self.task_config.COM_ATMOS_ANALYSIS], @@ -244,7 +244,7 @@ def finalize(self: Analysis) -> None: cdate = to_fv3time(self.task_config.current_cycle) cdate_inc = cdate.replace('.', '_') src = os.path.join(self.task_config.DATA, 'anl', f"atminc.{cdate_inc}z.nc4") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f'{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atminc.nc') + dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f'{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atminc.nc') logger.debug(f"Copying {src} to {dest}") inc_copy = { 'copy': [[src, dest]] diff --git a/ush/python/pygfs/task/atmens_analysis.py b/ush/python/pygfs/task/atmens_analysis.py index 5603184ed8..bd5112050e 100644 --- a/ush/python/pygfs/task/atmens_analysis.py +++ b/ush/python/pygfs/task/atmens_analysis.py @@ -31,7 +31,7 @@ def __init__(self, config): _res = int(self.task_config.CASE_ENS[1:]) _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config.assim_freq}H") / 2) - _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") + _jedi_yaml = os.path.join(self.task_config.DATA, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atmens.yaml") # Create a local dictionary that is repeatedly used across this class local_dict = AttrDict( @@ -42,8 +42,8 @@ def __init__(self, config): 'npz': self.task_config.LEVS - 1, 'ATM_WINDOW_BEGIN': _window_begin, 'ATM_WINDOW_LENGTH': f"PT{self.task_config.assim_freq}H", - 'OPREFIX': f"{self.task_config.EUPD_CYC}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN - 'APREFIX': f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.", # TODO: CDUMP is being replaced by RUN + 'OPREFIX': f"{self.task_config.EUPD_CYC}.t{self.task_config.cyc:02d}z.", + 'APREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", 'GPREFIX': f"gdas.t{self.task_config.previous_cycle.hour:02d}z.", 'jedi_yaml': _jedi_yaml, 'atm_obsdatain_path': f"./obs/", @@ -209,8 +209,8 @@ def finalize(self: Analysis) -> None: # 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.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") - dest = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atmens.yaml") + 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], @@ -239,7 +239,7 @@ def finalize(self: Analysis) -> None: tmpl_inc_dict['MEMDIR'] = memchar incdir = Template.substitute_structure(template_inc, TemplateConstants.DOLLAR_CURLY_BRACE, tmpl_inc_dict.get) src = os.path.join(self.task_config.DATA, 'anl', memchar, f"atminc.{cdate_inc}z.nc4") - dest = os.path.join(incdir, f"{self.task_config.CDUMP}.t{self.task_config.cyc:02d}z.atminc.nc") + dest = os.path.join(incdir, f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.atminc.nc") # copy increment logger.debug(f"Copying {src} to {dest}") From dcfc40f58499aa90f8100258a32195a9cdf844e5 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Mon, 17 Jun 2024 15:13:18 +0000 Subject: [PATCH 40/57] Fix bug --- parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 index c592e1607a..eda3dad5a7 100644 --- a/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_lgetkf_bkg.yaml.j2 @@ -25,7 +25,7 @@ copy: - ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/bkg/{{ memchar }}/'] {% for ftype in ftype_list %} {% for itile in range(1,7) %} -- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.{{ ftype }}.tile{ itile }}.nc', '{{ DATA }}/bkg/{{ memchar }}/'] +- ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.{{ ftype }}.tile{{ itile }}.nc', '{{ DATA }}/bkg/{{ memchar }}/'] {% endfor %} {% endfor %} {% endfor %} From 584762a6a459f7e520fcf7f1f56b197c467c5871 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Tue, 18 Jun 2024 19:24:22 +0000 Subject: [PATCH 41/57] update gdas.cd hash to bring in updated jcb, jcb-gdas, and jcb-algorithms --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index c0876c7962..b093825a7a 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit c0876c7962b05827e8bd209f651887bfeabef77c +Subproject commit b093825a7a363488dd377024eb822ce623b4732f From dd6613b236afe090763ed08ce7b4ce49bf887723 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Thu, 20 Jun 2024 14:11:09 +0000 Subject: [PATCH 42/57] remove path specific logic to identify MSU machines (#2695) --- ush/detect_machine.sh | 3 +-- workflow/hosts.py | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index 683ee0db7f..106d903338 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -75,8 +75,7 @@ elif [[ -d /scratch1 ]]; then MACHINE_ID=hera elif [[ -d /work ]]; then # We are on MSU Orion or Hercules - if [[ -d /apps/other ]]; then - # We are on Hercules + if [[ $(findmnt -n -o SOURCE /home) =~ "hercules" ]]; then MACHINE_ID=hercules else MACHINE_ID=orion diff --git a/workflow/hosts.py b/workflow/hosts.py index 2334a3ac35..4b86bf4705 100644 --- a/workflow/hosts.py +++ b/workflow/hosts.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import socket from pathlib import Path from wxflow import YAMLFile @@ -39,10 +40,7 @@ def detect(cls): if os.path.exists('/scratch1/NCEPDEV'): machine = 'HERA' elif os.path.exists('/work/noaa'): - if os.path.exists('/apps/other'): - machine = 'HERCULES' - else: - machine = 'ORION' + machine = socket.gethostname().split("-",1)[0].upper() elif os.path.exists('/lfs4/HFIP'): machine = 'JET' elif os.path.exists('/lfs/f1'): From 826c3c3143bdb3ade5422e4d536c6d03b7881d5f Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Thu, 20 Jun 2024 14:13:08 +0000 Subject: [PATCH 43/57] add ocnanalecen to HERCULES.env (#2699) --- env/HERCULES.env | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/env/HERCULES.env b/env/HERCULES.env index d43dedad8d..92d012f0b7 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -135,6 +135,16 @@ case ${step} in [[ ${NTHREADS_OCNANAL} -gt ${nth_max} ]] && export NTHREADS_OCNANAL=${nth_max} export APRUN_OCNANAL="${launcher} -n ${npe_ocnanalrun} --cpus-per-task=${NTHREADS_OCNANAL}" ;; +"ocnanalecen") + + export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_ocnanalecen)) + + export NTHREADS_OCNANALECEN=${nth_ocnanalecen:-${nth_max}} + [[ ${NTHREADS_OCNANALECEN} -gt ${nth_max} ]] && export NTHREADS_OCNANALECEN=${nth_max} + export APRUN_OCNANALECEN="${launcher} -n ${npe_ocnanalecen} --cpus-per-task=${NTHREADS_OCNANALECEN}" +;; "ocnanalchkpt") export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" From c14607f3645a07b3ef087b488afc1e126ec56292 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Thu, 20 Jun 2024 14:22:15 +0000 Subject: [PATCH 44/57] fix shellcheck error in detect_machine.sh (#2695) --- ush/detect_machine.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index 106d903338..cfd0fa97e2 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -75,7 +75,8 @@ elif [[ -d /scratch1 ]]; then MACHINE_ID=hera elif [[ -d /work ]]; then # We are on MSU Orion or Hercules - if [[ $(findmnt -n -o SOURCE /home) =~ "hercules" ]]; then + mount=$(findmnt -n -o SOURCE /home) + if [[ ${mount} =~ "hercules" ]]; then MACHINE_ID=hercules else MACHINE_ID=orion From 9973c70219d94ae0b0f5401e85bada9d1d0da3f8 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Thu, 20 Jun 2024 14:25:41 +0000 Subject: [PATCH 45/57] fix pycodestyle error in hosts.py (#2695) --- workflow/hosts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/hosts.py b/workflow/hosts.py index 4b86bf4705..cd0cfe0083 100644 --- a/workflow/hosts.py +++ b/workflow/hosts.py @@ -40,7 +40,7 @@ def detect(cls): if os.path.exists('/scratch1/NCEPDEV'): machine = 'HERA' elif os.path.exists('/work/noaa'): - machine = socket.gethostname().split("-",1)[0].upper() + machine = socket.gethostname().split("-", 1)[0].upper() elif os.path.exists('/lfs4/HFIP'): machine = 'JET' elif os.path.exists('/lfs/f1'): From ddcd37648657182fb1877efe1b50a2a6400883d9 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Thu, 20 Jun 2024 14:41:46 +0000 Subject: [PATCH 46/57] Updates --- parm/gdas/staging/atm_berror_bump.yaml.j2 | 15 --------------- parm/gdas/staging/atm_berror_gsibec.yaml.j2 | 2 +- parm/gdas/staging/atm_var_bkg.yaml.j2 | 2 +- parm/gdas/staging/atm_var_fv3ens.yaml.j2 | 8 ++++---- 4 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 parm/gdas/staging/atm_berror_bump.yaml.j2 diff --git a/parm/gdas/staging/atm_berror_bump.yaml.j2 b/parm/gdas/staging/atm_berror_bump.yaml.j2 deleted file mode 100644 index 1788e1558a..0000000000 --- a/parm/gdas/staging/atm_berror_bump.yaml.j2 +++ /dev/null @@ -1,15 +0,0 @@ -{% set ftype_list = ['cor_rh', 'cor_rv', 'stddev'] %} -{% set nprocs = ntiles * layout_x * layout_y %} - -mkdir: -- ''{{ DATA }}/berror'' -copy: -{% for ftype in ftype_list %} -- ['{{ BERROR_DATA_DIR }}/{{ BERROR_DATE | to_fv3time }}.coupler.res', '{{ DATA }}/berror'] - {% for itile in range(1,7) %} -- ['{{ BERROR_DATA_DIR }}/{{ BERROR_DATE | to_fv3time }}.fv_tracer.res.tile{{ itile }}.nc', '{{ DATA }}/berror'] - {% endfor %} -{% endfor %} -{% for nn in range(1,nprocs+1) %} -- ['{{ BERROR_DATA_DIR }}/{{ 'nicas_aero_nicas_local_%06d-%06d.nc' | format(nprocs, nn) }}', '{{ DATA }}/berror'] -{% endfor %} diff --git a/parm/gdas/staging/atm_berror_gsibec.yaml.j2 b/parm/gdas/staging/atm_berror_gsibec.yaml.j2 index 47df4f7df6..e6c5e41609 100644 --- a/parm/gdas/staging/atm_berror_gsibec.yaml.j2 +++ b/parm/gdas/staging/atm_berror_gsibec.yaml.j2 @@ -4,5 +4,5 @@ mkdir: - '{{ DATA }}/berror' copy: {% for fname in fname_list %} -- ['{{ HOMEgfs }}'/fix/gdas/gsibec/{{ CASE_ANL }}/{{ fname }}', '{{ DATA }}/berror'] +- ['{{ HOMEgfs }}/fix/gdas/gsibec/{{ CASE_ANL }}/{{ fname }}', '{{ DATA }}/berror'] {% endfor %} diff --git a/parm/gdas/staging/atm_var_bkg.yaml.j2 b/parm/gdas/staging/atm_var_bkg.yaml.j2 index 3cb15e6c48..37af833649 100644 --- a/parm/gdas/staging/atm_var_bkg.yaml.j2 +++ b/parm/gdas/staging/atm_var_bkg.yaml.j2 @@ -7,7 +7,7 @@ copy: {% for time in time_list %} - ['{{ COM_ATMOS_RESTART_PREV }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/bkg/'] {% for ftype in ftype_list %} - {% for itile in range(1,7) %} + {% for itile in range(1,ntiles+1) %} - ['{{ COM_ATMOS_RESTART_PREV }}/{{ time | to_fv3time }}.{{ ftype }}.tile{{ itile }}.nc', '{{ DATA }}/bkg/'] {% endfor %} {% endfor %} diff --git a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 index f2ceff7e91..e499c86d57 100644 --- a/parm/gdas/staging/atm_var_fv3ens.yaml.j2 +++ b/parm/gdas/staging/atm_var_fv3ens.yaml.j2 @@ -11,12 +11,12 @@ copy: {% set memchar = 'mem%03d' | format(imem) %} {% set tmpl_dict = ({ '${ROTDIR}': ROTDIR, '${RUN}': 'enkfgdas', - '${YMD}': previous_cycle | to_YMD, - '${HH}': previous_cycle | strftime('%H'), - '${MEMDIR}': memchar }) %} + '${YMD}': previous_cycle | to_YMD, + '${HH}': previous_cycle | strftime('%H'), + '${MEMDIR}': memchar }) %} - ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.coupler.res', '{{ DATA }}/ens/{{ memchar }}/'] {% for ftype in ftype_list %} - {% for itile in range(1,7) %} + {% for itile in range(1,ntiles+1) %} - ['{{ COM_ATMOS_RESTART_TMPL | replace_tmpl(tmpl_dict) }}/{{ time | to_fv3time }}.{{ ftype }}.tile{{ itile }}.nc', '{{ DATA }}/ens/{{ memchar }}/'] {% endfor %} {% endfor %} From 7aa041e087c84a2c83f5b597f8e64ff68539b960 Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Thu, 20 Jun 2024 14:54:43 +0000 Subject: [PATCH 47/57] Refactor aero_prepobs.py like other tasks --- ush/python/pygfs/task/aero_prepobs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ush/python/pygfs/task/aero_prepobs.py b/ush/python/pygfs/task/aero_prepobs.py index bf081ba662..d8396fe3ca 100644 --- a/ush/python/pygfs/task/aero_prepobs.py +++ b/ush/python/pygfs/task/aero_prepobs.py @@ -24,23 +24,23 @@ class AerosolObsPrep(Task): def __init__(self, config: Dict[str, Any]) -> None: super().__init__(config) - _window_begin = add_to_datetime(self.runtime_config.current_cycle, -to_timedelta(f"{self.config['assim_freq']}H") / 2) - _window_end = add_to_datetime(self.runtime_config.current_cycle, +to_timedelta(f"{self.config['assim_freq']}H") / 2) + _window_begin = add_to_datetime(self.task_config.current_cycle, -to_timedelta(f"{self.task_config['assim_freq']}H") / 2) + _window_end = add_to_datetime(self.task_config.current_cycle, +to_timedelta(f"{self.task_config['assim_freq']}H") / 2) local_dict = AttrDict( { 'window_begin': _window_begin, 'window_end': _window_end, - 'sensors': str(self.config['SENSORS']).split(','), - 'data_dir': self.config['VIIRS_DATA_DIR'], + 'sensors': str(self.task_config['SENSORS']).split(','), + 'data_dir': self.task_config['VIIRS_DATA_DIR'], 'input_files': '', - 'OPREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.", - 'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z." + 'OPREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z.", + 'APREFIX': f"{self.task_config.RUN}.t{self.task_config.cyc:02d}z." } ) # task_config is everything that this task should need - self.task_config = AttrDict(**self.config, **self.runtime_config, **local_dict) + self.task_config = AttrDict(**self.task_config, **local_dict) @logit(logger) def initialize(self) -> None: @@ -64,8 +64,8 @@ def initialize(self) -> None: self.task_config.prepaero_config = self.get_obsproc_config(sensor) # generate converter YAML file - template = f"{self.runtime_config.RUN}.t{self.runtime_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" - _prepaero_yaml = os.path.join(self.runtime_config.DATA, template) + template = f"{self.task_config.RUN}.t{self.task_config['cyc']:02d}z.prepaero_viirs_{sensor}.yaml" + _prepaero_yaml = os.path.join(self.task_config.DATA, template) self.task_config.prepaero_yaml.append(_prepaero_yaml) logger.debug(f"Generate PrepAeroObs YAML file: {_prepaero_yaml}") save_as_yaml(self.task_config.prepaero_config, _prepaero_yaml) From e175b2526aedc61e8040e52accd2d1ea8b9d198b Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA Date: Thu, 20 Jun 2024 19:27:32 +0000 Subject: [PATCH 48/57] Update wxflow hash --- sorc/wxflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/wxflow b/sorc/wxflow index 6a790fcf5d..5dad7dd61c 160000 --- a/sorc/wxflow +++ b/sorc/wxflow @@ -1 +1 @@ -Subproject commit 6a790fcf5d5c20e1b797bcceea04798f192f9fb3 +Subproject commit 5dad7dd61cebd9b3f2b163b3b06bb75eae1860a9 From 7cc86d950487a24446081a5922c46a234461f085 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Fri, 21 Jun 2024 15:41:53 +0000 Subject: [PATCH 49/57] update gdas.cd to resolve wxflow issues and update jcb hashes (#2699) --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index b093825a7a..4c58b1edc1 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit b093825a7a363488dd377024eb822ce623b4732f +Subproject commit 4c58b1edc1a06ab7296929f26daef5958da72735 From 8663123499ede9ae09ce4179fe336213bf3437b6 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Sat, 22 Jun 2024 19:23:44 +0000 Subject: [PATCH 50/57] add wxflow to PYTHONPATH for ufsda jobs; update prep_snow_obs script to use task_config (#2654) --- scripts/exglobal_prep_snow_obs.py | 2 +- ush/load_ufsda_modules.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/exglobal_prep_snow_obs.py b/scripts/exglobal_prep_snow_obs.py index 5107d9c935..d4998a7d84 100755 --- a/scripts/exglobal_prep_snow_obs.py +++ b/scripts/exglobal_prep_snow_obs.py @@ -21,5 +21,5 @@ # Instantiate the snow prepare task SnowAnl = SnowAnalysis(config) SnowAnl.prepare_GTS() - if f"{ SnowAnl.runtime_config.cyc }" == '18': + if f"{ SnowAnl.task_config.cyc }" == '18': SnowAnl.prepare_IMS() diff --git a/ush/load_ufsda_modules.sh b/ush/load_ufsda_modules.sh index d7aa08e1ae..5a99673173 100755 --- a/ush/load_ufsda_modules.sh +++ b/ush/load_ufsda_modules.sh @@ -51,6 +51,10 @@ esac module list pip list +# Add wxflow to PYTHONPATH +wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}" + # Restore stack soft limit: ulimit -S -s "${ulimit_s}" unset ulimit_s From 076a59d0106275baa577ce6578a9fdc2e7c87743 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Sun, 23 Jun 2024 18:39:24 +0000 Subject: [PATCH 51/57] simply wxflow path for ufsda jobs (#2654) --- ush/load_ufsda_modules.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ush/load_ufsda_modules.sh b/ush/load_ufsda_modules.sh index 5a99673173..8117d3f359 100755 --- a/ush/load_ufsda_modules.sh +++ b/ush/load_ufsda_modules.sh @@ -52,8 +52,9 @@ module list pip list # Add wxflow to PYTHONPATH -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" +wxflowPATH="${HOMEgfs}/ush/python" PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}" +export PYTHONPATH # Restore stack soft limit: ulimit -S -s "${ulimit_s}" From 19f35e9ae7344bfa009bd7e0610af40566f7edf3 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Sun, 23 Jun 2024 18:44:27 +0000 Subject: [PATCH 52/57] update gdas.cd hash to fix issues with aero and soca DA (#2700) --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 4c58b1edc1..7ef7d08fc5 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 4c58b1edc1a06ab7296929f26daef5958da72735 +Subproject commit 7ef7d08fc56f65697cbd203d9fe9163ef4675555 From 3768b9d21e026ad4a8dc778a5d3a29f03a2de861 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Mon, 24 Jun 2024 00:38:51 +0000 Subject: [PATCH 53/57] do not set wxflowPATH in rocoto j-job drivers, add wxflowPATH to load_fv3gfs_modules (#2700) --- jobs/rocoto/aeroanlfinal.sh | 5 ----- jobs/rocoto/aeroanlinit.sh | 6 ------ jobs/rocoto/aeroanlrun.sh | 6 ------ jobs/rocoto/atmanlfinal.sh | 5 ----- jobs/rocoto/atmanlfv3inc.sh | 6 ------ jobs/rocoto/atmanlinit.sh | 6 ------ jobs/rocoto/atmanlvar.sh | 6 ------ jobs/rocoto/atmensanlfinal.sh | 5 ----- jobs/rocoto/atmensanlfv3inc.sh | 6 ------ jobs/rocoto/atmensanlinit.sh | 6 ------ jobs/rocoto/atmensanlletkf.sh | 6 ------ jobs/rocoto/oceanice_products.sh | 6 ------ jobs/rocoto/prepatmiodaobs.sh | 5 ++--- jobs/rocoto/prepobsaero.sh | 6 ------ jobs/rocoto/prepsnowobs.sh | 5 ++--- jobs/rocoto/snowanl.sh | 6 ------ jobs/rocoto/upp.sh | 6 ------ ush/load_fv3gfs_modules.sh | 5 +++++ 18 files changed, 9 insertions(+), 93 deletions(-) diff --git a/jobs/rocoto/aeroanlfinal.sh b/jobs/rocoto/aeroanlfinal.sh index 16bb6887fd..39dea71810 100755 --- a/jobs/rocoto/aeroanlfinal.sh +++ b/jobs/rocoto/aeroanlfinal.sh @@ -11,11 +11,6 @@ status=$? export job="aeroanlfinal" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_AERO_ANALYSIS_FINALIZE" diff --git a/jobs/rocoto/aeroanlinit.sh b/jobs/rocoto/aeroanlinit.sh index 9aaf255782..7a1cf885c1 100755 --- a/jobs/rocoto/aeroanlinit.sh +++ b/jobs/rocoto/aeroanlinit.sh @@ -11,12 +11,6 @@ status=$? export job="aeroanlinit" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_AERO_ANALYSIS_INITIALIZE" diff --git a/jobs/rocoto/aeroanlrun.sh b/jobs/rocoto/aeroanlrun.sh index bcd86e3fbf..529bb2d7d1 100755 --- a/jobs/rocoto/aeroanlrun.sh +++ b/jobs/rocoto/aeroanlrun.sh @@ -11,12 +11,6 @@ status=$? export job="aeroanlrun" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_AERO_ANALYSIS_RUN" diff --git a/jobs/rocoto/atmanlfinal.sh b/jobs/rocoto/atmanlfinal.sh index 3d3c3ba9e6..a12894ed1e 100755 --- a/jobs/rocoto/atmanlfinal.sh +++ b/jobs/rocoto/atmanlfinal.sh @@ -11,11 +11,6 @@ status=$? export job="atmanlfinal" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE" diff --git a/jobs/rocoto/atmanlfv3inc.sh b/jobs/rocoto/atmanlfv3inc.sh index effc18cee5..5261c15f09 100755 --- a/jobs/rocoto/atmanlfv3inc.sh +++ b/jobs/rocoto/atmanlfv3inc.sh @@ -11,12 +11,6 @@ status=$? export job="atmanlfv3inc" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT" diff --git a/jobs/rocoto/atmanlinit.sh b/jobs/rocoto/atmanlinit.sh index 13c7d8710b..5329200590 100755 --- a/jobs/rocoto/atmanlinit.sh +++ b/jobs/rocoto/atmanlinit.sh @@ -11,12 +11,6 @@ status=$? export job="atmanlinit" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE" diff --git a/jobs/rocoto/atmanlvar.sh b/jobs/rocoto/atmanlvar.sh index 812e3c706a..7df7f59dd1 100755 --- a/jobs/rocoto/atmanlvar.sh +++ b/jobs/rocoto/atmanlvar.sh @@ -11,12 +11,6 @@ status=$? export job="atmanlvar" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_VARIATIONAL" diff --git a/jobs/rocoto/atmensanlfinal.sh b/jobs/rocoto/atmensanlfinal.sh index 5ffaa92754..fc29bdd9af 100755 --- a/jobs/rocoto/atmensanlfinal.sh +++ b/jobs/rocoto/atmensanlfinal.sh @@ -11,11 +11,6 @@ status=$? export job="atmensanlfinal" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE" diff --git a/jobs/rocoto/atmensanlfv3inc.sh b/jobs/rocoto/atmensanlfv3inc.sh index bb44ddc3a0..7f57e8d618 100755 --- a/jobs/rocoto/atmensanlfv3inc.sh +++ b/jobs/rocoto/atmensanlfv3inc.sh @@ -11,12 +11,6 @@ status=$? export job="atmensanlfv3inc" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT" diff --git a/jobs/rocoto/atmensanlinit.sh b/jobs/rocoto/atmensanlinit.sh index 2c2204548a..1cd8129df6 100755 --- a/jobs/rocoto/atmensanlinit.sh +++ b/jobs/rocoto/atmensanlinit.sh @@ -11,12 +11,6 @@ status=$? export job="atmensanlinit" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE" diff --git a/jobs/rocoto/atmensanlletkf.sh b/jobs/rocoto/atmensanlletkf.sh index b4a1a73a80..0ca86bfb43 100755 --- a/jobs/rocoto/atmensanlletkf.sh +++ b/jobs/rocoto/atmensanlletkf.sh @@ -11,12 +11,6 @@ status=$? export job="atmensanlletkf" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF" diff --git a/jobs/rocoto/oceanice_products.sh b/jobs/rocoto/oceanice_products.sh index eb704fb35f..2a3b617d05 100755 --- a/jobs/rocoto/oceanice_products.sh +++ b/jobs/rocoto/oceanice_products.sh @@ -12,12 +12,6 @@ source "${HOMEgfs}/ush/preamble.sh" status=$? if (( status != 0 )); then exit "${status}"; fi -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - export job="oceanice_products" export jobid="${job}.$$" diff --git a/jobs/rocoto/prepatmiodaobs.sh b/jobs/rocoto/prepatmiodaobs.sh index 0e69eda5c9..26629a514f 100755 --- a/jobs/rocoto/prepatmiodaobs.sh +++ b/jobs/rocoto/prepatmiodaobs.sh @@ -12,11 +12,10 @@ export job="prepatmobs" export jobid="${job}.$$" ############################################################### -# setup python path for workflow and ioda utilities -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" +# setup python path for ioda utilities # shellcheck disable=SC2311 pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/" -PYTHONPATH="${pyiodaPATH}:${wxflowPATH}:${PYTHONPATH}" +PYTHONPATH="${pyiodaPATH}:${PYTHONPATH}" export PYTHONPATH ############################################################### diff --git a/jobs/rocoto/prepobsaero.sh b/jobs/rocoto/prepobsaero.sh index 89da7547e8..5d65ff8a02 100755 --- a/jobs/rocoto/prepobsaero.sh +++ b/jobs/rocoto/prepobsaero.sh @@ -11,12 +11,6 @@ status=$? export job="prepobsaero" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_PREP_OBS_AERO" diff --git a/jobs/rocoto/prepsnowobs.sh b/jobs/rocoto/prepsnowobs.sh index cff082bab2..3f23bc16a5 100755 --- a/jobs/rocoto/prepsnowobs.sh +++ b/jobs/rocoto/prepsnowobs.sh @@ -12,12 +12,11 @@ export job="prepsnowobs" export jobid="${job}.$$" ############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" +# setup python path for ioda utilities # shellcheck disable=SC2311 pyiodaPATH="${HOMEgfs}/sorc/gdas.cd/build/lib/python$(detect_py_ver)/" gdasappPATH="${HOMEgfs}/sorc/gdas.cd/sorc/iodaconv/src:${pyiodaPATH}" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}:${gdasappPATH}" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}:${gdasappPATH}" export PYTHONPATH ############################################################### diff --git a/jobs/rocoto/snowanl.sh b/jobs/rocoto/snowanl.sh index 627dd860f4..97df7a46c7 100755 --- a/jobs/rocoto/snowanl.sh +++ b/jobs/rocoto/snowanl.sh @@ -11,12 +11,6 @@ status=$? export job="snowanl" export jobid="${job}.$$" -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_SNOW_ANALYSIS" diff --git a/jobs/rocoto/upp.sh b/jobs/rocoto/upp.sh index da0180472d..9f2f092a00 100755 --- a/jobs/rocoto/upp.sh +++ b/jobs/rocoto/upp.sh @@ -35,12 +35,6 @@ else if (( status != 0 )); then exit "${status}"; fi fi -############################################################### -# setup python path for workflow utilities and tasks -wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src" -PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}" -export PYTHONPATH - export job="upp" export jobid="${job}.$$" diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh index ae0e381db4..5f6afb7e35 100755 --- a/ush/load_fv3gfs_modules.sh +++ b/ush/load_fv3gfs_modules.sh @@ -30,6 +30,11 @@ esac module list +# Add wxflow to PYTHONPATH +wxflowPATH="${HOMEgfs}/ush/python" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}" +export PYTHONPATH + # Restore stack soft limit: ulimit -S -s "${ulimit_s}" unset ulimit_s From 32a2002d7a281a2f51c233de4c7a99bc867c4c16 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Mon, 24 Jun 2024 12:59:07 +0000 Subject: [PATCH 54/57] update gdas.cd hash to simplify wxflowpath in GDASApp ctests (#2700) --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 7ef7d08fc5..e3644a98c3 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 7ef7d08fc56f65697cbd203d9fe9163ef4675555 +Subproject commit e3644a98c362d7321f9e3081a4e55947885ed2bf From 8fc02e29e75aad7d8ce274176a35cc2d03e31900 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Mon, 24 Jun 2024 18:05:11 +0000 Subject: [PATCH 55/57] add g-w python to PYTHONPATH on WCOSS2 in upp.sh (#2700) --- jobs/rocoto/upp.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jobs/rocoto/upp.sh b/jobs/rocoto/upp.sh index 9f2f092a00..c3f128ab02 100755 --- a/jobs/rocoto/upp.sh +++ b/jobs/rocoto/upp.sh @@ -29,6 +29,12 @@ if [[ "${MACHINE_ID}" = "wcoss2" ]]; then module load python/3.8.6 module load crtm/2.4.0 # TODO: This is only needed when UPP_RUN=goes. Is there a better way to handle this? set_trace + + # Add wxflow to PYTHONPATH + wxflowPATH="${HOMEgfs}/ush/python" + PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}" + export PYTHONPATH + else . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" status=$? From c1ef4b30c19a896e40b84634f5fb261b18459d63 Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Fri, 28 Jun 2024 13:40:58 +0000 Subject: [PATCH 56/57] comment out find lines for purge_every_days (#2719) --- scripts/exglobal_cleanup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/exglobal_cleanup.sh b/scripts/exglobal_cleanup.sh index 1150ca6d1d..876fa3538b 100755 --- a/scripts/exglobal_cleanup.sh +++ b/scripts/exglobal_cleanup.sh @@ -17,10 +17,10 @@ rm -rf "${DATAROOT}/${RUN}efcs"*"${PDY:-}${cyc}" purge_every_days=3 # Find and delete files older than ${purge_every_days} days -find "${DATAROOT}/"* -type f -mtime "+${purge_every_days}" -exec rm -f {} \; +#find "${DATAROOT}/"* -type f -mtime "+${purge_every_days}" -exec rm -f {} \; # Find and delete directories older than ${purge_every_days} days -find "${DATAROOT}/"* -type d -mtime "+${purge_every_days}" -exec rm -rf {} \; +#find "${DATAROOT}/"* -type d -mtime "+${purge_every_days}" -exec rm -rf {} \; echo "Cleanup ${DATAROOT} completed!" ############################################################### From f551018c5593c0e27064ff6854975a7ae5b12646 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 28 Jun 2024 14:57:27 -0400 Subject: [PATCH 57/57] Update scripts/exglobal_cleanup.sh --- scripts/exglobal_cleanup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exglobal_cleanup.sh b/scripts/exglobal_cleanup.sh index 876fa3538b..dcf1baef31 100755 --- a/scripts/exglobal_cleanup.sh +++ b/scripts/exglobal_cleanup.sh @@ -14,7 +14,7 @@ rm -rf "${DATAROOT}/${RUN}efcs"*"${PDY:-}${cyc}" # Search and delete files/directories from DATAROOT/ older than ${purge_every_days} days # purge_every_days should be a positive integer -purge_every_days=3 +#purge_every_days=3 # Find and delete files older than ${purge_every_days} days #find "${DATAROOT}/"* -type f -mtime "+${purge_every_days}" -exec rm -f {} \;