Whilst @davidhassell & I were looking into the CDF2CIM process we observed that the CMIP6-to-CIM2 mapping constant which once-upon-a-time had genuine mappings to make, has become an effective container to store attributes & state whether they are mapped to themselves or to None.
This is a quick PR to organise (by mapped form) the mappings accordingly, & take a consistent approach for the CMIP5 mapping, increasing readability in the process (note since we're still in Python 2, the dict combination not look as clean & readable as it would/will in 3, as per the comments).
Reviewing aid
Since (I believe) there's no quick & simple end-to-end CDF2CIM way to review this has produced the same end result, here's a simple script I used to verify the new code gives the original mapping dictionaries:
import pprint
<copy (new) lines 79-184 to here, noting they are standalone constants>
pprint.pprint(CMIP6_TO_CIM2)
print("\n\n")
pprint.pprint(CMIP5_TO_CIM2)
Whilst @davidhassell & I were looking into the CDF2CIM process we observed that the CMIP6-to-CIM2 mapping constant which once-upon-a-time had genuine mappings to make, has become an effective container to store attributes & state whether they are mapped to themselves or to
None
.This is a quick PR to organise (by mapped form) the mappings accordingly, & take a consistent approach for the CMIP5 mapping, increasing readability in the process (note since we're still in Python 2, the
dict
combination not look as clean & readable as it would/will in 3, as per the comments).Reviewing aid
Since (I believe) there's no quick & simple end-to-end CDF2CIM way to review this has produced the same end result, here's a simple script I used to verify the new code gives the original mapping dictionaries:
which produces, as before (by eyeball):