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

Error with imported weather file #3357

Closed
lilseigo opened this issue Jul 31, 2023 · 2 comments · Fixed by #3364
Closed

Error with imported weather file #3357

lilseigo opened this issue Jul 31, 2023 · 2 comments · Fixed by #3364
Labels

Comments

@lilseigo
Copy link

lilseigo commented Jul 31, 2023

Describe the bug
There is an error when we run the radiation script with our imported weather file. Hardware: CEA 3.32.0 and windows 10. The Weather file is in the Zip file

To Reproduce
Steps to reproduce the behavior:

  1. Create any case study
  2. import weather epw
  3. Run the radiation script with the default parameters
  4. error appears

Errorcode:

City Energy Analyst version 3.32.0
Running cea radiation with the following parameters:

  • general:scenario = C:\Users\domin\Desktop\test\test
    (default: {general:project}{general:scenario-name})
  • general:multiprocessing = True
    (default: True)
  • general:number-of-cpus-to-keep-free = 1
    (default: 1)
  • general:debug = False
    (default: False)
  • radiation:buildings = ['B1001', 'B1002']
    (default: [])
  • radiation:use-latest-daysim-binaries = True
    (default: True)
  • radiation:albedo = 0.2
    (default: 0.2)
  • radiation:roof-grid = 10
    (default: 10)
  • radiation:walls-grid = 200
    (default: 200)
  • radiation:zone-geometry = 2
    (default: 2)
  • radiation:surrounding-geometry = 5
    (default: 5)
  • radiation:consider-floors = True
    (default: True)
  • radiation:consider-intersections = False
    (default: False)
  • radiation:rad-ab = 4
    (default: 4)
  • radiation:rad-ad = 512
    (default: 512)
  • radiation:rad-as = 32
    (default: 32)
  • radiation:rad-ar = 20
    (default: 20)
  • radiation:rad-aa = 0.15
    (default: 0.15)
  • radiation:rad-lr = 8
    (default: 8)
  • radiation:rad-st = 0.5
    (default: 0.5)
  • radiation:rad-sj = 0.7
    (default: 0.7)
  • radiation:rad-lw = 0.05
    (default: 0.05)
  • radiation:rad-dj = 0.7
    (default: 0.7)
  • radiation:rad-ds = 0.0
    (default: 0.0)
  • radiation:rad-dr = 0
    (default: 0)
  • radiation:rad-dp = 32
    (default: 32)
  • radiation:daysim-bin-directory = C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Daysim
    (default: C:\Users\domin\Documents\CityEnergyAnalyst)
  • radiation:n-buildings-in-chunk = 100
    (default: 100)
  • radiation:write-sensor-data = True
    (default: True)
    Using Daysim binaries from path: c:\users\domin\documents\cityenergyanalyst\dependencies\python\lib\site-packages\cea\resources\radiation_daysim\bin\win32\bin64
    Using Daysim data from path: c:\users\domin\documents\cityenergyanalyst\dependencies\python\lib\site-packages\cea\resources\radiation_daysim\bin\win32\lib
    verifying geometry files
    zone: C:\Users\domin\Desktop\test\test\inputs\building-geometry\zone.shp
    surroundings: C:\Users\domin\Desktop\test\test\inputs\building-geometry\surroundings.shp
    Getting geometry materials
    Creating 3D geometry and surfaces
    Saving geometry pickle files in: C:\Users\domin\AppData\Local\Temp\tmpot_dyj5_\test_radiation_geometry_pickle
    Standardizing coordinate systems
    Reading terrain geometry
    Creating 3D building surfaces
    Calculating terrain intersection of building geometries
    Using 7 CPU's
    Calculation of terrain intersection for building 1 completed out of 2
    Calculation of terrain intersection for building 2 completed out of 2
    Using 7 CPU's
    Calculation of terrain intersection for building 1 completed out of 10
    Calculation of terrain intersection for building 2 completed out of 10
    Calculation of terrain intersection for building 3 completed out of 10
    Calculation of terrain intersection for building 4 completed out of 10
    Calculation of terrain intersection for building 5 completed out of 10
    Calculation of terrain intersection for building 6 completed out of 10
    Calculation of terrain intersection for building 7 completed out of 10
    Calculation of terrain intersection for building 8 completed out of 10
    Calculation of terrain intersection for building 9 completed out of 10
    Calculation of terrain intersection for building 10 completed out of 10
    Generating geometry for surrounding buildings
    Generating geometry for buildings in the zone of analysis
    Using 7 CPU's
    Generating geometry for building 1 completed out of 2Traceback (most recent call last):
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\worker.py", line 146, in worker
    run_job(config, job, server)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\worker.py", line 108, in run_job
    script(config=config, **parameters)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\api.py", line 60, in call
    self._runner.call(*args, **kwargs)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\api.py", line 38, in script_runner
    script_module.main(config)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\resources\radiation_daysim\radiation_main.py", line 286, in main
    radiation_singleprocessing(cea_daysim, zone_building_names, locator, config.radiation, geometry_pickle_dir,
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\resources\radiation_daysim\radiation_main.py", line 62, in radiation_singleprocessing
    weatherfile = epwreader.epw_reader(weather_path)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\utilities\epwreader.py", line 39, in epw_reader
    epw_data = epw_to_dataframe(weather_path)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\cea\utilities\epwreader.py", line 34, in epw_to_dataframe
    df = pd.read_csv(weather_path, skiprows=8, header=None, names=epw_labels).drop('datasource', axis=1)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\util_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\util_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\io\parsers\readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\io\parsers\readers.py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\io\parsers\readers.py", line 1442, in init
    self._engine = self._make_engine(f, self.engine)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\io\parsers\readers.py", line 1753, in _make_engine
    return mapping[engine](f, **self.options)
    File "C:\Users\domin\Documents\CityEnergyAnalyst\Dependencies\Python\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 79, in init
    self._reader = parsers.TextReader(src, **kwds)
    File "pandas_libs\parsers.pyx", line 547, in pandas._libs.parsers.TextReader.cinit
    File "pandas_libs\parsers.pyx", line 737, in pandas._libs.parsers.TextReader._get_header
    File "pandas_libs\parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
    File "pandas_libs\parsers.pyx", line 1965, in pandas._libs.parsers.raise_parser_error
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 1258: invalid start byte

Generating geometry for building 2 completed out of 2
Creating radiance material file
Creating radiance geometry file
Converting files for DAYSIM
Transforming weather files to daysim format
Running command epw2wea "C:\Users\domin\Desktop\test\test\inputs\weather\weather.epw" "C:\Users\domin\AppData\Local\Temp\tmpot_dyj5_\cea_radiation\common_inputs\weather_60min.wea"
Transforming radiance files to daysim format
Running command radfiles2daysim "C:\Users\domin\AppData\Local\Temp\tmpot_dyj5_\cea_radiation\common_inputs\rad2daysim.hea" -g -m -d

DEU_NW_Essen_104100_TRY2035_05_Wint_BBSR.zip

@lilseigo lilseigo added the bug label Jul 31, 2023
@ShiZhongming
Copy link
Collaborator

@lilseigo
We suspect that it could be your files contain umlaut, (i.e. ä, ö, ü).
Similar errors occurred in the team before because of Chinese characters.

@ShiZhongming
Copy link
Collaborator

@lilseigo
We have just fixed this issue and updated the master branch.
I have tested the weather file that you provided and it is working on the master branch.
Are you using the CEA developer's version? If so, please just fetch the updated master. #3364

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

Successfully merging a pull request may close this issue.

2 participants