@@ -249,38 +249,36 @@ def download_epw(lon, lat, year, location, attributes, interval, utc, your_name,
249
249
250
250
# Actual file starts here
251
251
252
- missing_values = np .array (np .ones (hours_per_year ) * 999999 ).astype (int )
253
-
254
252
# st.write(df.index)
255
253
epw_df = pd .DataFrame ()
256
254
epw_df ['Year' ] = datetimes .year .astype (int )
257
255
epw_df ['Month' ] = datetimes .month .astype (int )
258
256
epw_df ['Day' ] = datetimes .day .astype (int )
259
257
epw_df ['Hour' ] = datetimes .hour .astype (int ) + 1
260
258
epw_df ['Minute' ] = datetimes .minute .astype (int )
261
- epw_df ['Data Source and Uncertainty Flags' ] = missing_values
259
+ epw_df ['Data Source and Uncertainty Flags' ] = "'Created with NREL PSM3 input data'"
262
260
263
261
epw_df ['Dry Bulb Temperature' ] = df ['Temperature' ].values .flatten ()
264
262
265
263
epw_df ['Dew Point Temperature' ] = df ['Dew Point' ].values .flatten ()
266
264
267
265
epw_df ['Relative Humidity' ] = df ['Relative Humidity' ].values .flatten ()
268
266
269
- epw_df ['Atmospheric Station Pressure' ] = df ['Pressure' ].values .flatten ()
270
- epw_df ['Extraterrestrial Horizontal Radiation' ] = missing_values
267
+ epw_df ['Atmospheric Station Pressure' ] = df ['Pressure' ].astype ( int ). multiply ( 100 ). values .flatten ()
268
+ epw_df ['Extraterrestrial Horizontal Radiation' ] = 9999
271
269
#
272
- epw_df ['Extraterrestrial Direct Normal Radiation' ] = missing_values
270
+ epw_df ['Extraterrestrial Direct Normal Radiation' ] = 9999
273
271
#
274
- epw_df ['Horizontal Infrared Radiation Intensity' ] = missing_values
272
+ epw_df ['Horizontal Infrared Radiation Intensity' ] = 9999
275
273
#
276
274
epw_df ['Global Horizontal Radiation' ] = df ['GHI' ].values .flatten ()
277
275
epw_df ['Direct Normal Radiation' ] = df ['DNI' ].values .flatten ()
278
276
epw_df ['Diffuse Horizontal Radiation' ] = df ['DHI' ].values .flatten ()
279
277
280
- epw_df ['Global Horizontal Illuminance' ] = missing_values
281
- epw_df ['Direct Normal Illuminance' ] = missing_values
282
- epw_df ['Diffuse Horizontal Illuminance' ] = missing_values
283
- epw_df ['Zenith Luminance' ] = missing_values
278
+ epw_df ['Global Horizontal Illuminance' ] = 999999
279
+ epw_df ['Direct Normal Illuminance' ] = 999999
280
+ epw_df ['Diffuse Horizontal Illuminance' ] = 999999
281
+ epw_df ['Zenith Luminance' ] = 9999
284
282
285
283
epw_df ['Wind Direction' ] = df ['Wind Direction' ].values .flatten ()
286
284
epw_df ['Wind Speed' ] = df ['Wind Speed' ].values .flatten ()
@@ -290,21 +288,21 @@ def download_epw(lon, lat, year, location, attributes, interval, utc, your_name,
290
288
epw_df ['Opaque Sky Cover' ] = df ['Cloud Type' ].values .flatten ()
291
289
#
292
290
293
- epw_df ['Visibility' ] = missing_values
294
- epw_df ['Ceiling Height' ] = missing_values
295
- epw_df ['Present Weather Observation' ] = missing_values
291
+ epw_df ['Visibility' ] = 9999
292
+ epw_df ['Ceiling Height' ] = 99999
293
+ epw_df ['Present Weather Observation' ] = ''
296
294
#
297
- epw_df ['Present Weather Codes' ] = missing_values
295
+ epw_df ['Present Weather Codes' ] = ''
298
296
epw_df ['Precipitable Water' ] = df ['Precipitable Water' ].values .flatten ()
299
- epw_df ['Aerosol Optical Depth' ] = missing_values
297
+ epw_df ['Aerosol Optical Depth' ] = .999
300
298
#
301
- epw_df ['Snow Depth' ] = missing_values
302
- epw_df ['Days Since Last Snowfall' ] = missing_values
299
+ epw_df ['Snow Depth' ] = 999
300
+ epw_df ['Days Since Last Snowfall' ] = 99
303
301
epw_df ['Albedo' ] = df ['Surface Albedo' ].values .flatten ()
304
302
#
305
303
306
- epw_df ['Liquid Precipitation Depth' ] = missing_values
307
- epw_df ['Liquid Precipitation Quantity' ] = missing_values
304
+ epw_df ['Liquid Precipitation Depth' ] = 999
305
+ epw_df ['Liquid Precipitation Quantity' ] = 99
308
306
309
307
out .dataframe = epw_df
310
308
0 commit comments