I am using the Python API to extract the carbon NCM CE variables but I am having difficulties getting the values to match the VistaPro results.
I use the following code to extract any of the NCM CE variables, in this case lighting:
Code: Select all
filename = IesFilePicker.pick_aps_file()
result = iesve.ResultsReader.open(filename)
lighting_CE= result.get_results('NCM lighting CE','NCM lighting CE','c',-1,-1)Next, I tried to use the NCM energy values and the monthly NCM carbon factors to try manually replicate the NCM CE values. I used the carbon factors from the NCM modelling guide table 30 https://www.uk-ncm.org.uk/filelibrary/N ... ec2021.pdf
I did a test on the month of January by pulling out the first 744 hours of the energy results and then multiplying the sum of these hours by the carbon emission factor of January of 0.163kgCO2/kwh. I used the below python code:
Code: Select all
lighting_E_january = lighting_E[:744]*10**-3
print(sum(lighting_E_january*0.163))I have tried rounding the calculated values and then summing these but this still did not match VistaPro.
Am I missing something? I would really appreciate any kind of pointers!
Thanks,
