From 4e1c20ede9170cc5631a463299e47cbd9b9ade31 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Mon, 18 Aug 2025 15:11:48 -0600 Subject: [PATCH 1/4] Add and use 0803 nt tiepoints for AMSR2 --- pm_icecon/nt/tiepoints.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pm_icecon/nt/tiepoints.py b/pm_icecon/nt/tiepoints.py index b9e17e0..f20d1d0 100644 --- a/pm_icecon/nt/tiepoints.py +++ b/pm_icecon/nt/tiepoints.py @@ -186,6 +186,19 @@ class TiePoints(TypedDict): "37v": {"ow": 211.90, "fy": 249.25, "my": 217.10}, }, }, + # Source: params used in NSIDC0803 + "nsidc0803": { + "n": { + "19h": {"ow": 120.50, "fy": 235.50, "my": 200.70}, + "19v": {"ow": 185.9, "fy": 250.90, "my": 222.20}, + "37v": {"ow": 210.50, "fy": 241.30, "my": 188.60}, + }, + "s": { + "19h": {"ow": 118.20, "fy": 240.90, "my": 214.60}, + "19v": {"ow": 192.40, "fy": 256.40, "my": 246.70}, + "37v": {"ow": 208.70, "fy": 246.20, "my": 212.40}, + }, + }, # Source: cdralgos "n07": { "n": { @@ -245,7 +258,8 @@ def get_tiepoints( # TODO: we should calculate specific tiepoints for AMSRE (`ame`) # instead of using the AMSR2 tiepoints. "ame": "amsru_a2", - "am2": "amsru_a2", + "am2": "nsidc0803", + # "am2": "amsru_a2", "u2": "amsru_a2", "17_final": "f17_final", "18_class": "f18_class", From 32802c78ea6f0968b466de49a9c87ffc6483d41b Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Thu, 28 Aug 2025 14:01:55 -0600 Subject: [PATCH 2/4] Update CHANGELOG and add note/todo to `nt.tiepoints.get_tiepoints`. --- CHANGELOG.md | 8 ++++++++ pm_icecon/nt/tiepoints.py | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c0380b..5b26ac8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v0.8.0 + +* Update `nt.tiepoints.get_tiepoints` function to return NT tiepoints based on + NSIDC-0802/0803 when `am2` is passed as the `satellite`. This changes the + previous behavior, which would return tiepoints based on AMSRU. This change + was made to support `seaice_ecdr` v2, which uses NSIDC-0802 TBs instead of + AU_SI25 for AMSR2 data. + # v0.7.0 * Update dependencies for `pm_tb_data` diff --git a/pm_icecon/nt/tiepoints.py b/pm_icecon/nt/tiepoints.py index f20d1d0..1033606 100644 --- a/pm_icecon/nt/tiepoints.py +++ b/pm_icecon/nt/tiepoints.py @@ -252,14 +252,25 @@ def get_tiepoints( satellite: ValidSatellites | str, hemisphere: Hemisphere, ) -> NasateamTiePoints: - """Given a satellite and hemisphere, return pre-defined tiepoints.""" + """Given a satellite and hemisphere, return pre-defined tiepoints. + + NOTE/TODO: this function is specifically designed to return tiepoints for + data sources utilized by the latest version of the `seaice_ecdr`. E.g., + passing `am2` as the `satellite` will return tiepoints based on NSIDC-0802 + for use in NSIDC-0803, which is what we want for the `seaice_ecdr`. The + `amsru_am2` "satellite" will return tiepoints derived from AMSRU + data. Ideally, this function is updated to replace the `satellite` kwarg + with e.g., `platform` and `product` kwargs. The combination of `platform` + and `product` tells us which variant of a set of tiepoints should be + returned, instead of curating the dict below. + """ try: sat = { # TODO: we should calculate specific tiepoints for AMSRE (`ame`) # instead of using the AMSR2 tiepoints. "ame": "amsru_a2", "am2": "nsidc0803", - # "am2": "amsru_a2", + "amsru_am2": "amsru_a2", "u2": "amsru_a2", "17_final": "f17_final", "18_class": "f18_class", From 3c58970ac8374c72dad339ed04cd443bc0dc7984 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Thu, 28 Aug 2025 14:03:38 -0600 Subject: [PATCH 3/4] Bumpversion v0.7.0 -> v0.8.0 --- pyproject.toml | 4 ++-- recipe/meta.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1fb5527..b939cfa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pm_icecon" -version = "0.7.0" +version = "0.8.0" description = "Sea ice concentration estimates from passive microwave data" [tool.setuptools] @@ -45,7 +45,7 @@ max-complexity = 8 inline-quotes = "double" [tool.bumpversion] -current_version = "0.7.0" +current_version = "0.8.0" commit = false tag = false diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 730d5a3..4ef839e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: pm_icecon - version: "0.7.0" + version: "0.8.0" source: path: ../ From 1d7e288371a96492291dd42d1198d0d1816b5ba8 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Thu, 28 Aug 2025 14:11:50 -0600 Subject: [PATCH 4/4] Update tiepoints for 0803 to use "nsidc0802" as key This is a little more clear - the tiepoints are for use with 0802. They are used to produce 0803. --- pm_icecon/nt/tiepoints.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pm_icecon/nt/tiepoints.py b/pm_icecon/nt/tiepoints.py index 1033606..b71ac6e 100644 --- a/pm_icecon/nt/tiepoints.py +++ b/pm_icecon/nt/tiepoints.py @@ -186,8 +186,8 @@ class TiePoints(TypedDict): "37v": {"ow": 211.90, "fy": 249.25, "my": 217.10}, }, }, - # Source: params used in NSIDC0803 - "nsidc0803": { + # Source: params derived from NSIDC0802 and used in NSIDC0803 + "nsidc0802": { "n": { "19h": {"ow": 120.50, "fy": 235.50, "my": 200.70}, "19v": {"ow": 185.9, "fy": 250.90, "my": 222.20}, @@ -269,7 +269,7 @@ def get_tiepoints( # TODO: we should calculate specific tiepoints for AMSRE (`ame`) # instead of using the AMSR2 tiepoints. "ame": "amsru_a2", - "am2": "nsidc0803", + "am2": "nsidc0802", "amsru_am2": "amsru_a2", "u2": "amsru_a2", "17_final": "f17_final",