Skip to content

Commit

Permalink
Solar interpolation macro (#1956)
Browse files Browse the repository at this point in the history
* fix #1777

* account for header rows in input_data
  • Loading branch information
dguittet authored Dec 6, 2024
1 parent c8fb178 commit 76f29cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deploy/runtime/macros/Solar Resource Interpolation.lk
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,14 @@ function identify_case(input_data, lat, long, tz){
cols = parse_header(input_data[line]);
if (cols[4] == -1){
case[0] = 1;
case[1] = 1;
max_hour = -1;
for (hr=0; hr<48; hr++){
max_hour = max(max_hour, input_data[hr][cols[3]]);
}
if (max_hour == 23)
case[1] = 0;
else
case[1] = 1;
}
else{
case[0] = 0;
Expand Down

0 comments on commit 76f29cb

Please sign in to comment.