Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comply with new convention to have column names "region", "country", "superregion" in mappings #45

Merged
merged 2 commits into from
May 23, 2024

Conversation

DavidhoPIK
Copy link
Contributor

The new convention of the column names in mappings is to use "country", "region", "superregion". This MR changes the toolApplyRegionNames in a way to use these new column names. If the column names in the old convention "CountryCode" "RegionCode" are provided they are automatically replaced by those of the new convention.

It was tested that this MR fixes an error in the H16s5 preprocessing, while not crashing H12 preprocessing. See for h12
rev4.106h12_David_test_change_in_toolApplyRegionNames_h12_magpie.tgz, rev4.106h12_David_test_change_in_toolApplyRegionNames_h12_validation.tgz,
rev4.106h12_David_test_change_in_toolApplyRegionNames_h12_bd86374e_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz,

and for h16s5

rev4.106h16s5_David_test_change_in_toolApplyRegionNames_1028489d_magpie.tgz
rev4.106h16s5_David_test_change_in_toolApplyRegionNames_1028489d_validation.tgz
rev4.106h16s5_David_test_change_in_toolApplyRegionNames_1028489d_bd86374e_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz.

Version h16 was not tested but should also work, due to similarity with h16s5.

@DavidhoPIK DavidhoPIK changed the title use region and country Draft:use region and country May 17, 2024
@DavidhoPIK DavidhoPIK marked this pull request as draft May 17, 2024 07:58
@DavidhoPIK
Copy link
Contributor Author

DavidhoPIK commented May 17, 2024

everything ready except buildLibrary

@DavidhoPIK DavidhoPIK changed the title Draft:use region and country comply with new convention to have column names "region", "country", "superregion" in mappings May 17, 2024
Copy link
Member

@tscheypidi tscheypidi left a comment

Choose a reason for hiding this comment

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

looks good

@DavidhoPIK DavidhoPIK marked this pull request as ready for review May 23, 2024 14:20
@DavidhoPIK DavidhoPIK merged commit 473cb4a into pik-piam:master May 23, 2024
2 checks passed
@DavidhoPIK
Copy link
Contributor Author

I also ran magpie with the new preprocessing with h16 and h16s5 and results looked normal.

@DavidhoPIK DavidhoPIK added the bug Something isn't working label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants