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: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ authors:
orcid: https://orcid.org/0009-0009-1369-1748
affiliation: University of Hamburg, Bundesstraße 53, 20146 Hamburg, Germany
title: amocatlas
version: 0.1.1
date-released: 2025-04-12
version: 0.3.0
date-released: 2026-02-10
url: https://github.com/AMOCcommunity/amocatlas
23 changes: 13 additions & 10 deletions amocatlas/metadata/arcticgateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ metadata:
contributor_name: "Hege-Beate Fredriksen, Laura de Steur"
contributor_role: "originator, PI"
contributor_role_vocabulary: "http://vocab.nerc.ac.uk/search_nvs/W08/"
creator_name_overwrite: " "
creator_url_overwrite: " "
creator_email_overwrite: " "
creator_type_overwrite: " "
publisher_name_overwrite: " "
publisher_email_overwrite: " "
institution: " "
contributing_institutions: "Norwegian Polar Institute, Alfred Wegener Institute, Institute for Marine Research, APL-UW"
contributing_institutions_role: "publisher, "

remove_unwanted_attributes:
- creator_institution
- creator_name # if you want to remove this too
- creator_url
- creator_email
- creator_type
- publisher_name
- publisher_email
- publisher_type

files:
Adjusted_fulldepth/BarentsSeaOpening_adjusted_v_fulldepth.nc:
source_url: "https://doi.org/10.21334/NPOLAR.2025.80B69907"
Expand Down Expand Up @@ -103,17 +106,17 @@ files:
description: "Latitude of zonal sections across which freshwater transport is computed."
units: degree_north
standard_name: "latitude"
conservative_temperature:
CT:
long_name: "Cons. Temperature"
description: "Conservative Temperature (TEOS-10)"
units: degree_C
standard_name: sea_water_conservative_temperature
absolute_salinity:
SA:
long_name: "Abs. Salinity"
description: "Absolute Salinity (TEOS-10)"
units: "g kg-1"
standard_name: sea_water_absolute_salinity
northward_velocity:
v:
long_name: "V Velocity"
description: "Northward Velocity component"
units: "m s-1"
Expand Down
15 changes: 15 additions & 0 deletions amocatlas/metadata/institution_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ institutions:
id_url: "https://edmo.seadatanet.org/report/17"
website: "https://noc.ac.uk"

"1224": # NASA JPL
standard_name: "National Aeronautics and Space Administration - Jet Propulsion Laboratory (NASA JPL)"
name_variants:
- "NASA JPL"
- "National Aeronautics and Space Administration, Jet Propulsion Laboratory"
- "National Aeronautics and Space Administration Jet Propulsion Laboratory"
- "NASA Jet Propulsion Laboratory"
- "National Aeronautics and Space Administration (NASA) Jet Propulsion Laboratory"
- "National Aeronautics and Space Administration (NASA) Jet Propulsion Laboratory (JPL)"
- "National Aeronautics and Space Administration JPL"
- "National Aeronautics and Space Administration Jet Propulsion Laboratory (USA)"
country: "USA"
id_url: "https://edmo.seadatanet.org/report/1224"
website: "https://www.jpl.nasa.gov"

"2424": # National Oceanography Centre Liverpool
standard_name: "National Oceanography Centre (Liverpool)"
name_variants:
Expand Down
14 changes: 7 additions & 7 deletions amocatlas/metadata/mocha26n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ files:
variable_mapping:
time: TIME
maxmoc: MOC
moc: STREAMFUNCTION_Z
Q_sum: MHT
Q_ek: MHT_EKMAN
Q_fc: MHT_FC
Expand Down Expand Up @@ -154,17 +155,11 @@ files:
units: Sverdrup
standard_name: ocean_volume_transport_across_line
maxmoc:
long_name: "MOC"
long_name: "MOC_Z"
description: >
time-varying maximum value of MOC streamfunction
units: Sverdrup
standard_name: ocean_meridional_overturning_transport
moc:
long_name: "MOC_Z"
description: >
time-varying MOC streamfunction vs. depth
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
z:
long_name: "Depth"
description: >
Expand Down Expand Up @@ -203,3 +198,8 @@ files:
description: >
corresponding hour of the measurements
standard_name: "Hour"
moc:
long_name: "Streamfunction"
description: "Streamfunction across the Atlantic at 26.5°N"
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
1 change: 1 addition & 0 deletions amocatlas/metadata/noac47n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
Wett, Simon; Rhein, Monika; Kieke, Dagmar; Mertens, Christian; Moritz, Martin; Nowitzki, Hannah (2023): Basin-wide AMOC volume transport from the NOAC array at 47°N in the subpolar North Atlantic (1993-2018) [dataset]. PANGAEA, https://doi.org/10.1594/PANGAEA.959558
featureType: "timeSeries"
time_coverage_start: '1993-01-01'
contributing_institutions: University of Bremen (Germany)
time_coverage_end: '2018-01-01'
contributor_name: "Simon Wett, Monika Rhein"
contributor_role: "originator, PI"
Expand Down
46 changes: 23 additions & 23 deletions amocatlas/metadata/osnap55n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
OSNAP data were collected and made freely available by the OSNAP (Overturning in the Subpolar North Atlantic Program) project
and all the national programs that contribute to it (www.o-snap.org).
doi: https://doi.org/10.35090/gatech/70342
license:
license: CC-BY-4.0 # Based on original data location at gatech
Conventions: CF-1.8, ACDD-1.3
time_coverage_start: "2014-08-01"
time_coverage_end: "2020-06-30"
Expand Down Expand Up @@ -74,7 +74,7 @@ files:
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
MOC_EAST_ERR:
long_name: "MOC east uncertainty"
long_name: "MOCeast uncertainty"
description: "Uncertainty in MOC_EAST"
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
Expand All @@ -84,57 +84,57 @@ files:
units: PW
standard_name: northward_ocean_heat_transport
MHT_ALL_ERR:
long_name: "Heat transport uncertainty"
long_name: "MHT uncertainty"
description: "Uncertainty in MHT_ALL"
units: PW
standard_name: northward_ocean_heat_transport
MHT_EAST:
long_name: "Heat transport east"
long_name: "MHTeast"
description: "Meridional heat transport at OSNAP East"
units: PW
standard_name: northward_ocean_heat_transport
MHT_EAST_ERR:
long_name: "Heat transport east uncertainty"
long_name: "MHTeast uncertainty"
description: "Uncertainty in MHT_EAST"
units: PW
standard_name: northward_ocean_heat_transport
MHT_WEST:
long_name: "Heat transport west"
long_name: "MHTwest"
description: "Meridional heat transport at OSNAP West"
units: PW
standard_name: northward_ocean_heat_transport
MHT_WEST_ERR:
long_name: "Heat transport west uncertainty"
long_name: "MHTwest uncertainty"
description: "Uncertainty in MHT_WEST"
units: PW
standard_name: northward_ocean_heat_transport
MFT_ALL:
long_name: "Freshwater transport"
long_name: "MFT"
description: "Meridional freshwater transport across full OSNAP array"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_ALL_ERR:
long_name: "Freshwater transport uncertainty"
long_name: "MFT uncertainty"
description: "Uncertainty in MFT_ALL"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_EAST:
long_name: "Freshwater transport east"
long_name: "MFTeast"
description: "Meridional freshwater transport at OSNAP East"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_EAST_ERR:
long_name: "Freshwater transport east uncertainty"
long_name: "MFTeast uncertainty"
description: "Uncertainty in MFT_EAST"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_WEST:
long_name: "Freshwater transport west"
long_name: "MFTwest"
description: "Meridional freshwater transport at OSNAP West"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_WEST_ERR:
long_name: "Freshwater transport west uncertainty"
long_name: "MFTwest uncertainty"
description: "Uncertainty in MFT_WEST"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
Expand Down Expand Up @@ -186,17 +186,17 @@ files:
description: "Maximum overturning streamfunction across OSNAP East"
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
MOC_SIGMA0_EAST_ERR:
MOC_EAST_ERR:
long_name: "Eastern MOC_sigma0 uncertainty"
description: "Uncertainty in MOC_SIGMA0_EAST"
units: Sverdrup
standard_name: ocean_meridional_overturning_streamfunction
MHT:
MHT_ALL:
long_name: "MHT"
description: "Meridional heat transport across full OSNAP array"
units: PW
standard_name: northward_ocean_heat_transport
MHT_ERR:
MHT_ALL_ERR:
long_name: "MHT uncertainty"
description: "Uncertainty in MHT"
units: PW
Expand All @@ -222,32 +222,32 @@ files:
units: PW
standard_name: northward_ocean_heat_transport
MFT:
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In OSNAP_MOC_MHT_MFT_TimeSeries_201408_202207_2025.nc, variable_mapping indicates the source variable is MFT_ALL (mapped to MFT), and standardise_data() applies original_variable_metadata before renaming. The original_variable_metadata entry is currently keyed as MFT, so it won’t be applied to the source dataset variable and the long_name/attrs may remain missing. Rename this metadata key to MFT_ALL (and keep the attrs the same) so it is applied before the rename.

Suggested change
MFT:
MFT_ALL:

Copilot uses AI. Check for mistakes.
long_name: "Freshwater trans."
long_name: "MFT"
description: "Meridional freshwater transport across full OSNAP array"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_ERR:
long_name: "Freshwater trans. error"
MFT_ALL_ERR:
long_name: "MFT error"
description: "Uncertainty in MFT"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_WEST:
long_name: "Freshwater trans. west"
long_name: "MFTwest"
description: "Meridional freshwater transport across OSNAP West"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_WEST_ERR:
long_name: "Freshwater trans. west error"
long_name: "MFTwest error"
description: "Uncertainty in MFT_WEST"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_EAST:
long_name: "Freshwater trans. east"
long_name: "MFTeast"
description: "Meridional freshwater transport across OSNAP East"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
MFT_EAST_ERR:
long_name: "Freshwater trans. east error"
long_name: "MFTeast error"
description: "Uncertainty in MFT_EAST"
units: Sverdrup
standard_name: northward_ocean_freshwater_transport
Expand Down
6 changes: 0 additions & 6 deletions amocatlas/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,6 @@ def generate_array_report(
for ds in datasets:
# Set canonical date_modified to avoid changing every time
ds.attrs["date_modified"] = canonical_date
# Add explanation comment
comment = ds.attrs.get("comment", "")
if comment:
comment += " "
comment += "(Note: date_modified has been set to a canonical value for documentation generation to avoid git churn)"
ds.attrs["comment"] = comment

# Extract and store contributors and institutions
try:
Expand Down
15 changes: 14 additions & 1 deletion amocatlas/standardise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,12 @@ def standardise_data(ds: xr.Dataset, file_name: str) -> xr.Dataset:
"standard_name", ""
):
log_debug(f"Converting heat transport variable '{var_name}' from W to PW")
# Preserve all attributes before conversion
original_attrs = ds[var_name].attrs.copy()
# Convert data from watts to petawatts (divide by 10^15)
ds[var_name] = ds[var_name] / 1e15
# Update units attribute
# Restore all attributes and update units
ds[var_name].attrs = original_attrs
ds[var_name].attrs["units"] = "PW"

# If any attributes are blank or value 'n/a', remove them
Expand Down Expand Up @@ -1447,6 +1450,16 @@ def standardise_data(ds: xr.Dataset, file_name: str) -> xr.Dataset:
cleaned.pop(key, None)
log_debug(f"Removed processing directive: '{key}'")

# 4.4) Process remove_unwanted_attributes directive
remove_unwanted = all_yaml_metadata.get("remove_unwanted_attributes", [])
if remove_unwanted:
for attr_name in remove_unwanted:
if attr_name in cleaned:
cleaned.pop(attr_name)
log_debug(f"Removed unwanted attribute: '{attr_name}'")
# Also remove the remove_unwanted_attributes directive itself
cleaned.pop("remove_unwanted_attributes", None)
Comment on lines +1453 to +1461
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove_unwanted_attributes is applied after _consolidate_contributors(). Since _consolidate_contributors() pops creator_*/publisher_* and folds them into contributor_*, removing those fields afterward won’t prevent them from influencing the consolidated contributor list (e.g., institutional creators/publishers may still appear as contributors). Apply the removals before calling _consolidate_contributors() (e.g., delete the listed keys from merged_attrs/combined first), then drop the directive key so it doesn’t propagate.

Copilot uses AI. Check for mistakes.
Comment on lines +1453 to +1461
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces new metadata behavior (remove_unwanted_attributes) but there’s no test coverage for it. Add a unit/integration test that constructs attrs/YAML including remove_unwanted_attributes and verifies the listed keys are removed and do not affect contributor consolidation (e.g., creator_name/publisher_name don’t get merged into contributor_name).

Copilot uses AI. Check for mistakes.

# 5) Standardize date formats and add processing metadata

def standardize_date_format(date_string: str) -> str:
Expand Down
Binary file modified docs/source/_static/reports/mocha_2d_gridded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading