IAMconsortium / concordia

Apache License 2.0
0 stars 3 forks source link

Tracking issues/notes installation and setting up #45

Open jkikstra opened 6 months ago

jkikstra commented 6 months ago
  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
  2. Change README to not suggest pip install (but go through conda/mamba route)
  3. what worked: mamba env create -f environment.yml/mamba env create -f environment.yml
  4. do cd notebooks, then run jupytext --sync workflow.py (NB delete comment) --> works
  5. workflow.ipynb runs until config.yaml (copy from example_config.yaml)
  6. sync the RESCUE sharepoint, and change data_path in config.yaml to that path
  7. "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"
  8. 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)
  9. not working: writing out - AttributeError: 'DataFrame' object has no attribute 'include_in_total' - because we expect "variabledefs-region" instead of "variabledefs-rescue"
  10. 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 somecountrys: 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 commented 6 months ago

Things done for MESSAGE-pretending-REMIND file: