From b325dd9babf12c664f6c604e84a8a39ec3d0a124 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 9 Jun 2023 13:27:27 -0400 Subject: [PATCH 01/10] Update snow DA cycling for the fractional grid setting. --- .gitignore | 1 + parm/parm_gdas/land_jedi_fix_gfsv17.yaml | 7 +++++++ sorc/link_workflow.sh | 1 + ush/python/pygfs/task/land_analysis.py | 7 +++++-- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 parm/parm_gdas/land_jedi_fix_gfsv17.yaml diff --git a/.gitignore b/.gitignore index e31978562a..90566668fa 100644 --- a/.gitignore +++ b/.gitignore @@ -131,6 +131,7 @@ ush/global_chgres_driver.sh ush/global_cycle.sh ush/global_cycle_driver.sh ush/jediinc2fv3.py +ush/gfs-land_gfsv17.yaml ush/mkwfsgbl.sh ush/ufsda ush/wafs_blending.sh diff --git a/parm/parm_gdas/land_jedi_fix_gfsv17.yaml b/parm/parm_gdas/land_jedi_fix_gfsv17.yaml new file mode 100644 index 0000000000..f629809776 --- /dev/null +++ b/parm/parm_gdas/land_jedi_fix_gfsv17.yaml @@ -0,0 +1,7 @@ +mkdir: +- $(DATA)/fv3jedi +copy: +- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/akbk$(npz).nc4, $(DATA)/fv3jedi/akbk.nc4] +- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/fmsmpp.nml, $(DATA)/fv3jedi/fmsmpp.nml] +- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/field_table_gfdl, $(DATA)/fv3jedi/field_table] +- [$(HOMEgfs)/ush/gfs-land_gfsv17.yaml, $(DATA)/fv3jedi/gfs-land.yaml] diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index dfd4cd47a9..b304f0058e 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -169,6 +169,7 @@ if [[ -d "${script_dir}/gdas.cd" ]]; then cd "${top_dir}/ush" || exit 1 ${LINK} "${script_dir}/gdas.cd/ush/ufsda" . ${LINK} "${script_dir}/gdas.cd/ush/jediinc2fv3.py" . + ${LINK} "${script_dir}/gdas.cd/ush/land/gfs-land_gfsv17.yaml" . ${LINK} "${script_dir}/gdas.cd/build/bin/imsfv3_scf2ioda.py" . fi diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index 181fa87866..57270fab6d 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -172,7 +172,7 @@ def initialize(self) -> None: # create a temporary dict of all keys needed in this method localconf = AttrDict() keys = ['DATA', 'current_cycle', 'COM_OBS', 'COM_ATMOS_RESTART_PREV', - 'OPREFIX', 'CASE', 'ntiles'] + 'OPREFIX', 'CASE', 'ntiles', 'SNOWDEPTHVAR', 'FRAC_GRID'] for key in keys: localconf[key] = self.task_config[key] @@ -183,7 +183,10 @@ def initialize(self) -> None: FileHandler({'mkdir': dirlist}).sync() # stage fix files - jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix.yaml') + if localconf.FRAC_GRID: + jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix_gfsv17.yaml') + else: + jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix.yaml') logger.info(f"Staging JEDI fix files from {jedi_fix_list_path}") jedi_fix_list = parse_yamltmpl(jedi_fix_list_path, self.task_config) FileHandler(jedi_fix_list).sync() From 1f112a5c841de06c1a5fd68d6c28f1a85eaf212d Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sun, 25 Jun 2023 18:57:04 -0400 Subject: [PATCH 02/10] Revert some changes. --- .gitignore | 1 - parm/parm_gdas/land_jedi_fix_gfsv17.yaml | 7 ------- sorc/link_workflow.sh | 1 - ush/python/pygfs/task/land_analysis.py | 5 +---- 4 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 parm/parm_gdas/land_jedi_fix_gfsv17.yaml diff --git a/.gitignore b/.gitignore index 90566668fa..e31978562a 100644 --- a/.gitignore +++ b/.gitignore @@ -131,7 +131,6 @@ ush/global_chgres_driver.sh ush/global_cycle.sh ush/global_cycle_driver.sh ush/jediinc2fv3.py -ush/gfs-land_gfsv17.yaml ush/mkwfsgbl.sh ush/ufsda ush/wafs_blending.sh diff --git a/parm/parm_gdas/land_jedi_fix_gfsv17.yaml b/parm/parm_gdas/land_jedi_fix_gfsv17.yaml deleted file mode 100644 index f629809776..0000000000 --- a/parm/parm_gdas/land_jedi_fix_gfsv17.yaml +++ /dev/null @@ -1,7 +0,0 @@ -mkdir: -- $(DATA)/fv3jedi -copy: -- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/akbk$(npz).nc4, $(DATA)/fv3jedi/akbk.nc4] -- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/fmsmpp.nml, $(DATA)/fv3jedi/fmsmpp.nml] -- [$(HOMEgfs)/fix/gdas/fv3jedi/fv3files/field_table_gfdl, $(DATA)/fv3jedi/field_table] -- [$(HOMEgfs)/ush/gfs-land_gfsv17.yaml, $(DATA)/fv3jedi/gfs-land.yaml] diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index b304f0058e..dfd4cd47a9 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -169,7 +169,6 @@ if [[ -d "${script_dir}/gdas.cd" ]]; then cd "${top_dir}/ush" || exit 1 ${LINK} "${script_dir}/gdas.cd/ush/ufsda" . ${LINK} "${script_dir}/gdas.cd/ush/jediinc2fv3.py" . - ${LINK} "${script_dir}/gdas.cd/ush/land/gfs-land_gfsv17.yaml" . ${LINK} "${script_dir}/gdas.cd/build/bin/imsfv3_scf2ioda.py" . fi diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index 57270fab6d..9b95bc1084 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -183,10 +183,7 @@ def initialize(self) -> None: FileHandler({'mkdir': dirlist}).sync() # stage fix files - if localconf.FRAC_GRID: - jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix_gfsv17.yaml') - else: - jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix.yaml') + jedi_fix_list_path = os.path.join(self.task_config.HOMEgfs, 'parm', 'parm_gdas', 'land_jedi_fix.yaml') logger.info(f"Staging JEDI fix files from {jedi_fix_list_path}") jedi_fix_list = parse_yamltmpl(jedi_fix_list_path, self.task_config) FileHandler(jedi_fix_list).sync() From 9c3b92350a5eb67a57f6762ed0b2a68f57c662ec Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 7 Jul 2023 13:32:44 -0400 Subject: [PATCH 03/10] Update the GDASApp stable-nightly commit hash. --- sorc/checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/checkout.sh b/sorc/checkout.sh index b651956189..5f34daf5dc 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -159,7 +159,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then fi if [[ ${checkout_gdas} == "YES" ]]; then - checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "1da2e63"; errs=$((errs + $?)) + checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "333337b"; errs=$((errs + $?)) fi if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then From e1369c48d327bb356b697bf0dc5ef636046025db Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 7 Jul 2023 18:29:46 -0400 Subject: [PATCH 04/10] Remove FRAC_GRID and FRAC_GRID=.false. option. --- parm/config/gfs/config.landanl | 6 +----- ush/python/pygfs/task/land_analysis.py | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/parm/config/gfs/config.landanl b/parm/config/gfs/config.landanl index bfeb47ae91..942e4528fe 100644 --- a/parm/config/gfs/config.landanl +++ b/parm/config/gfs/config.landanl @@ -21,11 +21,7 @@ export JEDIEXE="${HOMEgfs}/exec/fv3jedi_letkf.x" export JEDIYAML="${HOMEgfs}/sorc/gdas.cd/parm/land/letkfoi/letkfoi.yaml" # Ensemble member properties -if [[ "${FRAC_GRID}" = ".true." ]]; then - export SNOWDEPTHVAR="snodl" -elif [[ "${FRAC_GRID}" = ".false." ]]; then - export SNOWDEPTHVAR="snwdph" -fi +export SNOWDEPTHVAR="snodl" export BESTDDEV="30." # Background Error Std. Dev. for LETKFOI # Name of the executable that applies increment to bkg and its namelist template diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index 9b95bc1084..5bcba40d9d 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -172,7 +172,7 @@ def initialize(self) -> None: # create a temporary dict of all keys needed in this method localconf = AttrDict() keys = ['DATA', 'current_cycle', 'COM_OBS', 'COM_ATMOS_RESTART_PREV', - 'OPREFIX', 'CASE', 'ntiles', 'SNOWDEPTHVAR', 'FRAC_GRID'] + 'OPREFIX', 'CASE', 'ntiles'] for key in keys: localconf[key] = self.task_config[key] @@ -224,8 +224,7 @@ def execute(self) -> None: localconf = AttrDict() keys = ['HOMEgfs', 'DATA', 'current_cycle', 'COM_ATMOS_RESTART_PREV', 'COM_LAND_ANALYSIS', 'APREFIX', - 'SNOWDEPTHVAR', 'BESTDDEV', - 'FRAC_GRID', 'CASE', 'ntiles', + 'SNOWDEPTHVAR', 'BESTDDEV', 'CASE', 'ntiles', 'APRUN_LANDANL', 'JEDIEXE', 'jedi_yaml', 'APPLY_INCR_NML_TMPL', 'APPLY_INCR_EXE', 'APRUN_APPLY_INCR'] for key in keys: @@ -383,7 +382,7 @@ def create_ensemble(vname: str, bestddev: float, config: Dict) -> None: Parameters ---------- vname : str - snow depth variable to perturb. "snowdl" or "snwdph" depending on FRAC_GRID (.true.|.false.) + snow depth variable to perturb: "snodl" bestddev : float Background Error Standard Deviation to perturb around to create ensemble config: Dict @@ -432,7 +431,6 @@ def add_increments(config: Dict) -> None: COM_ATMOS_RESTART_PREV DATA current_cycle - FRAC_GRID CASE ntiles APPLY_INCR_NML_TMPL From 0f9e265d0b17f2813c4d524b154bff36eeb4640f Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 7 Jul 2023 18:50:45 -0400 Subject: [PATCH 05/10] Add FRAC_GRID back for apply_jedi_incr option. --- ush/python/pygfs/task/land_analysis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index 5bcba40d9d..2e70b63b95 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -224,7 +224,8 @@ def execute(self) -> None: localconf = AttrDict() keys = ['HOMEgfs', 'DATA', 'current_cycle', 'COM_ATMOS_RESTART_PREV', 'COM_LAND_ANALYSIS', 'APREFIX', - 'SNOWDEPTHVAR', 'BESTDDEV', 'CASE', 'ntiles', + 'SNOWDEPTHVAR', 'BESTDDEV', + 'FRAC_GRID', 'CASE', 'ntiles', 'APRUN_LANDANL', 'JEDIEXE', 'jedi_yaml', 'APPLY_INCR_NML_TMPL', 'APPLY_INCR_EXE', 'APRUN_APPLY_INCR'] for key in keys: @@ -431,6 +432,7 @@ def add_increments(config: Dict) -> None: COM_ATMOS_RESTART_PREV DATA current_cycle + FRAC_GRID CASE ntiles APPLY_INCR_NML_TMPL From 7e999b69e43e504c4f4c8e6d86e1cb03bdea291c Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sun, 9 Jul 2023 15:35:33 -0400 Subject: [PATCH 06/10] Update the GDASApp stable-nightly commit hash. --- sorc/checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 5f34daf5dc..213d1b01e7 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -159,7 +159,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then fi if [[ ${checkout_gdas} == "YES" ]]; then - checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "333337b"; errs=$((errs + $?)) + checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "e61e33c"; errs=$((errs + $?)) fi if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then From 469680f7eca791f43ff4470252a9ead8336b45d6 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Mon, 10 Jul 2023 11:29:07 -0400 Subject: [PATCH 07/10] Fix python path issue. --- jobs/rocoto/preplandobs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/rocoto/preplandobs.sh b/jobs/rocoto/preplandobs.sh index 6fcd659eae..ad5d7a85e0 100755 --- a/jobs/rocoto/preplandobs.sh +++ b/jobs/rocoto/preplandobs.sh @@ -14,7 +14,7 @@ export jobid="${job}.$$" ############################################################### # setup python path for workflow utilities and tasks pygwPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/pygw/src" -gdasappPATH="${HOMEgfs}/sorc/gdas.cd/iodaconv/src:${HOMEgfs}/sorc/gdas.cd/build/lib/python3.7/pyioda" +gdasappPATH="${HOMEgfs}/sorc/gdas.cd/iodaconv/src:${HOMEgfs}/sorc/gdas.cd/build/lib/python3.7/" PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${pygwPATH}:${gdasappPATH}" export PYTHONPATH From 6eb5850d09cd7380cd7a5c0bb3d446e5f0503a3c Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Mon, 10 Jul 2023 14:58:48 -0400 Subject: [PATCH 08/10] Remove FRAC_GRID fro land_analysis.py. --- ush/python/pygfs/task/land_analysis.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index b743c4013d..390e559d95 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -224,8 +224,7 @@ def execute(self) -> None: localconf = AttrDict() keys = ['HOMEgfs', 'DATA', 'current_cycle', 'COM_ATMOS_RESTART_PREV', 'COM_LAND_ANALYSIS', 'APREFIX', - 'SNOWDEPTHVAR', 'BESTDDEV', - 'FRAC_GRID', 'CASE', 'ntiles', + 'SNOWDEPTHVAR', 'BESTDDEV', 'CASE', 'ntiles', 'APRUN_LANDANL', 'JEDIEXE', 'jedi_yaml', 'APPLY_INCR_NML_TMPL', 'APPLY_INCR_EXE', 'APRUN_APPLY_INCR'] for key in keys: @@ -432,7 +431,6 @@ def add_increments(config: Dict) -> None: COM_ATMOS_RESTART_PREV DATA current_cycle - FRAC_GRID CASE ntiles APPLY_INCR_NML_TMPL From cb79ac89cc2a195b9d5c7ec770b189419cf828c7 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 14 Jul 2023 08:51:48 -0400 Subject: [PATCH 09/10] Update the GDASApp commit hash for feature/stable-nightly. --- Externals.cfg | 2 +- sorc/checkout.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Externals.cfg b/Externals.cfg index cb02b5b2bb..1763ed8b0c 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -57,7 +57,7 @@ protocol = git required = False [GDASApp] -hash = 1da2e63 +hash = 4452b0a local_path = sorc/gdas.cd repo_url = https://github.com/NOAA-EMC/GDASApp.git protocol = git diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 3586dd34b9..ceacb07048 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -160,7 +160,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then fi if [[ ${checkout_gdas} == "YES" ]]; then - checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "e61e33c"; errs=$((errs + $?)) + checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "4452b0a"; errs=$((errs + $?)) fi if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then From 882c26313dfd4aba1216d7ae8ff1f682279e48cd Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 19 Jul 2023 21:01:18 -0400 Subject: [PATCH 10/10] Update the gdasapp's feature/stable-nightly to current. --- Externals.cfg | 2 +- sorc/checkout.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Externals.cfg b/Externals.cfg index bf67375691..6176a7e3b8 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -57,7 +57,7 @@ protocol = git required = False [GDASApp] -hash = 7e3d694 +hash = fd8aa2f local_path = sorc/gdas.cd repo_url = https://github.com/NOAA-EMC/GDASApp.git protocol = git diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 9cf1dde20b..acf5ae072a 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -160,7 +160,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then fi if [[ ${checkout_gdas} == "YES" ]]; then - checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "7e3d694"; errs=$((errs + $?)) + checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "fd8aa2f"; errs=$((errs + $?)) fi if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then