Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased](https://github.com/mllam/mllam-data-prep/compare/v0.7.0...HEAD)

### Changed
- consider full time information for derived calculation of TOA radiation [\#84](https://github.com/mllam/mllam-data-prep/pull/84) @observingClouds

### Fixes
- fix bug where coordinate selection of an unshared dimension isn't applied to subsequent ouput variables when an output variable without this dimension is processed before the others [\#90](https://github.com/mllam/mllam-data-prep/pull/90) @zweihuehner & @leifdenby

Expand Down
4 changes: 2 additions & 2 deletions mllam_data_prep/ops/derive_variable/physical_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,"
Expand Down