Closed RiadZiour closed 4 years ago
Function "set_df" has not been implemented correctly yet in oplus. It will be done in the next release.
You can use this code : `
epw = op.Epw("USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw")
raw_epw_df = epw.df()
raw_epw_df["drybulb"] *= 2
epw._df = raw_epw_df
modify_epw_df = epw.df() print(modify_epw_df["drybulb"].sum())`
This code does not imply data check. The create epw can be incorrect for simulation use.
New commands are:
import oplus as op
# get weather
data from simulation "s"
epw = s.get_in_weather_data()
# get weather data from epw file
epw = op.WeatherData.from_epw("T19_S10.epw")
# get dataframe
df = epw.get_weather_series()
df["drybulb"] *=2
# create a new weather data and save it:
epw2 = op.WeatherData(df,
latitude=48.8534033,
longitude=2.3465896,
timezone_offset=1,
elevation=0,
)
epw2.to_epw("test.epw")
I tried to create a new epw through the following steps: open an epw into a df, modify the df and then update the epw with the new df. I guessed this was the role of the function set_df. However nothing happened: the epw was not modified. And reading the function, I don't see how it is supposed to work...