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

prefix and suffix: no flexibility and no clear error message #14

Open
jkikstra opened this issue Nov 4, 2019 · 1 comment
Open

prefix and suffix: no flexibility and no clear error message #14

jkikstra opened this issue Nov 4, 2019 · 1 comment

Comments

@jkikstra
Copy link
Collaborator

jkikstra commented Nov 4, 2019

As hinted at in #12 and #5, the current prefix/suffix behaviour is not desireable.

The current case is that for harmonization to be triggered, both history and model values must have the exact same variable name. This includes the specific prefix and suffix that are used, and specified in the RunControl file.

Two points should be addressed here:

  1. The current error message that is thrown when prefix/suffix does not match is unclear. Checking the data before running the harmonization routine to see if there are values in either dataset matching the expected prefix/suffix, could be a way to make this more user-friendly.
  File "H:\MyDocuments\IIASA general tasks\Harmonization_OpenSCM_AR6\AR6snapshot\expandmini\wf.py", line 40, in <module>
    call_harmonization(hist_file)
  File "H:\MyDocuments\IIASA general tasks\Harmonization_OpenSCM_AR6\AR6snapshot\expandmini\wf.py", line 32, in call_harmonization
    harmonize(model, history=history, regions=regions, rc=rc, output_path=output_path, output_prefix=output_prefix)
  File "c:\users\kikstra\documents\github\aneris\aneris\cli.py", line 64, in harmonize
    driver.harmonize(scenario)
  File "c:\users\kikstra\documents\github\aneris\aneris\harmonize.py", line 476, in harmonize
    scenario).results()
  File "c:\users\kikstra\documents\github\aneris\aneris\harmonize.py", line 353, in process
    self._downselect_var()  # only prefix|*|suffix
  File "c:\users\kikstra\documents\github\aneris\aneris\harmonize.py", line 297, in _downselect_var
    assert(len(self.hist) > 0)
AssertionError```

2. A more long-term solution would be to create more flexibility in how aneris deals with variable names. I.e., the prefix/suffix construction could be removed to allow for more flexibility in data input regarding the naming of variables.
@jkikstra
Copy link
Collaborator Author

jkikstra commented Nov 7, 2019

@gidden now that harmonization comes first in the pipeline, two things should ideally change:

  1. the input data will have no prefix nor suffix. Ideally, aneris accepts such a case.
  2. as suggested here, aneris output would have no suffix, but rather change the prefix. This is currently not implemented in aneris.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant