-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method for estimating ambient temperature from measured GHI and clear sky conditions #280
Comments
I think it is, you just need to know which column it's in... here's a quick comparison between the raw data and a plot from their website, not sure what the deal is with the missing values but at least it's in there: import pandas as pd
import matplotlib.pyplot as plt
# quick and dirty
df = pd.read_fwf(r'https://gml.noaa.gov/aftp/data/radiation/surfrad/Desert_Rock_NV/2021/dra21001.dat')
tamb = df.iloc[:, -10] * 9/5 + 32
plt.plot(tamb) Red plot is from here: https://gml.noaa.gov/grad/surfrad/metplot.html, it's Jan 1 2021 Desert Rock. And here's the readme where I found that P.S. Bill Marion put nicer (SAM CSV format, IIRC) SURFRAD data files on the DuraMAT DataHub, although they're frozen so they don't have the recent data. https://datahub.duramat.org/dataset/sioux-falls-south-dakota-usa |
Ok, what was I thinking then? Air temp is already parsed in |
In cell 13 I thought this:
So I knew it was there, I just didn't like it |
I updated the issue description to restate that yes, the air temp data is in SURFRAD, but there are many missing timestamps, so that was my motivation. But I'm thinking this could be useful for other cases where only irradiance is available. |
Is your feature request related to a problem? Please describe.
In my experience, the SURFRAD datasets were missing a lot of air temperature measurements so I needed a way to estimate ambient air temperature when working SURFRAD data on https://github.com/mikofski/PVRW2021
Describe the solution you'd like
What I did was to scale the clear sky air temps from rdtools using the ratio of total daily measured GHI to total daily clear sky GHI according to this formula:
which is expressed in this function:
estimate_air_temp
Describe alternatives you've considered
Additional context
I've already implemented this in the PVRW2021 repo above, and if you look near the bottom of this notebook:
multiyear_data.ipynb
you can see what the temperatures look like compared to GHI and clear sky conditions:for 1st week in January:
blue =
Tclearsky
, green =Tadj
, red = clear sky GHI, orange = GHIfor last week in December:
blue =
Tclearsky
, green =Tadj
, red = clear sky GHI, orange = GHISorry for lack of legend and axes, they're there but I can't change the transparent background. To me this looks like it's working as expected. If the day has higher GHI then clear sky, then the ambient air temp is higher than clear sky, and v. v. Also the temperature curve is smooth.
The text was updated successfully, but these errors were encountered: