NREL / SAM

System Advisor Model (SAM)
BSD 3-Clause "New" or "Revised" License
345 stars 142 forks source link

Solar Resource File Converter Macro - SolarAnywhere Snow Depth Conversion #568

Closed KWagnerCPR closed 3 years ago

KWagnerCPR commented 3 years ago

Describe the bug SAM simulations expect snow depth data to be in units of cm for simulations. SolarAnywhere snow depth data is provided in units of meters. The Solar Resource File Converter macro seems to divide SolarAnywhere snow depth by 100 rather than multiplying it by 100 to get it into centimeters. This results is snow loss estimates of 0% in simulations using SolarAnywhere files at snowy locations where you would expect some percentage of snow losses.

To Reproduce Steps to reproduce the behavior:

  1. Obtain a SolarAnywhere format time series file from a snowy location that includes the snow depth field (There is one attached here). Green Valley, SD SolarAnywhere Time Series 20200101 to 20210102 Lat_44065 Lon-97_655 SA format.zip
  2. Open a new project in SAM.
  3. In the bottom left corner, select Macros. Select Solar Resource File Converter from the list, then select SolarAnywhere from the Weather file format drop down in the top right corner.
  4. Select Run macro and choose your SolarAnywhere file.
  5. Go back into the project in SAM. In the "Location and Resource" section select the samcsv you just created.
  6. In the "Shading and Layout" section, check the box next to "Estimate snow losses" at the bottom.
  7. Run the simulation (can just use all the defaults and select the box for "Estimate Subarray 1 configuration" in the system design section).
  8. Go into the losses section of the results. You'll notice that there will be 0% losses from snow.

Expected behavior You would expect to see some percentage of the total system losses be attributed to snow losses. Additionally, when you open a samcsv converted SolarAnywhere file, you'd expect to see the snow values be the original values * 100, but they are instead the original values/100.

Screenshots Original SolarAnywhere file snow depth: image

Samcsv converted file snow depth: image

Operating System and Version

Additional context No additional context. Thanks!

cpaulgilman commented 3 years ago

Thank you for reporting this issue. We will fix it when we address #554, and another issue a SAM user reported involving time step conversion.

KWagnerCPR commented 3 years ago

@cpaulgilman Thank you!