SolarPosition | Javascript Sunrise/Set calculator | Apps library

 by   kybernetikos JavaScript Version: Current License: No License

kandi X-RAY | SolarPosition Summary

kandi X-RAY | SolarPosition Summary

SolarPosition is a JavaScript library typically used in Apps applications. SolarPosition has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Javascript Sunrise/Set calculator
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              SolarPosition has a low active ecosystem.
              It has 15 star(s) with 6 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of SolarPosition is current.

            kandi-Quality Quality

              SolarPosition has no bugs reported.

            kandi-Security Security

              SolarPosition has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              SolarPosition does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              SolarPosition releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SolarPosition
            Get all kandi verified functions for this library.

            SolarPosition Key Features

            No Key Features are available at this moment for SolarPosition.

            SolarPosition Examples and Code Snippets

            No Code Snippets are available at this moment for SolarPosition.

            Community Discussions

            QUESTION

            Issues with finding the clearness index and extraterrestrial irradiance using PVLIB functions
            Asked 2021-May-18 at 10:31

            I recently ran into an issue with calculating the clearness index and the extraterrestrial irradiance using the PVLIB functions. Basically, the numbers do not tally up.

            This is my raw data that I ran the function for (my Datetime is already timezone aware):

            I then ran the below code to get the clearness index:

            ...

            ANSWER

            Answered 2021-May-18 at 10:31

            The problem is in this line:

            Source https://stackoverflow.com/questions/67584069

            QUESTION

            date and value column split to two columns
            Asked 2020-Aug-06 at 14:12

            I have a data that 1-dimensional float64 data that contain date and value as like this:

            ...

            ANSWER

            Answered 2020-Aug-06 at 14:12

            You don't need to change anything in this dataframe called truetracking_position. Reason is the datetime are taken as rows for easy access of values. I installed the module pvlib and ran the same program. It's not a vector of string but a dataframe of floa64 datatype.

            Unless you want it to save into csv using 2 columns as data, it's actually not a good idea to split it. why? take a look at below what it can do for you.

            Source https://stackoverflow.com/questions/63180078

            QUESTION

            Adjusting time zone to compute solarPosition
            Asked 2020-Apr-22 at 21:25

            I'm getting a dataset with UTC data, and coordinates lat,long I want to compute the solarposition for each of the row of this dateset, but I'm having trouble with manipulating the timezone.

            So far, I've managed to make the UTC data, timezone aware by:

            ...

            ANSWER

            Answered 2020-Apr-22 at 21:25

            Thanks for using pvlib!

            I believe your issue is that you have UTC timestamps, but you are mixing them with the local timezone. UTC is a timezone. Therefore, you should first localize the naive timestamps with 'UTC'.

            Source https://stackoverflow.com/questions/61271109

            QUESTION

            ValueError: Big-endian buffer not supported on little-endian compiler
            Asked 2020-Feb-29 at 21:53

            I am modeling a PV array using PVlib and sometimes when I am trying to access the weather forecast data I get the following error:

            ...

            ANSWER

            Answered 2020-Feb-29 at 21:53

            I think I have a solution now. For some reason, data from these UNIDATA DCSS queries occasionally return big-endian bytes. This is not compatible with the Pandas Dataframe or Series object as discussed here. I found the function in PVLIB that takes the data from NetCDF4 and creates the Pandas Dataframe. Look inside pvlib then forecast.py and the function is called _netcdf2pandas. I will copy the source code below:

            Source https://stackoverflow.com/questions/60161759

            QUESTION

            Can't reconcile PVLIB output with NREL SAM
            Asked 2020-Feb-14 at 23:36

            Background

            Traditionally I've used NREL SAM tool to estimate solar output. I've been experimenting with PVLIB which is great due to the open nature and flexibility, however I can't seem to reconcile the solar production estimates between PVLIB and NREL SAM.

            What I've done

            I'm modeling a hypothetical solar farm near Gympie QLD. I've gone to the climate.onebuiling website, and downloaded the zip folder / epw file for "AUS_QLD_Gympie.AP.945660_TMYx.2003-2017". I've then used that weather file in NREL's SAM tool using PVwatts, with the following specs;

            • 200,000 KWdc
            • Module Type = Standard
            • 1.2 DC to AC Ratio
            • 96% inverter efficiency
            • 1 axis backtracking
            • tilt = 26 degrees
            • azimuth = 0 degrees
            • GCR = 0.4
            • losses, shading & curtailment = default

            In NREL SAM i get an annual Energy Yield (AC GWh) of 415.96 GWh p.a.

            I then took that same epw file and converted it to a csv, keeping just the columns for ghi, dni, dhi, temp_air & wind_speed (Google Drive link to CSV file). I've used this file as an import into PVLIB. I spec'd a PVLIB system the same specs above, with addition of albedo = 0.2 and max angle = 90 degrees (Code Below).

            The result I get in PVLIB is 395.61 GWh.

            Problem

            The results I got are pretty different. PVLIB = ~395 GWh p.a. vs SAM = ~415 GWH p.a. I expected around a 1-2% difference, but not 5%.

            Figures are even worse when I compare to a PVLIB system using clearsky.ineichen (adjusted with linke_turbidity) which yields ~475 GWh p.a.

            Help Requested

            Anyone know why my results are so different? is there anything I can do to narrow the gap?

            PVLIB Code

            ...

            ANSWER

            Answered 2020-Feb-14 at 23:36

            Hard to say exactly why the annual energy is different without a detailed comparison of intermediate results. One contributing factor appears to be the transposition model (GHI, DHI and DNI to plane-of-array): pvlib ModelChain defaults to the Hay/Davies model, and I believe SAM defaults to the Perez 1990 model. The two models will differ by a few percent in annual plane-of-array irradiance, which varies with the relative levels of diffuse and direct irradiance; see Lave et al. Figure 6.

            You can select the Perez 1990 model in pvlib by adding transposition_model = 'perez', to the mc instance. I expect that will narrow the difference between pvlib and SAM results, and am interested in what you find.

            Calculations using a TMY weather file won't give the same result as a calculation using irradiance from a clear sky model, since TMY is assembled from historical weather records and so includes cloudy periods.

            Source https://stackoverflow.com/questions/60218037

            QUESTION

            Solar Zenith Angle for many coordinates using PVLIB
            Asked 2019-Aug-15 at 09:20

            I need calculate the solar zenith angle for approximately 106.000.000 of different coordinates. This coordinates are referrals to the pixels from an image projected at Earth Surface after the image had been taken by camera into the airplane.

            I am using the pvlib.solarposition.get_position() to calculate the solar zenith angle. The values returned are being calculated correctly (I compared some results with NOOA website) but, how I need calculate the solar zenith angle for many couple of coordinates, the python is spending many days (about 5 days) to finish the execution of the function.

            How I am a beginner in programming, I wonder is there is any way to accelerate the solar zenith angle calculation.

            Below found the part of the code implemented which calculate the solar zenith angle:

            ...

            ANSWER

            Answered 2019-Aug-07 at 17:11

            If you want to fasten up this calculation you can use the numba core (if installed)

            Source https://stackoverflow.com/questions/57201526

            QUESTION

            How to build a generic pvsystem using PVLIB
            Asked 2019-Jul-23 at 17:45

            I am trying to build a generic pvsystem for modelling without the need for specific modules and inverters. I have all the key variables (surface azimuth, tilt, albedo, tracking technology(Fixed, Single, Dual), location, DC size in KW, loss factors, DC/AC ratio)

            I understand PVWatts is the best way to do this, but I don't know how it works. how best would I build such a pvsystem in PVLIB?

            Current code attached, It works but looking to change the pvsystem build

            ...

            ANSWER

            Answered 2019-Jul-23 at 17:45

            Replace your sandia_module and cec_inverter with dictionaries that specify the PVWatts parameters. The code in this documentation section demonstrates specifying PVWatts parameters: https://pvlib-python.readthedocs.io/en/stable/pvsystem.html#design-philosophy

            Source https://stackoverflow.com/questions/57067952

            QUESTION

            PVLIB: Problems to calculate the hour angle using PVLIB
            Asked 2019-Jul-11 at 15:27

            I'm trying to calculate the hour angle for using the PVLIB's function "pvl.solarposition.hour_angle()".

            The code that I'm developing is structured in 02 parts:

            • First I'm transforming GPS time (seconds of week) in UTC Time formated in '%Y-%m-%d %H:%M:%S'. The result obtained here is in UTC time because the GPS time is refering in UTC.
            • On second part I try to calculate the hour angle using PVLIB and on this part I'm having problems.

            When I'll run the hour angle the python is returning the an error message:

            "naive_times = times.tz_localize(None) # naive but still localized AttributeError: 'str' object has no attribute 'tz_localize".

            I know that this erros is about the class for variable "final_time" on the code implemented. According the PVLIB documentation this variable is need stay on class pandas.DatetimeIndex (https://pvlib-python.readthedocs.io/en/latest/generated/pvlib.solarposition.hour_angle.html) and I dont know transform correctly the GPS time to this class and then, use this result on the PVLIB to compute the hour angle.

            Bellow follow part of algorithm that I'm using here on the tests:

            ...

            ANSWER

            Answered 2019-Jul-11 at 08:48

            In my approach i use astropy library for converting gps time into date time format. Next convert this time to Datetimeindex with pandas;

            =^..^=

            Source https://stackoverflow.com/questions/56983859

            QUESTION

            Minor mistake in calculation of extraterrestrial radiation (method 'asce')?
            Asked 2019-Jan-11 at 19:59

            While looking at the code for the calculations of extraterrestrial radiation get_extra_radiation() and crosschecking it with literature, I noticed that for both methods 'asce' and 'spencer' the solarposition._calculate_simple_day_angle(doy) function is used. This function basically just calculates (2. * np.pi / 365.) * (doy- 1), which is correct for method='spencer'.

            But I think for method='asce' it should just be (2. * np.pi * doy / 365.) - without "- 1" - as described on page 9 in "J. A. Duffie and W. A. Beckman, "Solar Engineering of Thermal Processes, 3rd Edition" J. Wiley and Sons, New York (2006)"

            ...

            ANSWER

            Answered 2019-Jan-11 at 19:59

            I just happen to have this book in front of me, so I checked on page 9, and there is indeed a difference as noted w.r.t. the pvlib-python code. One formula uses n, the other uses n-1. This difference is probably not significant, but perhaps it should be fixed just so it is correct. An issue on github would be the best way to raise this.

            Source https://stackoverflow.com/questions/54148787

            QUESTION

            PVLIB - DC Power From Irradiation - Simple Calculation
            Asked 2018-Dec-23 at 05:48

            Dear pvlib users and devels.

            I'm a researcher in computer science, not particularly expert in the simulation or modelling of solar panels. I'm interested in use pvlib since we are trying to simulate the works of a small solar panel used for IoT applications, in particular the panel spec are the following: 12.8% max efficiency, Vmp = 5.82V, size = 225 × 155 × 17 mm.

            Before using pvlib, one of my collaborator wrote a code that compute the irradiation directly from average monthly values calculated with PVWatt. I was not really satisfied, so we are starting to use pvlib. In the old code, we have the power and current of the panel calculated as:

            W = Irradiation * PanelSize(m^2) * Efficiency A = W / Vmp

            The Irradiation, in Madrid, as been obtained with PVWatt, and this is what my collaborator used: DIrradiance = (2030.0,2960.0,4290.0,5110.0,5950.0,7090.0,7200.0,6340.0,4870.0,3130.0,2130.0,1700.0) I'm trying to understand if pvlib compute values similar to the ones above, as averages over a day for each month. And the curve of production in day. I wrote this to compare pvlib with our old model:

            ...

            ANSWER

            Answered 2017-Jul-06 at 18:43

            It's not clear to me how you arrived at your values for DIrradiance or what the units are, so I can't comment much the discrepancies between the values. I'm guessing that it's some kind of monthly data since there are 12 values. If so, you'd need to calculate ~hourly pvlib irradiance data and then integrate it to check for consistency.

            If your module will be tilted, you'll need to convert your ~hourly irradiance GHI, DNI, DHI values to plane of array (POA) irradiance using a transposition model. The irradiance.total_irrad function is the easiest way to do that.

            The next steps depend on the IV characteristics of your module, the rest of the circuit, and how accurate you need the model to be.

            Source https://stackoverflow.com/questions/44952762

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install SolarPosition

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kybernetikos/SolarPosition.git

          • CLI

            gh repo clone kybernetikos/SolarPosition

          • sshUrl

            git@github.com:kybernetikos/SolarPosition.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link