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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.1.1

* Update CDR product DOIs in NetCDF metadata.

# v2.1.0

* Add `--overwrite` flag for `ecdr daily` command.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "seaice_ecdr"
version = "2.1.0"
version = "2.1.1"

[tool.bumpversion]
current_version = "2.1.0"
current_version = "2.1.1"
commit = false
tag = false

Expand Down
33 changes: 33 additions & 0 deletions scripts/fix_dois_202512.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""Script to update DOIs for G02202 V6 and G10116 V4.

On Dec. 11, 2025, we realized that the DOI for these products was wrong (used
the previous version). This script updates existing nc files to have the correct
DOI in order to avoid data reprocessing.
"""

from pathlib import Path

from netCDF4 import Dataset

FINAL_DATA_DIR = Path("/share/apps/G02202_V6/v06r00_outputs/dev/trst2284/complete")
NRT_DATA_DIR = Path("/share/apps/G10016_V4/v04r00/dev/trst2284/CDR/complete/")

FINAL_DOI = "https://doi.org/10.7265/b18j-z797"
NRT_DOI = "https://doi.org/10.7265/tm2n-1m33"


def update_dois(data_dir, doi):
print(f"Updating nc files in {data_dir} with doi {doi}")
for nc_file in data_dir.rglob("*.nc"):
with Dataset(str(nc_file), "a") as nc:
if "id" in nc.ncattrs():
nc.setncattr("id", doi)
else:
print(
f"Did not update doi in {nc_file} because it lacked an `id` attr."
)


if __name__ == "__main__":
update_dois(FINAL_DATA_DIR, FINAL_DOI)
update_dois(NRT_DATA_DIR, NRT_DOI)
2 changes: 1 addition & 1 deletion seaice_ecdr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from seaice_ecdr.constants import LOGS_DIR

__version__ = "v2.1.0"
__version__ = "v2.1.1"

# The standard loguru log levels, in increasing order of severity, are:
# TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL
Expand Down
2 changes: 1 addition & 1 deletion seaice_ecdr/nc_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_global_attrs(
product_version=ECDR_PRODUCT_VERSION.version_str,
spatial_resolution=f"{resolution}km",
standard_name_vocabulary="CF Standard Name Table (v83, 17 October 2023)",
id="https://doi.org/10.7265/rjzb-pf78",
id="https://doi.org/10.7265/b18j-z797",
naming_authority="org.doi.dx",
license="No constraints on data access or use",
summary=f"This data set provides a passive microwave sea ice concentration climate data record (CDR) based on gridded brightness temperatures (TBs) from the Nimbus-7 Scanning Multichannel Microwave Radiometer (SMMR) and the Defense Meteorological Satellite Program (DMSP) series of passive microwave radiometers: the Special Sensor Microwave Imager (SSM/I) and the Special Sensor Microwave Imager/Sounder (SSMIS). The sea ice concentration CDR is an estimate of sea ice concentration that is produced by combining concentration estimates from two algorithms developed at the NASA Goddard Space Flight Center (GSFC): the NASA Team (NT) algorithm and the Bootstrap (BT) algorithm. The individual algorithms are used to process and combine brightness temperature data at NSIDC. This product is designed to provide a consistent time series of sea ice concentrations (the fraction, or percentage, of ocean area covered by sea ice) from November 1978 to the present, which spans the coverage of several passive microwave instruments. The data are gridded on the NSIDC polar stereographic grid with {resolution} km x {resolution} km grid cells and are available in NetCDF file format. Each file contains a variable with the CDR concentration values as well as variables that hold the raw NT and BT processed concentrations for reference. Variables containing standard deviation, quality flags, and projection information are also included. Files that are from 2013 to the present also contain a prototype CDR sea ice concentration based on gridded TBs from the Advanced Microwave Scanning Radiometer 2 (AMSR2) onboard the GCOM-W1 satellite.",
Expand Down
2 changes: 1 addition & 1 deletion seaice_ecdr/nrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def override_attrs_for_nrt(
f"This data set provides a near-real-time (NRT) passive microwave sea ice concentration climate data record (CDR) based on gridded brightness temperatures (TBs) from the Global Change Observation Mission 1st-Water (GCOM-W1) passive microwave radiometer: Advanced Microwave Scanning Radiometer 2 (AMSR2). The sea ice concentration CDR is an estimate of sea ice concentration that is produced by combining concentration estimates from two algorithms developed at the NASA Goddard Space Flight Center (GSFC): the NASA Team algorithm and the Bootstrap algorithm. The individual algorithms are used to process and combine brightness temperature data at NSIDC. This product is designed to provide an NRT time series of sea ice concentrations (the fraction, or percentage, of ocean area covered by sea ice). The data are gridded on the NSIDC polar stereographic grid with {resolution} x {resolution} km grid cells and are available in NetCDF file format. Each file contains a variable with the CDR concentration values as well as variables that hold the NASA Team and Bootstrap processed concentrations for reference. Variables containing standard deviation, quality flags, and projection information are also included."
)

override_for_nrt.attrs["id"] = "https://doi.org/10.7265/j0z0-4h87"
override_for_nrt.attrs["id"] = "https://doi.org/10.7265/tm2n-1m33"
link_to_dataproduct = f"https://nsidc.org/data/g10016/versions/{ECDR_NRT_PRODUCT_VERSION.major_version_number}"
override_for_nrt.attrs["metadata_link"] = link_to_dataproduct
override_for_nrt.attrs["title"] = (
Expand Down
Loading