Skip to content

Commit

Permalink
Merge branch 'develop' into release/2.12.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	pyproject.toml
  • Loading branch information
James Wood authored and James Wood committed Oct 23, 2024
2 parents 6625e4a + 1a68588 commit 53e6b15
Show file tree
Hide file tree
Showing 3 changed files with 492 additions and 472 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.12.0]
### Added
- Added custom exception to progate error messages to harmony.
- Handle OB.DAAC files, which do not have time variables
### Changed
### Deprecated
### Removed
Expand Down
4 changes: 4 additions & 0 deletions podaac/subsetter/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ def compute_time_variable_name(dataset: xr.Dataset, lat_var: xr.Variable, total_
if var_name not in total_time_vars and 'time' in var_name_time.lower() and dataset[var_name].squeeze().dims[0] in lat_var.squeeze().dims:
return var_name

# OB.DAAC data does not have a time variable. Returning the following field of a composite time value to avoid exceptions.
if '__scan_line_attributes__day' in dataset.data_vars:
return '__scan_line_attributes__day'

raise ValueError('Unable to determine time variable')


Expand Down
Loading

0 comments on commit 53e6b15

Please sign in to comment.