Skip to content

Missing values using DISC to generate the direct normal irradiance  #6

Closed
@Lamaf

Description

@Lamaf

I am having missing values when using DISC to simulate DNI, I trad this using clear sky GHI data and even with data I have from a measuring device
For an example try this:

import datetime
import pandas as pd
from pvlib.location import Location
import pvlib.solarposition
import pvlib.clearsky

# make a location
tus = Location(32.2, -111, 'MST', 700)
# make a pandas DatetimeIndex for some day
times = pd.date_range(start=datetime.datetime(2014,6,24), end=datetime.datetime(2014,6,25), freq='1Min')
# calculate the solar position
solpos = pvlib.solarposition.get_solarposition(times, tus, method='pyephem')
# calculate clear sky data
tus_cs = pvlib.clearsky.ineichen(times, tus, airmass_model='young1994')
ax = tus_cs.plot()
# calculate the direct normal irradiance using GHI from the clear sky data
DNI= pvlib.clearsky.disc(Time= solpos.index, GHI=tus_cs.GHI, SunZen=solpos.zenith)
DNI.DNI_gen_DISC.plot(ax=ax, legend=True)

Am I doing something wrong ??

dni

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions