Uploaded image for project: 'Cover Crop'
  1. Cover Crop
  2. CCROP-391

Weather parser cannot generate weather data for SNI station

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 1.6
    • None
    • None
    • None

      SNI station (40.1063, -90.1817) only has data from 2016 and this seems to be causing issues for generating weather data for all scenarios(W, H and C) except average. It's possible the code expects > 10 years of data for the other scenarios since only Average works.

      Stacktrace:

      Station code: SNI
      Reading weather data from: IllinoisStateWaterSurvey/
      startmonth 09
      endmonth 05
      [('2018', 33.26), ('2019', 28.60000000000001), ('2020', 26.109999999999996), ('2017', 22.069999999999993), ('0000', 0)]
      Traceback (most recent call last):
        File "test_weather_data.py", line 36, in <module>
          main()
        File "test_weather_data.py", line 12, in main
          test_weather_station(latitude, longitude)
        File "test_weather_data.py", line 32, in test_weather_station
          weather_file_writer.get_all_characteristic(fill=characteristic)
        File "/home/cnavarro/git/dssat-tools/Input_to_DSSAT/Weather_to_DSSAT/weatherfilewriter.py", line 324, in get_all_characteristic
          high, low = self.find_agriculture_year_characteristic('09', chara, 10, end_month='05')
        File "/home/cnavarro/git/dssat-tools/Input_to_DSSAT/Weather_to_DSSAT/weatherfilewriter.py", line 301, in find_agriculture_year_characteristic
          return sorted_year[high_index][0], sorted_year[low_index][0]
      IndexError: list index out of range

              vnarah2 Gowtham Naraharisetty
              cnavarro Christopher Navarro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: