Skip to content
Draft
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
10 changes: 1 addition & 9 deletions cdds/cdds/common/plugins/cmip7/cmip7_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ def further_info_url(self) -> str:
str
The further info url for CMIP7
"""
root_url = 'https://furtherinfo.es-doc.org'
further_info_url = '{}/{}.{}.{}.{}.{}.{}'.format(root_url,
self._mip_era,
self._request.metadata.institution_id,
self._request.metadata.model_id,
self._request.metadata.experiment_id,
self._request.metadata.sub_experiment_id,
self._request.metadata.variant_label)
return further_info_url
return 'none'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what does this do? do we end up with a global attribute that says "none" or does it get skipped?



class AttributesValidator:
Expand Down
3 changes: 2 additions & 1 deletion cdds/cdds/configure/user_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def get_global_attributes(request):
Global attributes as dictionary
"""
global_attributes = OrderedDict()
global_attributes['further_info_url'] = get_further_info_url(request)
if request.metadata.mip_era != "CMIP7":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we could check in the required_global_attributes in the CVs as to whether this is required, rather than assuming that it is only gone for CMIP7.

global_attributes['further_info_url'] = get_further_info_url(request)
if request.items_global_attributes:
global_attributes.update(request.items_global_attributes)
return global_attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_test_data(self):
'ancil': {'CMIP7_land@fx': 'rootd_ti-u-hxy-lnd'}
},
other={
'reference_version': 'v3',
'reference_version': 'v5',
'filenames': ['rootd_ti-u-hxy-lnd_fx_glb_g100_UKESM1-3-LL_1pctCO2_r1i1p1f3.nc'],
'ignore_history': True,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_test_data(self):
'ancil': {'CMIP7_land@fx': 'slthick_ti-sl-hxy-lnd'}
},
other={
'reference_version': 'v3',
'reference_version': 'v5',
'filenames': ['slthick_ti-sl-hxy-lnd_fx_glb_g100_UKESM1-3-LL_1pctCO2_r1i1p1f3.nc'],
'ignore_history': True,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_test_data(self):
'ap5': {'CMIP7_atmos@mon': 'mcd_tavg-alh-hxy-u'}
},
other={
'reference_version': 'v1',
'reference_version': 'v3',
'filenames': ['mcd_tavg-alh-hxy-u_mon_glb_g100_UKESM1-3-LL_1pctCO2_r1i1p1f3_200001-200002.nc'],
'ignore_history': True,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_test_data(self):
'ap5': {'CMIP7_atmos@mon': 'uas_tavg-h10m-hxy-u'}
},
other={
'reference_version': 'v5',
'reference_version': 'v7',
'filenames': ['uas_tavg-h10m-hxy-u_mon_glb_g100_UKESM1-3-LL_1pctCO2_r1i1p1f3_196002-196003.nc'],
'ignore_history': True,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_test_data(self):
'onm': '1:-1,1:-1'
},
other={
'reference_version': 'v1',
'reference_version': 'v3',
'filenames': ['zostoga_tavg-u-hm-sea_mon_glb_g100_UKCM2-0-LL_1pctCO2_r2i1p1f1_190001-190001.nc'],
'ignore_history': True,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ def get_test_data(self):
"run_bounds": "1900-01-01T00:00:00 1900-03-01T00:00:00",
"suite_id": "u-dw498",
},
global_attributes={
"further_info_url": "https://furtherinfo.es-doc.org/CMIP7.MOHC.UKESM1-3-LL.esm-piControl.none.r1i1p1f1"
},
streams={"ap5": {"CMIP7_atmos@mon": "rlucs4co2_tavg-alh-hxy-u"}},
other={
"reference_version": "v1",
"reference_version": "v3",
"filenames": [
"rlucs4co2_tavg-alh-hxy-u_mon_glb_g100_UKESM1-3-LL_esm-piControl_r1i1p1f1_190001-190002.nc"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def cmip7_project_info(cls) -> 'ProjectInfo':
'region': "glb",
'drs_specs': 'MIP-DRS7',
'data_specs_version': 'MIP-DS7.0.0.0',
'further_info_url': 'https://furtherinfo.es-doc.org/CMIP7.MOHC.UKCM2-0-LL.1pctCO2.none.r1i1p1f3'
}
)

Expand Down