Skip to content
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

Update solar weather file downloads to GOES V4 #1945

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions deploy/runtime/ui/Solar Resource Data.json
Original file line number Diff line number Diff line change
@@ -3888,8 +3888,8 @@
"\t\t\t\tname = available_datasets[i].name;\r",
"\t\t\t\tif ( is_tmy )\r",
"\t\t\t\t{\r",
"\t\t\t\t\t// only use himawari-tmy if psm3-2-2-tmy is not available\r",
"\t\t\t\t\tif ( name == 'himawari-tmy' && (available_names ?@ 'psm3-2-2-tmy') < 0 )\r",
"\t\t\t\t\t// only use himawari-tmy if nsrdb-GOES-tmy-v4-0-0 is not available\r",
"\t\t\t\t\tif ( name == 'himawari-tmy' && (available_names ?@ 'nsrdb-GOES-tmy-v4-0-0') < 0 )\r",
"\t\t\t\t\t{\r",
"\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
@@ -3898,7 +3898,7 @@
"\t\t\t\t\t{\r",
"\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
"\t\t\t\t\telseif ( name == 'psm3-2-2-tmy' )\r",
"\t\t\t\t\telseif ( name == 'nsrdb-GOES-tmy-v4-0-0' )\r",
"\t\t\t\t\t{\r",
"\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
@@ -3913,15 +3913,15 @@
"\t\t\t\t\t{\r",
"\t\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
"\t\t\t\t\telseif ( name == 'full-disc' && (available_names ?@ 'psm3-2-2') < 0 )\r",
"\t\t\t\t\telseif ( name == 'full-disc' && (available_names ?@ 'nsrdb-GOES-aggregated-v4-0-0') < 0 )\r",
"\t\t\t\t\t{\r",
"\t\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
"\t\t\t\t\telseif ( name == 'himawari' && (available_names ?@ 'psm3-2-2') < 0 )\r",
"\t\t\t\t\telseif ( name == 'himawari' && (available_names ?@ 'nsrdb-GOES-aggregated-v4-0-0') < 0 )\r",
"\t\t\t\t\t{\r",
"\t\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
"\t\t\t\t\telseif ( name == 'psm3-2-2' ) \r",
"\t\t\t\t\telseif ( name == 'nsrdb-GOES-aggregated-v4-0-0' ) \r",
"\t\t\t\t\t{\r",
"\t\t\t\t\t\ti_dataset = i;\r",
"\t\t\t\t\t}\r",
@@ -4025,9 +4025,9 @@
"\t\t\tmsg += dataset[n].msg + '\\n';",
"\t\t\tcontinue;",
"\t\t}\t",
"\t\tif ( download_option == TMY ) // this needs to work for both psm3-tmy and suny-india-tmy",
"\t\tif ( download_option == TMY ) // this needs to work for both nsrdb-GOES-tmy-v4-0-0 and suny-india-tmy",
"\t\t{\t",
"\t\t\ttype = ['tmy']; // should get newest TMY file for psm3-tmy, or tmy for suny-india-tmy",
"\t\t\ttype = ['tmy']; // should get newest TMY file for nsrdb-GOES-tmy-v4-0-0, or tmy for suny-india-tmy",
"\t\t}",
"\t\telseif ( download_option == SINGLE_YEAR ) ",
"\t\t{",
@@ -4093,13 +4093,13 @@
"\t\t\t\t// only get attributes SAM needs for simulations",
"\t\t\t\t// otherwise default is to get all attributes",
"\t\t\t\t// https://developer.nrel.gov/docs/solar/nsrdb/",
"\t\t\t\tif ( dataset[n].name == 'psm3-2-2')",
"\t\t\t\tif ( dataset[n].name == 'nsrdb-GOES-aggregated-v4-0-0')",
"\t\t\t\t{",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,relative_humidity,wind_direction,wind_speed,surface_albedo';",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,relative_humidity,wind_direction,wind_speed,surface_albedo,clearsky_dhi,clearsky_dni,clearsky_ghi';",
"\t\t\t\t}",
"\t\t\t\telseif ( dataset[n].name == 'psm3-2-2-tmy')",
"\t\t\t\telseif ( dataset[n].name == 'nsrdb-GOES-tmy-v4-0-0')",
"\t\t\t\t{",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,wind_direction,wind_speed,surface_albedo';",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,wind_direction,wind_speed,surface_albedo,clearsky_dhi,clearsky_dni,clearsky_ghi';",
"\t\t\t\t}",
"\t\t\t\telseif ( dataset[n].name == 'suny-india' )",
"\t\t\t\t{",
@@ -4111,7 +4111,7 @@
"\t\t\t\t}",
"\t\t\t\telseif ( dataset[n].name == 'msg-iodc' )",
"\t\t\t\t{",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,relative_humidity,wind_direction,wind_speed,surface_albedo';",
"\t\t\t\t\tbase_url += '&attributes=dni,dhi,ghi,dew_point,air_temperature,surface_pressure,relative_humidity,wind_direction,wind_speed,surface_albedo,clearsky_dhi,clearsky_dni,clearsky_ghi';",
"\t\t\t\t}",
"\t\t\t\twrite_line( flog, '\\nFile ' + to_string(i+1) + ' of ' + #type + ': ' + type[i]);",
"\t\t\t\twrite_line( flog, '----------------------------------------------------------\\n');\t",
2 changes: 2 additions & 0 deletions src/nsrdb.cpp
Original file line number Diff line number Diff line change
@@ -686,6 +686,7 @@ void NSRDBDialog::GetResources()
datasets have different available intervals in addition to 60 (all datasets have 60 minute data):
psm3 https://developer.nrel.gov/docs/solar/nsrdb/psm3-download/ 30
psm3-2-2 https://developer.nrel.gov/docs/solar/nsrdb/psm3-2-2-download/ 30
nsrdb-GOES-aggregated-v4-0-0 https://developer.nrel.gov/api/nsrdb/v2/solar/nsrdb-GOES-aggregated-v4-0-0-download 30
psm3-5min https://developer.nrel.gov/docs/solar/nsrdb/psm3-5min-download/ 5,15,30
suny-india https://developer.nrel.gov/docs/solar/nsrdb/suny-india-data-download/ 15,30
msg-iodc https://developer.nrel.gov/docs/solar/nsrdb/meteosat-download/ 15,30
@@ -700,6 +701,7 @@ void NSRDBDialog::GetResources()
// skip some datasets
if ((name.Lower() != "spectral-india-tmy") // not compatible with SAM
&& (name.Lower() != "full-disc") // only covers a few years and is similar to PSM V3 from solar modeling perspective
&& (name.Lower() != "nsrdb-goes-full-disc-v4-0-0") // similar to GOES V4 from solar modeling perspective
&& (name.Lower() != "philippines") // basic solar resource data only tamb, dhi, dni, ghi, wind (not enough data for CSP or PV thermal models)
&& (name.Lower() != "vietnam")) // // basic solar resource data only tamb, dhi, dni, ghi, wind (not enough data for CSP or PV thermal models)
{