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

Tracking issues/notes installation and setting up #45

Open
jkikstra opened this issue May 14, 2024 · 1 comment
Open

Tracking issues/notes installation and setting up #45

jkikstra opened this issue May 14, 2024 · 1 comment

Comments

@jkikstra
Copy link

jkikstra commented May 14, 2024

  1. after running pip install -e .[tests] in a new conda environment, pytest tests yields:`
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --cov --cov-report term-missing tests
  inifile: C:\Users\kikstra\Documents\GitHub\concordia\pyproject.toml
  rootdir: C:\Users\kikstra\Documents\GitHub\concordia
  1. Change README to not suggest pip install (but go through conda/mamba route)
  2. what worked: mamba env create -f environment.yml/mamba env create -f environment.yml
  3. do cd notebooks, then run jupytext --sync workflow.py (NB delete comment) --> works
  4. workflow.ipynb runs until config.yaml (copy from example_config.yaml)
  5. sync the RESCUE sharepoint, and change data_path in config.yaml to that path
  6. "region_mapping" -> "regionmapping" & change path of regionmappings to config.yaml to "$scenario_path/regionmappingH12.csv" & change MyModelName to "REMIND-MAgPIE 3.2.0-4.7.0"
  7. everything (alternative 2: downscaled = workflow.harmonize_and_downscale()) works (may take a bit due to downloading and loading the first time - 13 mins on jarmo's laptop and IIASA wifi)
  8. not working: writing out - AttributeError: 'DataFrame' object has no attribute 'include_in_total' - because we expect "variabledefs-region" instead of "variabledefs-rescue"
  9. changing to "variabledefs-region" however leads to KeyError: 'global' in when running workflow.harmonize_and_downscale()

-- new commits came in on the main branch --
after updating the environment using mamba env update -f environment.yml we continue

  1. in build-harmonization-report, we run into an issue with plotting, (most likely) caused by a downgrading of pandas, which is forced by geoutils 0.1.1 which forced pandas to be <2.2

-- now start changing things for pretend_REMIND_is_MESSAGE.csv --

  1. (not message related) when running ur = set_openscm_registry_as_default(), we get No module named 'openscm_units', so quick-fix is mamba install -c conda-forge openscm-units+restart kernel --> real fix is by adding openscm-units to the environment.yml later
  2. note to self: user needs to be careful to have the correct index column, e.g. if a column reads "unit" instead of the currently expected "Unit", there will be an error
  3. error: when trying to create indexraster_region, we get the error Mapping undefined for some countrys: bes, cuw, ggy, jey, sxm --> so it is crucial to list somewhere all the countries that need to be defined
  4. now I added bes, cuw, ggy, jey, sxm to region_definitions_message.csv
  5. all the rest that I tried seems to work for now!
  6. Let's add back the CO2 global overrides for CDR Aff and Agg Ag LUC
    image
    changes to
    image
    with comparison plots:
    image
@jkikstra jkikstra changed the title Tracking issues installation and setting up Tracking issues/notes installation and setting up May 14, 2024
@jkikstra
Copy link
Author

Things done for MESSAGE-pretending-REMIND file:

  • create a copy of the entire "RESCUE - WP 1\data_2024_03_14\rescue" folder
  • delete in the scenarios folder: REMIND-MAgPIE-CEDS-RESCUE-Tier1-2024-04-25.csv, REMIND-MAgPIE-CEDS-RESCUE-Tier1-2023-12-13.csv (input emissions scenario files), regionmappingH12.csv (model region mapping)
  • change in the scenarios folder: harmonization_overrides.xlsx (to only column names, empty rows
  • add in the scenarios folder: pretend_REMIND_is_MESSAGE.csv (input emissions scenario file) and region_definitions_message.csv (model region mapping)
  • change config.yml fields:
    • data_path
    • regionmappings

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