nsrdb.mymean.mymean.MyMean

class MyMean(flist, fout, dset, process_chunk=10000, parallel=True)[source]

Bases: object

Class to calculate multi-year mean data

Parameters:
  • flist (list | tuple) – List of filepaths to NSRDB files to calculate means from.

  • fout (str) – Output file path.

  • dset (str) – Dataset name to calculate mean values for.

  • process_chunk (int) – Number of sites to keep in memory and read at one time.

  • parallel (bool) – Flag to run in parallel.

Methods

run(flist, fout, dset[, process_chunk, parallel])

Run the MY mean calculation and write to disk.

to_kwh_m2_day(arr)

Connvert irradiance to mean units (kwh/m2/day).

Attributes

meta

Get the meta dataframe.

static to_kwh_m2_day(arr)[source]

Connvert irradiance to mean units (kwh/m2/day).

Parameters:

arr (np.ndarray | pd.Series) – Mean irradiance array in W/m2.

Returns:

mean (float | np.ndarray) – Mean irradiance values in kWh/m2/day.

property meta

Get the meta dataframe.

classmethod run(flist, fout, dset, process_chunk=10000, parallel=True)[source]

Run the MY mean calculation and write to disk.

Parameters:
  • flist (list | tuple) – List of filepaths to NSRDB files to calculate means from.

  • fout (str) – Output file path.

  • dset (str) – Dataset name to calculate mean values for.

  • process_chunk (int) – Number of sites to keep in memory and read at one time.

  • parallel (bool) – Flag to run in parallel.