NTNU-IndEcol / BuildME

6 stars 1 forks source link

URGENT: Issues with commit 5fb5bf0 #46

Closed nheeren closed 2 years ago

nheeren commented 2 years ago

@kamilitsa It looks like more stuff broke in your commit 5fb5bf0. Can you please confirm if BuildME runs on your computer without issues?

It seems the fnames variables is malformed now. Although there are a bunch of things going wrong already earlier, it fails for me when add_surrogate_beams() is called in https://github.com/nheeren/BuildME/blob/5fb5bf0b18f777c3dc73b54c33cb7866e4114576/BuildME/simulate.py#L308

This is because fnames[folder]['RES'][2] now returns something else than it used to in https://github.com/nheeren/BuildME/blob/5fb5bf0b18f777c3dc73b54c33cb7866e4114576/BuildME/simulate.py#L272

Let me know if you need more info.

kamilakrych commented 2 years ago

Uhhh... My bad, I changed sth without checking if it's used by functions in other .py files. I will fix it today.

kamilakrych commented 2 years ago

Yeah, actually it seems like I haven't checked at all if fnames[folder]['RES'] is used anywhere else. Embarrassing... :confounded:

I had good intentions. The idea was to simplify how fnames[fname] are defined. It used to be like this:

fnames[fname] = \
                                    {
                                    'climate_file': os.path.join(settings.climate_files_path, climate_scen,
                                                                 settings.climate_stations[region][climate_reg]),
                                    'archetype_file': archetype_choice,
                                    'energy_standard': [region, occ_type, energy_std],
                                    'RES': [region, occ_type, res],
                                    'region': region,
                                    'occupation': occ_type,
                                    'cooling': cool,
                                    'run_folder': os.path.join(settings.tmp_path, run, fname)
                                    }

And I found it very unintuitive that the variable fnames[fname]['RES'] contained information not only about res but also about region and occ_type. The same for fnames[fname]['energy_standard'] . So I wanted to simplify them, and make use of fnames[fname]['region'] and fnames[fname]['occupation'].

Anyway, I fixed it now.

nheeren commented 2 years ago

Thank you for the quick reactions! Will check asap.