Commit 9db89efa authored by Uwe Fladrich's avatar Uwe Fladrich
Browse files

Add recipe for metadata changes in Python

parent c54cb686
Loading
Loading
Loading
Loading
+33 −0
Changes for recipes/change-metadata.cmds.py: 33 added lines, 0 removed lines.
Original line number Diff line number Diff line
import uuid
from netCDF4 import Dataset

ds = Dataset("...", "r+")

ds.tracking_id = f'hdl:21.14100/{str(uuid.uuid4())}'

ds.realization_index=X
ds.initialization_index=1
ds.variant_label="rXi1p1f1"

ds.experiment_id="ssp119"
ds.experiment="low-end scenario reaching 1.9 W m-2, based on SSP1"
ds.further_info_url="https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Veg.ssp119.none.rXi1p1f1"

ds.experiment_id="ssp126"
ds.experiment="update of RCP2.6 based on SSP1"
ds.further_info_url="https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Veg.ssp126.none.rXi1p1f1"

ds.experiment_id="ssp245"
ds.experiment="update of RCP4.5 based on SSP2"
ds.further_info_url="https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Veg.ssp245.none.rXi1p1f1"

ds.experiment_id="ssp370"
ds.experiment="gap-filling scenario reaching 7.0 based on SSP3"
ds.further_info_url="https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Veg.ssp370.none.rXi1p1f1"

ds.experiment_id="ssp585"
ds.experiment="update of RCP8.5 based on SSP5"
ds.further_info_url="https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Veg.ssp585.none.rXi1p1f1"

ds.close()