Skip to content

Commit

Permalink
updated production_factor.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-e-bernal committed Feb 5, 2025
1 parent 6c1d3cf commit 36133e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/production_factor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ function get_production_factor(wind::Wind, latitude::Real, longitude::Real, time

if all(length(a) > 0 for a in [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_direction_degrees,
wind.wind_meters_per_sec])
if all(a isa Vector || length(a) == 8760 for a in [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_direction_degrees,
if all(a isa Vector && length(a) == 8760 for a in [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_direction_degrees,
wind.wind_meters_per_sec])
push!(resources, [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_meters_per_sec, wind.wind_direction_degrees]...)
resources = hcat(resources...)
elseif all(a isa Vector || length(a) == 2 for a in [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_direction_degrees,
elseif all(a isa Vector && length(a) == 2 for a in [wind.temperature_celsius, wind.pressure_atmospheres, wind.wind_direction_degrees,
wind.wind_meters_per_sec])
push!(resources, [wind.temperature_celsius[1], wind.pressure_atmospheres[1], wind.wind_meters_per_sec[1], wind.wind_direction_degrees[1]]...)
push!(resources, [wind.temperature_celsius[2], wind.pressure_atmospheres[2], wind.wind_meters_per_sec[2], wind.wind_direction_degrees[2]]...)
Expand Down

0 comments on commit 36133e8

Please sign in to comment.