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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
* Update NSIDC infrastructure NFS paths to reflect new product major versions.
* Update `pm_tb_data` dependency to >=v0.6. This allows utilizing `earthaccess`
to fetch NSDIC-0001 data.
* BUGFIX: `time` variable in published G10016 daily files now has `units`
attribute of "days since 1970-01-01" and sets the `calendar` attribute to
"standard". This resolves an issue where the `units` attr was dependent on the
file creation date and the `calendar` attribute showed
"proleptic_gregorian". This ensures consistency between G10016 and G02202
daily output files.



# v1.1.0
Expand Down
11 changes: 6 additions & 5 deletions seaice_ecdr/publish_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ def make_publication_ready_ds(
add_coordinate_coverage_content_type(complete_daily_ds)
add_coordinates_attr(complete_daily_ds)

# Ensure consistency of time units
complete_daily_ds.time.encoding["units"] = "days since 1970-01-01"
complete_daily_ds.time.encoding["calendar"] = "standard"

complete_daily_ds = remove_FillValue_from_coordinate_vars(complete_daily_ds)

return complete_daily_ds


Expand Down Expand Up @@ -272,11 +278,6 @@ def publish_daily_nc(
platform_id=platform.id,
)

# Ensure consistency of time units
complete_daily_ds.time.encoding["units"] = "days since 1970-01-01"
complete_daily_ds.time.encoding["calendar"] = "standard"

complete_daily_ds = remove_FillValue_from_coordinate_vars(complete_daily_ds)
complete_daily_ds.to_netcdf(complete_daily_filepath)
logger.success(f"Staged NC file for publication: {complete_daily_filepath}")

Expand Down
Loading