sluyspy.wp_data module

Functions to deal with WP weather data in the sluyspy package

sluyspy.wp_data.read_36h_forecast_data(wp_dir, loc, verbosity=1)[source]

Read WP 36h forecast files (full day today + latest) and combine them.

Parameters:
  • wp_dir (str) – Directory containing the WP data files.

  • loc (str) – Name of the town to read data for.

  • verbosity (int) – Verbosity (0-4 for silent to loud).

Returns:

Pandas.DataFrame containing time, clouds, rain, temp, press, RH, W.speed, W.dir.

Return type:

(pd.df)

sluyspy.wp_data.read_36h_forecast_file(file_name, loc, verbosity=1)[source]

Read the forecast for the given location from a single WP 36h data file.

Parameters:
  • file_name (str) – Name of the input file.

  • loc (str) – Location to read data for.

  • verbosity (int) – Verbosity (0-4 for silent to loud).

Returns:

Forecast data for the location provided. None if no data were found.

Return type:

(pandas.DataFrame)

sluyspy.wp_data.smoothen_36h_forecast_data(wpfc, verbosity=1)[source]

Smoothen WP 36h forecast data.

Parameters:
  • wpfc (pd.df) – pandas.DataFrame containing WP forecast data.

  • verbosity (int) – Verbosity (0-4 for silent to loud).

Returns:

tuple of three pd.dfs (wpfc,wpfci):

  • (pd.df): Pandas DataFrame containing WP forecast data.

  • (pd.df): Pandas DataFrame containing interpolated WP rain forecast data.

Return type:

(tuple)