From f16681ba8bff6d32606a01315f0a8da3fa98122a Mon Sep 17 00:00:00 2001 From: Hauke Schulz <43613877+observingClouds@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:21:46 +0100 Subject: [PATCH 1/3] refine toa radiation calc to include min and s use full time information to increase temporal resolution of TOA radiation calculation --- mllam_data_prep/ops/derive_variable/physical_field.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllam_data_prep/ops/derive_variable/physical_field.py b/mllam_data_prep/ops/derive_variable/physical_field.py index d7b9617..392b19c 100644 --- a/mllam_data_prep/ops/derive_variable/physical_field.py +++ b/mllam_data_prep/ops/derive_variable/physical_field.py @@ -38,10 +38,10 @@ def calculate_toa_radiation(lat, lon, time): # Different handling if xr.DataArray or datetime object if isinstance(time, xr.DataArray): day = time.dt.dayofyear - hour_utc = time.dt.hour + hour_utc = time.dt.hour + time.dt.minute / 60 + time.dt.second / 3600 elif isinstance(time, datetime.datetime): day = time.timetuple().tm_yday - hour_utc = time.hour + hour_utc = time.hour + time.minute / 60 + time.second / 3600 else: raise TypeError( "Expected an instance of xr.DataArray or datetime object," From 586486066401930de5c2c5f9db09ce791a06e335 Mon Sep 17 00:00:00 2001 From: Hauke Schulz <43613877+observingClouds@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:32:11 +0100 Subject: [PATCH 2/3] document changes --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 105c9d4..4fc6a3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## unreleased + +### Changed +- consider full time information for derived calculation of TOA radiation [\#82](https://github.com/mllam/mllam-data-prep/pull/82) @observingClouds + + ## [v0.6.1](https://github.com/mllam/mllam-data-prep/release/tag/v0.6.1) [All changes](https://github.com/mllam/mllam-data-prep/compare/v0.6.1...v0.6.0) From d37c8c2fe461e6cb830b640d8dea7f53cbaf6c39 Mon Sep 17 00:00:00 2001 From: Hauke Schulz <43613877+observingClouds@users.noreply.github.com> Date: Mon, 3 Nov 2025 09:32:49 +0100 Subject: [PATCH 3/3] fix PR number --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc6a3a..91bba04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased ### Changed -- consider full time information for derived calculation of TOA radiation [\#82](https://github.com/mllam/mllam-data-prep/pull/82) @observingClouds +- consider full time information for derived calculation of TOA radiation [\#84](https://github.com/mllam/mllam-data-prep/pull/84) @observingClouds ## [v0.6.1](https://github.com/mllam/mllam-data-prep/release/tag/v0.6.1)