NREL / developer.nrel.gov

An issue tracker for NREL's APIs available at https://developer.nrel.gov
43 stars 39 forks source link

Change in format for TMY temperature data? #220

Closed craftj2 closed 2 years ago

craftj2 commented 3 years ago

There appears to have been a change in format for the data. My API requests are now returning values for temperature in what I guess are 1/10ths of a degree C (i.e. 190 = 19.0 degrees C). I haven't been able to find any documentation of this change. is this accurate?

jja262 commented 3 years ago

I also noticed this. I pulled PSM3 data for a few sites in the US, and it looks like the temperatures have all been multiplied by 10.

I'm using pvlib 0.7.2 and calling pvlib.iotools.get_psm3() to obtain the data:

from pvlib import iotools
_header, _data = iotools.get_psm3(
    latitude=36.0,
    longitude=-115.0,
    api_key=api_key,
    email=subscriber_email,
    names='tmy',
    interval=60,
    timeout=10)
chrisd31 commented 3 years ago

Here are minimal reproduction steps:

https://developer.nrel.gov/api/nsrdb/v2/solar/psm3-tmy-download.csv?wkt=POINT(-115.0+36.0)&attributes=dhi%2Cdni%2Cghi%2Cdew_point%2Cair_temperature%2Csurface_pressure%2Cwind_direction%2Cwind_speed%2Csurface_albedo%2C%2C%2C&names=tmy&full_name=Louis%20Bourbon&email=sun.king@nrel.gov&affiliation=NREL&mailing_list=false&reason=test&utc=true&api_key=key

The issue is happening in both columns: Dew Point, Temperature. Attached is the zipped csv response. 10342636.01-115.02_tmy-2020_e45973b15862171fc7318530ad5efb10.zip

PjEdwards commented 3 years ago

Let me take a look. We recently deployed the 2020 data. I'm guessing the scale factor meta is missing from the new file.

PjEdwards commented 3 years ago

OK, we have a data issue. Going to rollback 2020 for a couple of days until we get it fixed. Give it about 30 minutes for the deployment to propagate. Thanks for the heads up!

chrisd31 commented 3 years ago

I can confirm that the reproduction steps above now return reasonable values for Dew Point and Temperature. Also returns:

Did the rollback happened for all locations or only 103426? Thanks

PjEdwards commented 3 years ago

Yep, all locations. The way this works is that if you request "tmy" instead of a specific year (e.g. "tmy-2019") you will get the most recent year. When the 2020 data came out I updated the "tmy" alias to point at 2020 instead of 2019. When this bug was reported I simply updated the alias to point back at 2019 data again. I think it's important to be aware that we do this so you can choose if you actually like using the alias (knowing that the data will change once a year), or if you'd prefer to simply use "tmy-2019" and explicitly update to 2020 when/if you decide to do so.

Also, sounds like one of our people in the delivery chain for this data is out next week. The 2020 TMY may not get fixed until week after next. I'll leave this ticket open until we deploy the fixed data and switch the "tmy" alias over to "tmy-2020".

Cheers! Paul

reger commented 2 years ago

@PjEdwards let me know when you want this closed

PjEdwards commented 2 years ago

Yes! Can be closed. New data was rolled out last week. SOrry didn't update ticket sooner. Thanks Rob!