Skip to content

Commit 1c7ff6d

Browse files
Merge pull request #203 from nsidc/update-dois
Update DOIs for new product versions
2 parents fd901ca + 86cf97e commit 1c7ff6d

File tree

6 files changed

+42
-5
lines changed

6 files changed

+42
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v2.1.1
2+
3+
* Update CDR product DOIs in NetCDF metadata.
4+
15
# v2.1.0
26

37
* Add `--overwrite` flag for `ecdr daily` command.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[project]
22
name = "seaice_ecdr"
3-
version = "2.1.0"
3+
version = "2.1.1"
44

55
[tool.bumpversion]
6-
current_version = "2.1.0"
6+
current_version = "2.1.1"
77
commit = false
88
tag = false
99

scripts/fix_dois_202512.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""Script to update DOIs for G02202 V6 and G10116 V4.
2+
3+
On Dec. 11, 2025, we realized that the DOI for these products was wrong (used
4+
the previous version). This script updates existing nc files to have the correct
5+
DOI in order to avoid data reprocessing.
6+
"""
7+
8+
from pathlib import Path
9+
10+
from netCDF4 import Dataset
11+
12+
FINAL_DATA_DIR = Path("/share/apps/G02202_V6/v06r00_outputs/dev/trst2284/complete")
13+
NRT_DATA_DIR = Path("/share/apps/G10016_V4/v04r00/dev/trst2284/CDR/complete/")
14+
15+
FINAL_DOI = "https://doi.org/10.7265/b18j-z797"
16+
NRT_DOI = "https://doi.org/10.7265/tm2n-1m33"
17+
18+
19+
def update_dois(data_dir, doi):
20+
print(f"Updating nc files in {data_dir} with doi {doi}")
21+
for nc_file in data_dir.rglob("*.nc"):
22+
with Dataset(str(nc_file), "a") as nc:
23+
if "id" in nc.ncattrs():
24+
nc.setncattr("id", doi)
25+
else:
26+
print(
27+
f"Did not update doi in {nc_file} because it lacked an `id` attr."
28+
)
29+
30+
31+
if __name__ == "__main__":
32+
update_dois(FINAL_DATA_DIR, FINAL_DOI)
33+
update_dois(NRT_DATA_DIR, NRT_DOI)

seaice_ecdr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from seaice_ecdr.constants import LOGS_DIR
88

9-
__version__ = "v2.1.0"
9+
__version__ = "v2.1.1"
1010

1111
# The standard loguru log levels, in increasing order of severity, are:
1212
# TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL

seaice_ecdr/nc_attrs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def get_global_attrs(
192192
product_version=ECDR_PRODUCT_VERSION.version_str,
193193
spatial_resolution=f"{resolution}km",
194194
standard_name_vocabulary="CF Standard Name Table (v83, 17 October 2023)",
195-
id="https://doi.org/10.7265/rjzb-pf78",
195+
id="https://doi.org/10.7265/b18j-z797",
196196
naming_authority="org.doi.dx",
197197
license="No constraints on data access or use",
198198
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.",

seaice_ecdr/nrt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def override_attrs_for_nrt(
265265
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."
266266
)
267267

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

0 commit comments

Comments
 (0)