Derives a report aggregation mapping (sourceRegion to targetRegion)
from a country-level region mapping. The input must have at least the columns
countryname, country, and region. Any additional columns
are treated as definitions of aggregated macro regions: each unique non-empty
value defines a target region, and all source regions containing at least one
country assigned to that value are mapped to it.
The output mapping has three blocks (each sorted by sourceRegion):
each source region mapped to itself (regional resolution)
each source region mapped to
"GLO"(global aggregate)source regions mapped to every additional aggregated region they belong to
Note
This function is a workaround as in magpie4 we can not use the same mapping formulas that we could use in madrat functions. If the magpie4 aggregation logic is ever rewritten, this function may become obsolete.
See also
Other Spatial:
addGeometry(),
clusterOutputToTerraVector(),
gdxAggregate(),
superAggregateX()