From 84600b6a15b1168641f7c72ff910ad6272ff90de Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 2 Oct 2024 18:30:48 -0500 Subject: [PATCH 1/8] wip, added tools to select mom6 levels --- ush/python/pygfs/task/marine_analysis.py | 1 + ush/python/pygfs/utils/marine_da_utils.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ush/python/pygfs/task/marine_analysis.py b/ush/python/pygfs/task/marine_analysis.py index 4e4311b906..e7b7b5e948 100644 --- a/ush/python/pygfs/task/marine_analysis.py +++ b/ush/python/pygfs/task/marine_analysis.py @@ -210,6 +210,7 @@ def _prep_variational_yaml(self: Task) -> None: envconfig_jcb['cyc'] = os.getenv('cyc') envconfig_jcb['SOCA_NINNER'] = self.task_config.SOCA_NINNER envconfig_jcb['obs_list'] = ['adt_rads_all'] + envconfig_jcb['MOM6_LEVS'] = mdau.get_mom6_levels(str(self.task_config.OCNRES)) # Write obs_list_short save_as_yaml(parse_obs_list_file(self.task_config.MARINE_OBS_LIST_YAML), 'obs_list_short.yaml') diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index e1b2ac2d4d..032d843332 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -166,3 +166,25 @@ def clean_empty_obsspaces(config, target, app='var'): # save cleaned yaml save_as_yaml(config, target) + +@logit(logger) +def get_mom6_levels(ocnres: str) -> int: + """ + Temporary function that returns the number of vertical levels in MOM6 given the horizontal resolution. + This is requiered by the diffusion saber block that now makes use of oops::util::FieldSetHelpers::writeFieldSet + and requires the number of levels in the configuration. I have been told this will be changed in the future. + """ + + # get the number of vertical levels in MOM6 according to the horizontal resolution + if ocnres == '500': + nlev = 25 + elif ocnres == '100': + nlev = 75 + elif ocnres == '050': + nlev = 75 + elif ocnres == '025': + nlev = 75 + else: + raise ValueError("FATAL ERROR: Invalid ocnres value. Aborting.") + + return nlev From 303d4172f833160f058c33c248e0a1e875820338 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 2 Oct 2024 18:40:16 -0500 Subject: [PATCH 2/8] pynorm ... --- ush/python/pygfs/utils/marine_da_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index 032d843332..392b4dc018 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -167,6 +167,7 @@ def clean_empty_obsspaces(config, target, app='var'): # save cleaned yaml save_as_yaml(config, target) + @logit(logger) def get_mom6_levels(ocnres: str) -> int: """ From 24839f5be8e9ced9c9fcb413ab7819c372051f3f Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Thu, 3 Oct 2024 15:59:09 -0400 Subject: [PATCH 3/8] switched to dict --- ush/python/pygfs/utils/marine_da_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index 392b4dc018..979a76ca3e 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -176,16 +176,16 @@ def get_mom6_levels(ocnres: str) -> int: and requires the number of levels in the configuration. I have been told this will be changed in the future. """ - # get the number of vertical levels in MOM6 according to the horizontal resolution - if ocnres == '500': - nlev = 25 - elif ocnres == '100': - nlev = 75 - elif ocnres == '050': - nlev = 75 - elif ocnres == '025': - nlev = 75 - else: - raise ValueError("FATAL ERROR: Invalid ocnres value. Aborting.") + # Currently implemented resolutions + ocnres_to_nlev = { + '500': 25, + '100': 75, + '050': 75, + '025': 75 + } + try: + nlev = ocnres_to_nlev.get(ocnres) + except KeyError: + raise KeyError("FATAL ERROR: Invalid ocnres value. Aborting.") return nlev From 9538ba51b6084a83636ece5e3ed00662430f660c Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 7 Oct 2024 09:13:40 -0400 Subject: [PATCH 4/8] Update ush/python/pygfs/utils/marine_da_utils.py Co-authored-by: Rahul Mahajan --- ush/python/pygfs/utils/marine_da_utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index 979a76ca3e..d7b2df9d12 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -174,6 +174,16 @@ def get_mom6_levels(ocnres: str) -> int: Temporary function that returns the number of vertical levels in MOM6 given the horizontal resolution. This is requiered by the diffusion saber block that now makes use of oops::util::FieldSetHelpers::writeFieldSet and requires the number of levels in the configuration. I have been told this will be changed in the future. + + Parameters + ----------- + ocnres: str + Input resolution for ocean in str format. e.g. '500', '100', '050', '025' + + Returns + ------- + nlev: int + number of levels in the ocean model given an input resolution """ # Currently implemented resolutions From 4a3d9810127acf8e5eec4a45d8f5e11f0ef2a8a1 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 7 Oct 2024 08:17:13 -0500 Subject: [PATCH 5/8] new jedi hashes --- sorc/gdas.cd | 2 +- ush/python/pygfs/utils/marine_da_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 55e895f1dc..9d95c9d0cf 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 55e895f1dcf4e6be36eb0eb4c8a7995d429157e0 +Subproject commit 9d95c9d0cff5de0567885a9aa045ec35fd436bb1 diff --git a/ush/python/pygfs/utils/marine_da_utils.py b/ush/python/pygfs/utils/marine_da_utils.py index d7b2df9d12..50d9d84e86 100644 --- a/ush/python/pygfs/utils/marine_da_utils.py +++ b/ush/python/pygfs/utils/marine_da_utils.py @@ -174,12 +174,12 @@ def get_mom6_levels(ocnres: str) -> int: Temporary function that returns the number of vertical levels in MOM6 given the horizontal resolution. This is requiered by the diffusion saber block that now makes use of oops::util::FieldSetHelpers::writeFieldSet and requires the number of levels in the configuration. I have been told this will be changed in the future. - + Parameters ----------- ocnres: str Input resolution for ocean in str format. e.g. '500', '100', '050', '025' - + Returns ------- nlev: int From e9ad837ebbb72a7d6d32e5cafecc07ebf3ca2fab Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Fri, 11 Oct 2024 09:00:02 -0500 Subject: [PATCH 6/8] updated gdas --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 9d95c9d0cf..496b624e9f 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 9d95c9d0cff5de0567885a9aa045ec35fd436bb1 +Subproject commit 496b624e9f142be8e1ff5aff21f90308eef6b074 From 81dcd7263570d03fe0a40faf4c28225255df608f Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA <26926959+RussTreadon-NOAA@users.noreply.github.com> Date: Thu, 17 Oct 2024 05:17:59 -0400 Subject: [PATCH 7/8] turn off C96C48_hybatmaerosnowDA CI on wcoss2 --- ci/cases/pr/C96C48_hybatmaerosnowDA.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml b/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml index 7387e55b24..1fb363bbc9 100644 --- a/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml +++ b/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml @@ -18,6 +18,7 @@ arguments: yaml: {{ HOMEgfs }}/ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml skip_ci_on_hosts: + - wcoss2 - orion - gaea - hercules From e9fa90c6a73d9008b765e10ccf2d7a8024dbff3d Mon Sep 17 00:00:00 2001 From: RussTreadon-NOAA Date: Thu, 17 Oct 2024 17:07:55 +0000 Subject: [PATCH 8/8] update sorc/gdas.cd to point at GDASApp patch/gwci --- sorc/gdas.cd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 496b624e9f..0325836632 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 496b624e9f142be8e1ff5aff21f90308eef6b074 +Subproject commit 03258366322095544c68569dab88498e1e5f7159